Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ornltm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kennedy, Joseph H
ornltm
Commits
d7f62699
Commit
d7f62699
authored
6 years ago
by
Johnson, Seth R.
Browse files
Options
Downloads
Patches
Plain Diff
Fix appendix style and numbering
parent
c8506296
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
example/ornl-template-example.tex
+28
-86
28 additions, 86 deletions
example/ornl-template-example.tex
ornltm/ornltm.cls
+59
-45
59 additions, 45 deletions
ornltm/ornltm.cls
with
87 additions
and
131 deletions
example/ornl-template-example.tex
+
28
−
86
View file @
d7f62699
...
...
@@ -5,25 +5,37 @@
%
% Example of ORNL tech memo template
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use the [draft] option to compile more quickly
\documentclass
{
ornltm
}
%\documentclass[draft]{ornltm}
% Use the [draft] option to compile more quickly. Remove the ``twoside''
% argument if you want fewer blank pages (e.g. for an online-only version).
%\documentclass[twoside]{ornltm}
\documentclass
[draft,twoside]
{
ornltm
}
% XXX temporary: show page margins
%
\usepackage{showframe}
\usepackage
{
showframe
}
%\renewcommand\makeostipage\relax
%\renewcommand\makecoverpage\relax
%\renewcommand\maketitlepage\relax
% Unusual table extensions (support for table notes etc
%\usepackage{rotating}
% Optional packages that are simply part of this example document
\usepackage
{
multirow
}
\usepackage
{
threeparttable
}
%\usepackage{rotating}
%\usepackage{enumitem}
% Bibliography styling: you can use your own if desired
\usepackage
[authordate,strict,backend=biber,autolang=other,bibencoding=inputenc]
{
biblatex-chicago
}
% Use inline small italic blue for comments
\definecolor
{
note
}{
RGB
}{
50,100,200
}
\renewcommand
{
\marginpar
}
[1]
{
\small\em\color
{
note
}
[#1]
}
\definecolor
{
note
}{
RGB
}{
48,96,192
}
\renewcommand
{
\marginpar
}
[1]
{{
\small\em\color
{
note
}
[#1]
}}
% Caption with more than one sentence: the first sentence is the first argument,
% the rest are the second. This allows table of contents to just show the first
% sentence but display the whole thing in the text.
\newcommand\longcaption
[2]
{
\caption
[#1]
{
#1 #2
}}
% Bibliography
\usepackage
[authordate,strict,backend=biber,autolang=other,bibencoding=inputenc]
{
biblatex-chicago
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% AUTHORSHIP & PUBLISHING
...
...
@@ -34,7 +46,7 @@
\author
{
AuthorFirst AuthorLast
\and
2ndAuthorFirst 2ndAuthorLast
}
% Specify title.
% Note: if using an explicit
linebreak in the title, you must use the \protect
% Note: if using an explicit linebreak in the title, you must use the \protect
% command before it.
\title
{
Oak Ridge National Laboratory:
\protect\\
Official TM Example
}
...
...
@@ -214,25 +226,20 @@ it is common practice to also place them in a sub folder named "figures" or
similar.
\begin{figure}
[ht]
\begin{
center
}
\
center
ing
\includegraphics
[width=5.5in, height=2.5in]
{
figures/fig1.png
}
\vspace
{
-.1in
}
\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
\longcaption
{
All figure captions are 10 pt, bold,
\ac
{
tnr
}
.
}{
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}
a figure caption is bold.
}
\end{figure}
Text can go in between figures. LaTeX will pretty much place the figures
wherever it wants unless you explicitly command it to do otherwise.
\begin{figure}
[ht]
\begin{
center
}
\
center
ing
\includegraphics
[width=6.2in, height=2.75in, keepaspectratio=true]
{
figures/fig1.png
}
\vspace
{
-.1in
}
\caption
{
One-line figure captions are centered.
}
\end{center}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
@@ -300,50 +307,6 @@ condimentum magna sodales quis. Morbi interdum lobortis massa at pulvinar. Proin
et suscipit mauris. Maecenas aliquam lorem ipsum, nec dapibus nibh aliquam
vitae. Sed et molestie sapien. Nullam commodo id mauris quis mollis.
% \begin{table}[ht]
% \centering
% \caption{Table caption is bold, centered, and initial cap with no period at end of title}
% \begin{tabular}{|r|ccccccc|c|c|}\hline
% \begin{sideways}Paper\end{sideways} &\begin{sideways}Static\end{sideways}
% &\begin{sideways}Heterogeneous\end{sideways} &\begin{sideways}Preemptive\end{sideways}
% &\begin{sideways}Task sizes known\end{sideways} &\begin{sideways}Comms costs known\end{sideways} &\begin{sideways}Platform independent\end{sideways} &\begin{sideways}Year\end{sideways} &\begin{sideways}Pub type\end{sideways}\\
% \hline
% HAR1994j &x & & &x &x & &1994 & Journal \\
% SWRT1996c &x &x & &x &x & &1996 & Conference \\
% GRA1999c &x &x &- &x &x & &1999 & Conference \\
% CFR1999j &x & & &x &x &x &1999 & Journal \\
% TBS2001b &x &x & &x &x &x &2001 & Book Chapter \\
% DAYA2002j &x &x &- &x &x &x &2002 & Journal \\
% \hline
% \end{tabular}
% \end{table}
% \begin{sidewaystable}[p]
% \centering
% \caption{Table caption is bold, centered, and initial cap with no period at end of title}\label{tab:2}
% \begin{threeparttable}
% \begin{tabular}{c c c c c c}
% \hline
% \multirow{2}{*}{\textbf{EM projects}$^{a}$} & \textbf{Recycling} & \textbf{Amount} & \multirow{2}{*}{\textbf{Recycling}} & \multirow{2}{*}{\textbf{Disposal}}
% & \multirow{2}{*}{\textbf{Storage}} \\
% & \textbf{method} & \textbf{recycled} (lb) & & & \\ \hline
% Metals recycle & Smelting & 1,072,000 & 1,565,763 & 1,338,447 & 1,608,000 \\
% Cooling tower$^{b}$ & Decontamination & 459,000 & 605,880 & 573,120 & 688,500 \\
% Totals & & 1,601,150 & 2,266,491 & 2,004,973 & 2,401,725 \\
% \hline
% \end{tabular}
% \begin{tablenotes}
% \item {{\emph Note:} A general note to the table as a whole is not linked to a superscript letter. It is formatted like}
% {this note. Table footnotes are 9 pt., or as with larger tables, 1 pt. smaller than the table body text.}
% \item {${}^{(a)}$\small Footnote call-outs are lowercase, italic, superscript letters in sequence from left to right, then}
% {\small top to bottom.}
% \item {${}^{(b)}$\small For multipage tables, the footnote appears only on the last page of the table. Beginning on }
% {\small the second page and following pages of a multipage table, \textbf{use Table ?. (continued)} as the table caption.}
% \end{tablenotes}
% \end{threeparttable}
% \end{sidewaystable}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section
{
Citations
}
...
...
@@ -471,19 +434,6 @@ efficitur justo sed diam suscipit varius.
% REFERENCES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The bibliography styles and backend are set in the ``Bibliography'' section of
% the class file (ornltm.cls by default).
% \begin{references}
% % Enumerates the References section.
% \let\stdsection\section
% \def\section*#1{\stdsection{#1}}
% % Prints the references.
% \printbibliography
% % Puts the sections back to ``standard'' by deferring to global settings.
% \let\section\stdsection
% \end{references}
% Bibliography support via biblatex
\printbibliography
...
...
@@ -498,11 +448,10 @@ 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
headings cannot be used, such as with computer data or forms, a flysheet should
be used.
\clearpage
blorp
\clearpage
blorp2
\begin{equation}
\label
{
eq:appeq
}
2 + 2 = 5
\end{equation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section
{
Second Appendix
}
...
...
@@ -512,13 +461,6 @@ 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
headings cannot be used, such as with computer data or forms, a flysheet should
be used.
\clearpage
blorp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section
{
Third Appendix
}
\label
{
sec:thirdapp
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
...
...
This diff is collapsed.
Click to expand it.
ornltm/ornltm.cls
+
59
−
45
View file @
d7f62699
...
...
@@ -14,7 +14,7 @@
% GEOMETRY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\LoadClass
[11pt,letterpaper
,twoside
]
{
article
}
\LoadClass
[11pt,letterpaper]
{
article
}
\RequirePackage
[margin=1in,footskip=.75in]
{
geometry
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
@@ -43,18 +43,10 @@
\RequirePackage
{
color
}
% colored fonts and boxes
\RequirePackage
{
wallpaper
}
% background on cover page
\RequirePackage
{
fancyhdr
}
% headers and footers
% Manage paragraph indentation, but revert changes to @starttoc so that tocloft
% allows us to define cfttocprehook etc.
\let\@
starttoc@latex@orig
\@
starttoc
\RequirePackage
[parfill]
{
parskip
}
% No indent for paragraphs
\let\@
starttoc
\@
starttoc@latex@orig
\RequirePackage
{
emptypage
}
% hide footers on blank pages
\RequirePackage
[font=bf]
{
caption
}
\RequirePackage
{
titlesec
}
% title modification: use text size
\RequirePackage
[pdfusetitle]
{
hyperref
}
% url and links in PDF
\RequirePackage
{
emptypage
}
% create a blank page with no numbers
\RequirePackage
{
tocloft
}
% table of contents styling
\RequirePackage
[shortcuts]
{
glossaries
}
% acronyms
...
...
@@ -76,6 +68,14 @@
urlcolor=[rgb]
{
0.325,0.494,0.658
}
}
% Do not indent paragraphs
% Note: do NOT use the parskip package: it breaks tocloft; the parfill option
% also breaks \hfill!
% Do not indent paragraphs
\setlength\parindent\z
@
% Skip after paragraphs (stretchy: 6 to 15)
\parskip
=0.5
\baselineskip
\advance\parskip
by 0pt plus 2pt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TITLE STYLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
@@ -378,13 +378,20 @@ under contract DE-AC05-00OR22725
}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TABLE OF CONTENTS, FIGURES,
TABLE STY
LES
% TABLE OF CONTENTS,
LIST OF
FIGURES,
LIST OF TAB
LES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Make the contents, figure, and table titles uppercase
\renewcommand\cfttoctitlefont
{
\bfseries\MakeUppercase
}
\renewcommand\cftloftitlefont
{
\bfseries\MakeUppercase
}
\renewcommand\cftlottitlefont
{
\bfseries\MakeUppercase
}
% Make the contents, figure, and table titles uppercase and centered
\renewcommand\cfttoctitlefont
{
\noindent\hspace*
{
\fill
}
\bfseries\MakeUppercase
}
\renewcommand\cftloftitlefont
{
\noindent\hspace*
{
\fill
}
\bfseries\MakeUppercase
}
\renewcommand\cftlottitlefont
{
\noindent\hspace*
{
\fill
}
\bfseries\MakeUppercase
}
\renewcommand\cftaftertoctitle
{
\hspace*
{
\fill
}}
\renewcommand\cftafterloftitle
{
\hspace*
{
\fill
}}
\renewcommand\cftafterlottitle
{
\hspace*
{
\fill
}}
% Use plain font style and regular size
\renewcommand\cftsecfont
{}
% Add a dot after section numbers
\renewcommand\cftsecaftersnum
{
.
}
% Squish section lines together
\setlength
{
\cftbeforesecskip
}{
0pt
}
% Add leaders to all sections and subsections in the TOC.
...
...
@@ -404,7 +411,7 @@ under contract DE-AC05-00OR22725
\if
@mainmatter
%
\relax
%
\else
%
\pagestyle
{
plain
}
%
\
this
pagestyle
{
plain
}
%
\fi
%
}
% Lists should clear the page after if in front matter
...
...
@@ -437,45 +444,52 @@ under contract DE-AC05-00OR22725
\pagenumbering
{
arabic
}
%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% APPENDIX PAGE NUMBERING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define a ``section'' command for the appendix
\newcommand\@
appendixsection[1]
{
%
\cleardoublepage
% Call the ``section'' command, which will put the title on its own page
\thispagestyle
{
empty
}
\@
oldappendixsection
{
#1
}
% Increment page counter
\stepcounter
{
page
}
%
% Add a blank page after the title
\cleardoublepage
% Insert the appendix name at the top, with no number
{
\hfill\bf\appendixname
~
\thesection
.
\hspace
{
.5em
}
\MakeUppercase
{
#1
}
\hfill\null
}
}
\renewcommand\appendixname
{
APPENDIX
}
% 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
{
%
\cleardoublepage
%
\setcounter
{
section
}{
0
}
%
\setcounter
{
subsection
}{
0
}
%
\setcounter
{
equation
}{
0
}
%
\assignpagestyle
{
\section
}{
page
}
%
\let\@
@oldsection=
\section
\renewcommand\section
{
\cleardoublepage\setcounter
{
page
}{
1
}
\@
@oldsection
}
% \newcommand{\sectionbreak}{\cleardoublepage}%
% \titleformat{\section}[block]{\vfill\filcenter\bf}{\appendixname~\thesection.}{1ex}{\MakeUppercase}[\vfill]%
%\titlespacing*{\section}{}{\stretch{1}}{\stretch{1}}%
\gdef\thesection
{
\@
Alph
\c
@section
}
%
\pagenumbering
{
arabic
}
%
\renewcommand\thepage
{
\thesection
-
\arabic
{
page
}}
%
% Reset equations
\cleardoublepage
% Reset page style
\pagenumbering
{
arabic
}
%
\renewcommand\thepage
{
\thesection
--
\arabic
{
page
}}
%
% Reset section numbering
\gdef\thesection
{
\@
Alph
\c
@section
}
%
% Reset section formatting
\setcounter
{
section
}{
0
}
%
% Change equation numbering
\gdef\theequation
{
\@
Alph
\c
@section.
\arabic
{
equation
}}
%
% Reset page and equation numbers at the beginning of every section
\@
addtoreset
{
equation
}{
section
}
%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BIBLIOGRAPHY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If you have trouble building with the biber backend, set the backend to bibtex.
%Use the command below for footnote style w/reference list.
%\usepackage[backend=biber,notes]{biblatex-chicago}
%Use the command below for author-date style w/reference list.
\usepackage
[authordate,strict,backend=biber,autolang=other,bibencoding=inputenc]
{
biblatex-chicago
}
\bibliography
{
ornltm
}
\@
addtoreset
{
page
}{
section
}
%
% Change the title format so that the ``header'' is a standalone title page.
% This allows section and page numbering to be correct, and we can use the
% macros it defines to insert a ``regular'' appendix label afterward.
\titleformat
{
\section
}
[block]
{
\null\vfill\bf\filcenter
}
%
{
\appendixname
~
\thesection
.
}{
0.5em
}{
\bf\large\MakeUppercase
}
[
\vfill\null
]
% Save the command we just defined; we'll use it in a command we defined above
% outside the ``appendix'' macro.
\let\@
oldappendixsection
\section
\let\section\@
appendixsection
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% end of Exnihilo/environment/latex/ornltm.cls
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment