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

WIP

parent cae0a210
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10,3 +10,5 @@ ornl-template-example.pdf
*.lot
*.bcf
*.run.xml
*.glo
*.ist
+42 −80
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@
% XXX temporary: show page margins
%\usepackage{showframe}

% Acronym support (ac, acl)
\usepackage[shortcuts]{glossaries}
\setacronymstyle{long-short}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% AUTHORSHIP & PUBLISHING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -41,59 +45,32 @@
% is desired.
%\restrict{Official use only etc.}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FRONT MATTER
% ACRONYMS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{roman}
\makeglossaries
\newacronym{doe}{DOE}{Department of Energy}
\newacronym{nrc}{NRC}{Nuclear Regulatory Commission}
\newacronym{tm}{TM}{Oak Ridge National Laboratory}
\newacronym{ornl}{ORNL}{Oak Ridge National Laboratory}

\setcounter{page}{5}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FRONT MATTER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\frontmatter

\tableofcontents
% LIST OF FIGURES
\begin{listmyfigures}
\listoffigures
\end{listmyfigures}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% LIST OF TABLES
\begin{listmytables}
\listoftables
\end{listmytables}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% LIST OF ACRONYMS
%\clearemptydoublepage
%\phantomsection

\begin{listacronyms}

	\begin{table}[ht]
		\vspace{-6pt}
		\begin{tabular}{l l}
			ORNL & Oak Ridge National Laboratory \\
			TNR & Times New Roman  \\
		\end{tabular}
	\end{table}

\end{listacronyms}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% ADD ACKNOWLEDGMENT
\begin{acknowledgment}
Add acknowledgment if applicable.
\end{acknowledgment}
\printglossary

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% ADDITIONAL FRONT MATTER (OPTIONAL)
\begin{foreword}
\section*{Foreword}

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
@@ -136,35 +113,36 @@ Section~\ref{Table Placement}).
% Resets footnote count.
\setcounter{footnote}{0}

Footnotes may be used in addition to the author-date citation method, in which case, the footnotes provide additional information to the text, not bibliographic citations.

\end{foreword}
Footnotes may be used in addition to the author-date citation method, in which
case, the footnotes provide additional information to the text, not
bibliographic citations.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ABSTRACT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\mainmatter
\begin{abstract}

The abstract, if short, is inserted here before the introduction section. If the
abstract is long, it should be inserted with the front material and page
numbered as such, then this page would begin with the introduction section.
The abstract, if short, is inserted here (after \verb|\mainmatter|) before the
introduction section. If the abstract is long, it should be inserted
\emph{before} \verb|\mainmatter|, and the introduction below will be the first
method on the page. This \acl{tm} class is used for reports at \acl{ornl}.

\end{abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MAIN NARRATIVE
% DOCUMENT CONTENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{First-Order Heading}
\label{First-Order Heading}
\label{sec:firstsec}

Begin text here.
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}).

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
@@ -203,7 +181,7 @@ document?''
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Figure Placement}
\label{Figure Placement}
\label{sec:figures}

\subsection{Figures}

@@ -248,7 +226,7 @@ wherever it wants unless you explicitly command it to do otherwise.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Table Placement}
\label{Table Placement}
\label{sec:tables}

\subsection{Tables}

@@ -363,7 +341,7 @@ vitae. Sed et molestie sapien. Nullam commodo id mauris quis mollis.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Citations}
\label{Citations}
\label{sec:citations}

\subsection{Using In-Text Citations}
For the ORNL TM reports, \textit{Chicago Manual of Style} references and citations are preferred. Of these, you can choose
@@ -383,7 +361,7 @@ file of this LaTeX template (ornltm.cls), in the section labeled ``Bibliography.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Lists}
\label{Lists}
\label{sec:lists}

Flanges used in ultra-high vacuum service are commonly closed with metallic
gaskets or seals. The geometry of the seal interface is critical for proper
@@ -439,19 +417,7 @@ You can also use numbered lists.

\subsubsection{Third-Order Heading}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo ipsum
mi, porta commodo leo aliquet eu. Ut pellentesque aliquam luctus. Integer
rutrum, lacus a venenatis condimentum, elit nisl malesuada mauris, nec molestie
dolor turpis at diam. Fusce consectetur in libero et volutpat. Curabitur sed
fringilla nisl. Proin feugiat risus vitae eros ornare finibus. Integer tincidunt
libero urna, vitae venenatis justo sagittis cursus. Nulla sagittis venenatis
felis sed auctor. Cras quis lorem ac massa posuere condimentum id sed augue.
Integer ipsum neque, pulvinar at tortor sed, feugiat tristique elit. Nulla eget
rhoncus nisl. Aenean ut dolor mi. Cras ut lacinia metus. Donec gravida ligula eu
commodo efficitur. Vivamus in lectus feugiat, congue est eu, egestas turpis. Sed
quis lobortis nunc, eu tincidunt sem.

