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

Allow draft *with* defined report number

parent 8b061972
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -47,7 +47,9 @@
\date{\today}

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

% Define division/directorate name. Replace "Division Name" with your
% division/directorate.
@@ -55,9 +57,7 @@

% Add a restriction notice to the cover page. Remove comment "%" below if that
% is desired.
\restrict\draft
\restrict{Not for public release.}
% \restrict{Official use only}
\restrict{\small\sffamily (Additional example restrictions)}
% \restrict{Official use only}
% \restrict{Business Sensitive}

+31 −34
Original line number Diff line number Diff line
@@ -46,17 +46,17 @@
\newif\if@reportnumdefined
\@reportnumdefinedfalse
\def\@reportnum{ORNL/TM-XXXX/XXX%
\PackageWarning{ornltm}{No TM report number has been defined. The report will be
treated as a draft.}}
\PackageWarning{ornltm}{No TM report number has been defined.}}
\newcommand{\reportnum}[1]{\def\@reportnum{#1}\@reportnumdefinedtrue}

\newif\if@reportdraft
\@reportdraftfalse
\newcommand{\reportdraft}{\@reportdrafttrue}

% Use the \restrict command to add qualifications to the document's restriction.
% For example, add ``OUO'' and such.
\newif\if@restrictdefined
\@restrictdefinedfalse
\def\@restrict{%
  \textbsf{Approved for public release. \\
           Distribution is unlimited.}}
\newcommand{\restrict}[1]{\def\@restrict{#1}\@restrictdefinedtrue}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -88,13 +88,9 @@ treated as a draft.}}

\begin{minipage}[c][1in]{\textwidth-2.5in}%
%% TOP LEFT NOTICE %%
\if@reportnumdefined%
{
  \hspace*{0pt}%
}%
\else%
\if@reportdraft%
{%
% Notice about preliminary document when the 'reportnum' variable is not set
% Notice about preliminary document when ``draft'' is set
\hspace*{\fill}\fbox{\parbox{3.5in}{%
  \footnotesize\raggedright\textbsf{%
  NOTICE: This document contains information of a preliminary nature and is not
@@ -102,6 +98,10 @@ treated as a draft.}}
  does not represent a final report.
}}}\hspace*{\fill}%
}%
\else%
{%
  \hspace*{0pt}%
}%
\fi%
\end{minipage}%
%
@@ -134,31 +134,28 @@ treated as a draft.}}
\hspace{-0.05in}

%%% NOTICES %%%
% If restrict and reportnum, show restrict
% If restrict and not reportnum, show restrict and draft
% If not restrict and reportnum, show restrict (approved for public
% release)
% If not restrict and not reportnum, show draft
% If restrict and draft, show restrict + draft
% If restrict and not draft, show restrict
% If not restrict and draft, show draft
% If not restrict and not draft, show ``approved for public release"
\vspace{\stretch{1}}
\begin{minipage}[c]{4in}%
\if@reportnumdefined{%
\hspace*{\fill}\framebox{\parbox{.75\textwidth}{%
    \@restrict%
  }}\hspace*{\fill}%
}%
\else%
{
%
\if@reportdraft{%
  \textbsf{\large Draft. Not for public release.}%
}\fi%
%
\if@restrictdefined{%
    \hspace*{\fill}\framebox{\parbox{.75\textwidth}{%
      \@restrict%
\par\@restrict%
}\else%
\if@reportdraft\relax\else{%
\textbsf{Approved for public release. \\
         Distribution is unlimited.}%
}\fi%
\fi%
%
}}\hspace*{\fill}\par%
  }
  \else\relax\fi
  \hspace*{\fill}\framebox[.75\textwidth]{
    \large\textbsf{Draft. Not for public release.}
  }\hspace*{\fill}
}
\fi
\end{minipage}
\hspace*{\fill}