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

Add back cover support and improve PDF page numbering

parent c7e22897
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -17,11 +17,10 @@ $ make
```

This uses [an advanced Makefile](http://www.bouncingchairs.net/oss) to build
the document, but you can of course just run
the document, but you can run manually with
```console
$ pdflatex ornl-template-example
$ bibtex ornl-template-example
$ pdflatex ornl-template-example
$ export TEXINPUTS=$(cd .. && pwd)/ornltm:$TEXINPUTS
$ latexmk -pdf ornl-template-example
```
to get the main document and references. Some of the advanced features like
acronyms, sorted bibliographies, and indexes require extra commands which the
@@ -46,7 +45,7 @@ $ kpsewhich ornltm.cls
## Documentation

The documentation essentially consists of the
[example](./example/ornl-template-example.tex). Commands that should be defined
[example](./example/ornl-template-example.tex). Commands that must be defined
in the document header are:

| Command             | Description                                 |
@@ -56,8 +55,17 @@ in the document header are:
| `\date{...}`        | The publication date.                       |
| `\division{...}`    | Your ORNL division name.                    |
| `\reportnum{...}`   | Report number.                              |


Optional commands for the document header are:

| Command             | Description                                 |
| ------------        | -----------------------------------------   |
| `\reportdraft`      | Mark the document as a draft.               |
| `\reportphoto{...}` | Specify a path to override the cover photo. |
| `\restrict{...}{...}` | Print restrictions instead of "unlimited" |




The following commands belong in the document. They create the title pages and
@@ -68,6 +76,7 @@ set up document styling for the three main sections of the document.
| `\frontmatter`    | Create title page and set up TOC styles.  |
| `\mainmatter`     | Begin the main content of the document.   |
| `\appendix`       | Begin appendices.                         |
| `\backmatter`     | Print the back cover page.                |


## Limitations
+9 −4
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@
% Example of ORNL tech memo template
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use the ``draft'' option to compile more quickly.
\documentclass{ornltm}
%\documentclass[draft]{ornltm}
%\documentclass{ornltm}
\documentclass[draft]{ornltm}

% Uncomment these to hide a particular page.
%\renewcommand\makeostipage\relax
@@ -47,13 +47,13 @@
\date{\today}

% Define report number.
\reportnum{ORNL/TM-2016/123}
\reportnum{ORNL/TM-2021/123}
% Mark the report as a draft
\reportdraft

% Define division/directorate name. Replace "Division Name" with your
% division/directorate.
%\division{Division Name}
\division{Transformative Typesetting Division}

% Add a restriction notice to the cover page. Remove comment "%" below if that
% is desired.
@@ -464,6 +464,11 @@ If each appendix contains similarly formatted text as the body of the document
headings cannot be used, such as with computer data or forms, a flysheet should
be used.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Back cover page
\backmatter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+22 −2
Original line number Diff line number Diff line
@@ -248,6 +248,7 @@ thereof.}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\maketitlepage{%
\begin{titlepage}
\setcounter{page}{2}%

%%% REPORT NUMBER %%%
\raggedleft{\large\textbf{\@reportnum}}
@@ -296,12 +297,13 @@ under contract DE-AC05-00OR22725
\newcommand\frontmatter{%
  \@mainmatterfalse%
  \renewcommand\and{\\}
  \renewcommand\thepage{Front cover}%
  \makecoverpage%
  \pagenumbering{roman}%
  \setcounter{page}{1}%
  \makeostipage%
  \maketitlepage%
  \cleardoublepage
  % Reset page numbering for user-added front matter
  \pagenumbering{roman}%
  \setcounter{page}{3}%
}

@@ -386,6 +388,24 @@ under contract DE-AC05-00OR22725
% from the second 
\newcommand\longcaption[2]{\caption[#1]{#1 \normalfont #2}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BACK MATTER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand\backmatter{%
  \clearpage%
  \thispagestyle{plain}%
  \setcounter{page}{0}%
  \renewcommand\thepage{Back cover}%
\begin{titlepage}
  \rule{0pt}{0pt}

  \vspace{\fill}

  \textcolor{ornlgreen}{\rule{\textwidth}{.5pt}}
\end{titlepage}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%