\paragraph{Fourth-order heading}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. \paragraph{Fourth-order heading}

Cras elementum pellentesque lacinia. Pellentesque habitant morbi tristique
senectus et netus et malesuada fames ac turpis egestas. Curabitur ornare libero
@@ -507,11 +473,8 @@ efficitur justo sed diam suscipit varius.
% APPENDICES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix

% FIRST APPENDIX
\appendixpagenumbering
\section{First Appendix}
\label{First Appendix}
\label{sec:firstapp}

If each appendix contains similarly formatted text as the body of the document
(i.e., first-order headings) then flysheets are not necessary. If first-order
@@ -519,9 +482,8 @@ headings cannot be used, such as with computer data or forms, a flysheet should
be used.

% SECOND APPENDIX
\appendixpagenumbering
\section{Second Appendix}
\label{Second Appendix}
\label{sec:secondapp}

If each appendix contains similarly formatted text as the body of the document
(i.e., first-order headings) then flysheets are not necessary. If first-order

ornlmacro.sty

100755 → 100644
+0 −0

File mode changed from 100755 to 100644.

ornlmacro.tex

100755 → 100644
+0 −0

File mode changed from 100755 to 100644.

+90 −110
Original line number Diff line number Diff line
@@ -114,19 +114,19 @@
%\renewcommand{\cftaftertoctitle}{\hfill}

% TOC styles

% Removes vertical space between sections in TOC.
\setlength{\cftbeforesecskip}{0pt}

% Add leaders to all sections and subsections in the TOC.
\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}}

