Commit c8506296 authored by Johnson, Seth R.'s avatar Johnson, Seth R.
Browse files

Reorganize class file and glossary stuff

Move glossary requirement to the main class file.
parent ce21c1ad
Loading
Loading
Loading
Loading
+46 −51
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@

% XXX temporary: show page margins
%\usepackage{showframe}

%\renewcommand\makeostipage\relax
%\renewcommand\makecoverpage\relax
%\renewcommand\maketitlepage\relax
@@ -22,9 +21,9 @@
\usepackage{threeparttable}
%\usepackage{enumitem}

% Acronym support (ac, acl)
\usepackage[shortcuts]{glossaries}
\setacronymstyle{long-short}
% Use inline small italic blue for comments
\definecolor{note}{RGB}{50,100,200}
\renewcommand{\marginpar}[1]{\small\em\color{note}[#1]}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% AUTHORSHIP & PUBLISHING
@@ -66,6 +65,7 @@
\newacronym{nrc}{NRC}{Nuclear Regulatory Commission}
\newacronym{tm}{TM}{Technical memo}
\newacronym{ornl}{ORNL}{Oak Ridge National Laboratory}
\newacronym{tnr}{TNR}{Times New Roman}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FRONT MATTER
@@ -80,8 +80,8 @@
\listoftables
% LIST OF ACRONYMS
% NOTE: this will only print if `makeindex X.ist -o X.gls X.glo` is executed.
% This is part of the included makefile
\printglossary
% This is part of the included Makefile.
\printacronyms

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ADDITIONAL FRONT MATTER (OPTIONAL)
@@ -91,22 +91,22 @@ Material after the Contents, List of Figures, List of Tables, and the Acronym
list may include any or all of the following sections and should begin on an
odd-numbered page in the order listed below:

\noindent{FOREWORD {\color{blue}{\emph {[Note: Spelling is not ``FORWARD.'']}}}}\\
\noindent{PREFACE}\\
\noindent{ACKNOWLEDGMENTS}\\
\noindent{EXECUTIVE SUMMARY OR SUMMARY}\\
\noindent{ABSTRACT}
\begin{itemize}
  \item FOREWORD \marginpar{Note: spelling is not ``FORWARD.''}
  \item PREFACE
  \item ACKNOWLEDGMENTS
  \item EXECUTIVE SUMMARY OR SUMMARY
  \item ABSTRACT
\end{itemize}

Each section of the front material begins on an odd-numbered page. The
abstract, if very brief, may begin on page 1 inserted above the introduction
section.

\bigskip
\phantomsection
\addcontentsline{toc}{section}{GENERAL INFORMATION}
\begin{center}
  {\textbf{GENERAL INFORMATION}}
\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ADDITIONAL FRONT MATTER (OPTIONAL)
\section*{General Information}

Document margins are 1 in. all around.

@@ -121,7 +121,7 @@ superscript Arabic numerals as shown above or as superscript symbols
If symbols, they will appear the following order: \footnote{First},
\footnote{Second}, \footnote{Third}, \footnote{Fourth}, \footnote{Fifth},
\footnote{etc}. Symbols \emph{are not} used as table footnote indicators (see
Section~\ref{Table Placement}).
Section~\ref{sec:tables}).

% Returns footnotes back to Arabic numbers.
\renewcommand*{\thefootnote}{\arabic{footnote}}
@@ -133,8 +133,8 @@ case, the footnotes provide additional information to the text, not
bibliographic citations.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section*{Acknowledgment}
% Add acknowledgment if applicable.
\section*{Acknowledgment}
Add acknowledgment if applicable.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ABSTRACT
@@ -156,21 +156,20 @@ method on the page. This \acl{tm} class is used for reports at \acl{ornl}.
\label{sec:firstsec}

Begin text here. You can reference acronyms such as \ac{ornl}, and when
referencing the next time they will automatically be shortened (such as
\ac{ornl}).
referencing the next time they will automatically be replaced with shortened
versions such as \ac{ornl}.

The body of the document is paginated consecutively (i.e., 1, 2, 3) or by
section (i.e., 1-1, 2-1, 3-1) using Arabic numbers centered at the bottom of
each page. Blank backup pages are not numbered.

When typing your document in LaTeX, it might be useful to break the line at the
right-hand side by hitting the return key
so that any version control system you might be using can recognize changes with
better granularity. These version control
systems (e.g., SVN, Git, Mercurial) track changes by line number, so the more
frequent line breaks that a document has,
the better control over changes and merges the author(s) will have. These breaks
are treated as spaces in the final output.
right-hand side by hitting the return key so that any version control system you
might be using can recognize changes with better granularity. These version
control systems (e.g., SVN, Git, Mercurial) track changes by line number, so the
more frequent line breaks that a document has, the better control over changes
and merges the author(s) will have. These breaks are treated as spaces in the
final output.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Second-Order Heading}
@@ -201,27 +200,25 @@ document?''
\subsection{Figures}

Insert figures after the text callout but as close to the call out as possible.
(They always have a caption describing them and they
are always numbered. LaTeX automatically floats Tables and Figures, depending on
how much space is left on the page at
the point that they are processed. If there is not enough room on the current
page, the float is moved to the top of the next
page.) Figures are numbered consecutively (i.e., Figure 1, Figure 2) except in
large reports, where they may be numbered consecutively by section (i.e., Figure
1.1, Figure 1.2).
(They always have a caption describing them and they are always numbered. LaTeX
automatically floats Tables and Figures, depending on how much space is left on
the page at the point that they are processed. If there is not enough room on
the current page, the float is moved to the top of the next page.) Figures are
numbered consecutively (i.e., Figure 1, Figure 2) except in large reports, where
they may be numbered consecutively by section (i.e., Figure 1.1, Figure 1.2).

All figures are pulled in from source files that should be placed in a directory
to which the author can link in the LaTeX file.
In this template, the image files for the figures are in the same directory as
the main LaTeX document, but it is common practice
to also place them in a sub folder named "figures" or similar.
to which the author can link in the LaTeX file.  In this template, the image
files for the figures are in the same directory as the main LaTeX document, but
it is common practice to also place them in a sub folder named "figures" or
similar.

\begin{figure}[ht]
	\begin{center}
	\includegraphics[width=5.5in, height=2.5in]{figures/fig1.png}
	\vspace{-.1in}
  \flushleft\caption[All figure captions are 10 pt, bold, Times New Roman.]{All
    figure captions are 10 pt, bold, Times New Roman. \textmd{If you have a
  \flushleft\caption[All figure captions are 10 pt, bold, \ac{tnr}.]{All
    figure captions are 10 pt, bold, \ac{tnr}. \textmd{If you have a
    two-line or more figure caption it is flush left. Only the first sentence of
  a figure caption is bolded.}}
	\end{center}
@@ -246,14 +243,12 @@ wherever it wants unless you explicitly command it to do otherwise.
\subsection{Tables}

As with figures, tables are numbered consecutively, or consecutively by section,
and should follow their call out (see
Table \ref{tab:1}) in the text as closely as possible. (LaTeX automatically
floats Tables and Figures, depending on how much
space is left on the page at the point that they are processed. If there is not
enough room on the current page, the float is moved
to the top of the next page.) Tables are formatted using small TNR. To
accommodate large tables, the font size can be decreased
and, if necessary, landscaped.
and should follow their call out (see Table \ref{tab:1}) in the text as closely
as possible. (LaTeX automatically floats Tables and Figures, depending on how
much space is left on the page at the point that they are processed. If there is
not enough room on the current page, the float is moved to the top of the next
page.) Tables are formatted using small TNR. To accommodate large tables, the
font size can be decreased and, if necessary, landscaped.

\begin{table}[ht]
  \centering
+75 −66
Original line number Diff line number Diff line
@@ -10,28 +10,30 @@
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{ornltm}[2016/09/16 ORNL Technical Memorandum class]

%%%%%%%%%%% TYPE AND GEOMETRY %%%%%%%%%%%
\LoadClass[11pt,letterpaper,twoside]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GEOMETRY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\LoadClass[11pt,letterpaper,twoside]{article}
\RequirePackage[margin=1in,footskip=.75in]{geometry}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FONTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ams math must be loaded before txfonts
\usepackage{amsmath}
\RequirePackage{amsmath}

% Use Times for math font and text font.
\RequirePackage[T1]{fontenc}
\RequirePackage{txfonts}

% bold math must be loaded after Times font
% Bold math must be loaded after Times font
\RequirePackage{bm}

% Macro for bold sans-serif
% Bold sans-serif
\newcommand{\textbsf}[1]{{\bfseries\sffamily #1}}

% Macro for bold italics
% Bold italics
\newcommand{\textbi}[1]{{\bfseries\itshape #1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -54,19 +56,11 @@
\RequirePackage[pdfusetitle]{hyperref} % url and links in PDF
\RequirePackage{emptypage} % create a blank page with no numbers
\RequirePackage{tocloft} % table of contents styling


% Footer for cover page
\fancypagestyle{coverpage}
{
  \renewcommand{\headrulewidth}{0pt}
  \fancyhf{}
  \fancyfoot[L]{\includegraphics[width=3.72in]{textlogo.png}}
}
\RequirePackage[shortcuts]{glossaries} % acronyms

% Set footrule width for pages w/footnotes.
% THIS DOESN'T WORK.
\renewcommand{\footrulewidth}{0.4pt}
% \renewcommand{\footrulewidth}{0.4pt}

% ORNL official green color
\definecolor{ornlgreen}{RGB}{0,121,52}
@@ -77,12 +71,14 @@
% Add pretty link colors
\hypersetup{
	colorlinks,
  linkcolor=[rgb]{0.082,0.274,0.407},
  linkcolor=[rgb]{0.01,0.05,0.1},
	citecolor=[rgb]{0.780,0.647,0.258},
	urlcolor=[rgb]{0.325,0.494,0.658}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TITLE STYLES 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Show five levels of depth in title labels
\setcounter{secnumdepth}{5} 
@@ -96,50 +92,6 @@
\titleformat{\paragraph}{\bf}{\thetitle}{1ex}{}[]
\titleformat{\subparagraph}{\bf\itshape}{\relax}{0pt}{}[]

%% TABLE OF CONTENTS, FIGURES, TABLES %%

% Make the contents, figure, and table titles uppercase
\renewcommand\cfttoctitlefont{\bfseries\MakeUppercase}
\renewcommand\cftloftitlefont{\bfseries\MakeUppercase}
\renewcommand\cftlottitlefont{\bfseries\MakeUppercase}
% Squish section lines together
\setlength{\cftbeforesecskip}{0pt}
% Add leaders to all sections and subsections in the TOC.
\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}}

% Clear the page before TOC if it is in the ``front matter''
\AtBeginDocument{%
\let\@origcfttoc\tableofcontents
\renewcommand{\tableofcontents}{%
\@cleariffrontmatter
\@origcfttoc%
}
}

% Contents/figures should have plain numbering if in the front matter
\renewcommand\@cfttocstart{%
  \if@mainmatter%
    \relax%
  \else%
    \pagestyle{plain}%
  \fi%
}
\renewcommand\@cfttocfinish{%
  \if@mainmatter%
    \relax%
  \else%
    \clearpage%
  \fi%
}

% Add section titles for figures/tables
\renewcommand\cftlofprehook{%
\phantomsection\addcontentsline{toc}{section}{List of Figures}%
}
\renewcommand\cftlotprehook{%
\phantomsection\addcontentsline{toc}{section}{List of Tables}%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% VARIABLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -174,6 +126,14 @@ treated as a draft.}}
% COVER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Footer for cover page
\fancypagestyle{coverpage}
{
  \renewcommand\headrulewidth{0pt}
  \fancyhf{}
  \fancyfoot[L]{\includegraphics[width=3.72in]{textlogo.png}}
}

\def\makecoverpage{%
\begin{titlepage}
\thispagestyle{coverpage}
@@ -389,7 +349,8 @@ under contract DE-AC05-00OR22725

\newif\if@mainmatter
\@mainmattertrue
\def\@cleariffrontmatter{\if@mainmatter\relax\else{\cleardoublepage}\fi}
\def\@cleariffrontmatter{\if@mainmatter\relax\else{\clearpage}\fi}
\def\@cleardbliffrontmatter{\if@mainmatter\relax\else{\cleardoublepage}\fi}

\newcommand{\frontmatter}{%
  \@mainmatterfalse%
@@ -416,7 +377,55 @@ under contract DE-AC05-00OR22725
  \section*{Abstract}%
}{}

% Add page break after every section by default. (TODO: not fully working)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TABLE OF CONTENTS, FIGURES, TABLE STYLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Make the contents, figure, and table titles uppercase
\renewcommand\cfttoctitlefont{\bfseries\MakeUppercase}
\renewcommand\cftloftitlefont{\bfseries\MakeUppercase}
\renewcommand\cftlottitlefont{\bfseries\MakeUppercase}
% Squish section lines together
\setlength{\cftbeforesecskip}{0pt}
% Add leaders to all sections and subsections in the TOC.
\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}}

% Clear the page before TOC if it is in the ``front matter''
\AtBeginDocument{%
\let\@origcfttoc\tableofcontents
\renewcommand\tableofcontents{%
\@cleardbliffrontmatter
\@origcfttoc%
}%
}

% Lists should have plain numbering if in the front matter
\renewcommand\@cfttocstart{%
  \if@mainmatter%
    \relax%
  \else%
    \pagestyle{plain}%
  \fi%
}
% Lists should clear the page after if in front matter
\renewcommand\@cfttocfinish{\@cleariffrontmatter}

% Add section titles for figures/tables
\renewcommand\cftlofprehook{%
\phantomsection\addcontentsline{toc}{section}{List of Figures}%
}
\renewcommand\cftlotprehook{%
\phantomsection\addcontentsline{toc}{section}{List of Tables}%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ACRONYMS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setacronymstyle{long-short}

\providecommand*{\printacronyms}[1][]{%
\printglossary[type=\acronymtype,#1]}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MAIN MATTER
@@ -449,7 +458,7 @@ under contract DE-AC05-00OR22725
  %\titlespacing*{\section}{}{\stretch{1}}{\stretch{1}}%
	\gdef\thesection{\@Alph\c@section}%
	\pagenumbering{arabic}%
  \renewcommand{\thepage}{\thesection-\arabic{page}}%
  \renewcommand\thepage{\thesection-\arabic{page}}%
  % Reset equations
  \gdef\theequation{\@Alph\c@section.\arabic{equation}}%
  \@addtoreset{equation}{section}%