% Sections use UPPERCASE in ToC
\xpatchcmd{\l@section}{#1}{\uppercase {#1}}{}{}

% Subsections use UPPERCASE in ToC
\xpatchcmd{\l@subsection}{#1}{\uppercase{#1}}{}{}

% 
% % Removes vertical space between sections in TOC.
% \setlength{\cftbeforesecskip}{0pt}
% 
% % Add leaders to all sections and subsections in the TOC.
% \renewcommand\cftsecleader{\cftdotfill{\cftdotsep}}
% 
% % Sections use UPPERCASE in ToC
% \xpatchcmd{\l@section}{#1}{\uppercase {#1}}{}{}
% 
% % Subsections use UPPERCASE in ToC
% \xpatchcmd{\l@subsection}{#1}{\uppercase{#1}}{}{}
% 
%\renewcommand{\cfttoctitlefont}{\hfill~~~~~~~~~~\large\bfseries\MakeUppercase}
%\renewcommand{\cftaftertoctitle}{\hfill\null}

@@ -174,6 +174,7 @@ treated as a draft.}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COVER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\makecoverpage{%
\begin{titlepage}
\thispagestyle{coverpage}
@@ -371,139 +372,118 @@ for the \\
US DEPARTMENT OF ENERGY \\
under contract DE-AC05-00OR22725

\end{titlepage}
}
\end{titlepage}%
} % end \maketitlepage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ENVIRONMENT OVERRIDES
% FRONT MATTER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Pushing lists (bulleted and numbered) to left margin.
%\setlist{leftmargin=5.0mm}

\newenvironment{listmyfigures}{%
	\newpage
	\clearemptydoublepage
	\phantomsection
	\addcontentsline{toc}{section}{List of Figures}
	%	\section*{List of Figures}%
}{}

\newcommand{\clearemptydoublepage}{\newpage\pagestyle{empty}\cleardoublepage}

\newenvironment{listmytables}{%
	\newpage
	\clearemptydoublepage
	\phantomsection
	\addcontentsline{toc}{section}{List of Tables}
%	\section*{List of Tables}%
}{}
\newif\if@mainmatter
\@mainmattertrue
\def\@cleariffrontmatter{\if@mainmatter\relax\else{Poop \clearemptydoublepage}\fi}

% Adding an environment for a list of acronyms.
\newenvironment{listacronyms}{%
	\newpage
	\clearemptydoublepage
	\phantomsection
	\addcontentsline{toc}{section}{List of Acronyms}
	\section*{List of Acronyms}%
}{}
\let\@oldtableofcontents=\tableofcontents
\def\tableofcontents{
  \@cleariffrontmatter%
  \pagestyle{plain}%
  \@oldtableofcontents%
}

% Adding an envrionment for a summary.
\newenvironment{summary}{%
	\newpage
	\clearemptydoublepage
\let\@oldlistoffigures=\listoffigures
\def\listoffigures{
  %\@cleariffrontmatter%
  \if@mainmatter\relax\else{Poop \clearemptydoublepage}\fi
	\addcontentsline{toc}{section}{List of Figures}
	\phantomsection
	\addcontentsline{toc}{section}{Summary}
	\section*{Summary}%	
}{}
  \@oldlistoffigures%
}

% Adding an environment for a foreword.
\newenvironment{foreword}{%
	\newpage
	\clearemptydoublepage
	\phantomsection
	\addcontentsline{toc}{section}{Foreword}
	\section*{Foreword}%
}{}
\let\@oldlistoftables=\listoftables
\def\listoftables{
	\@cleariffrontmatter%
  % \addcontentsline{toc}{section}{List of Tables}
	%	\section*{List of Figures}%
  \@oldlistoftables%
}
 
% Adding an environment for an acknowledgment.
\newenvironment{acknowledgment}{%
	\newpage
	\clearemptydoublepage
	\phantomsection
	\addcontentsline{toc}{section}{Acknowledgment}
	\section*{Acknowledgment}%
}{}
\AtBeginDocument{%
  % Add the cover, OSTI, and title pages to the beginning of the document.
  \pagenumbering{none}
  % Begin actual document
  \raggedright
  \pagenumbering{arabic}
  \setcounter{page}{1}
}

\newcommand{\frontmatter}{%
  \@mainmatterfalse%
  \def\and{\\}
  \makecoverpage%
  \makeostipage%
  \maketitlepage%
  \cleardoublepage
  % Reset page numbering for user-added front matter
  \pagenumbering{roman}%
  \setcounter{page}{3}%
}

% Specify some behavior for the abstract.
% Abstract gets a new page if it's in the front matter; otherwise it's just at
% the top of the page.
\renewenvironment{abstract}{%
	\newpage
\if@mainmatter\relax\else
  \clearemptydoublepage
	\pagenumbering{arabic}
	\setcounter{page}{1}
	\phantomsection
\fi
	\addcontentsline{toc}{section}{Abstract}
	\phantomsection
  \section*{Abstract}%
}{}

% Adding a page break after every section by default.
% Still needs work.
\let\oldsection\section
\renewcommand\section{\newpage\clearemptydoublepage\oldsection}


% Add page break after every section by default. (TODO: not fully working)
% \let\@oldsection=\section
% \renewcommand\section{\newpage\clearemptydoublepage\@oldsection}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT
% MAIN MATTER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\AtBeginDocument{%
  % Add the cover, OSTI, and title pages to the beginning of the document.
  \pagenumbering{none}
  \def\and{\\}
  \makecoverpage%
  \makeostipage%
  \maketitlepage%
  \cleardoublepage
  % Add front matter
  \pagenumbering{roman}
  \setcounter{page}{3}
  % Make the table of contents
  \pagestyle{plain}
  \tableofcontents%
  \cleardoublepage%
  % Begin actual document
  \raggedright
  \pagenumbering{arabic}
  \setcounter{page}{1}
}

\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
\newcommand\mainmatter{%
  \clearemptydoublepage
  \@mainmattertrue%
  \pagenumbering{arabic}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% APPENDIX PAGE NUMBERING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\appendixpagenumbering}{
	\break
	\pagenumbering{arabic}
	\renewcommand{\thepage}{\thesection-\arabic{page}}
}

% Change format for appendices: 'appendix' in title, title takes entire page,
% is not numbered, followed by a blank unnumbered page.
\renewcommand\appendixname{APPENDIX}
\renewcommand\appendix{%
	\clearemptydoublepage
	\clearemptydoublepage%
  \@addtoreset{equation}{section}%
  \@addtoreset{page}{section}%
	\setcounter{section}{0}%
	\setcounter{subsection}{0}%
	\setcounter{subsubsection}{0}%
	\setcounter{paragraph}{0}%
	\setcounter{subparagraph}{0}%
  \setcounter{equation}{0}%
	%
	\titleclass{\section}{page}%
	\newcommand{\sectionbreak}{\cleardoublepage}%
	\assignpagestyle{\section}{empty}%
	%\titleclass{\section}{page}%
	%\newcommand{\sectionbreak}{\cleardoublepage}%
	%\assignpagestyle{\section}{empty}%
	\titleformat{\section}[block]{\vfill\filcenter\bf}{\appendixname~\thetitle.}{1ex}{\MakeUppercase}[\vfill]%
	%\titlespacing*{\section}{0pt}{0pt}{0pt}%
	\gdef\thesection{\@Alph\c@section}
	\gdef\thesection{\@Alph\c@section}%
	\pagenumbering{arabic}%
  \renewcommand{\thepage}{\thesection-\arabic{page}}
  %\let\@oldappendix=\appendix
  %\def\appendix{\renewcommand{\thepage}{\thesection-\arabic{page}}\@oldappendix}
	}
	
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%