| 1 |
% \iffalse |
| 2 |
% $Id: estcpmm.dtx,v 1.9 2010-03-02 22:28:29 boris Exp $ |
| 3 |
% |
| 4 |
% Copyright 2008, 2010 Boris Veytsman |
| 5 |
% This work may be distributed and/or modified under the |
| 6 |
% conditions of the LaTeX Project Public License, either |
| 7 |
% version 1.3 of this license or (at your option) any |
| 8 |
% later version. |
| 9 |
% The latest version of the license is in |
| 10 |
% http://www.latex-project.org/lppl.txt |
| 11 |
% and version 1.3 or later is part of all distributions of |
| 12 |
% LaTeX version 2005/12/01 or later. |
| 13 |
% |
| 14 |
% This work has the LPPL maintenance status `maintained'. |
| 15 |
% |
| 16 |
% The Current Maintainer of this work is Boris Veytsman, |
| 17 |
% <[email protected]> |
| 18 |
% |
| 19 |
% This work consists of the file estcpmm.dtx and the |
| 20 |
% derived file estcpmm.cls |
| 21 |
% |
| 22 |
% \fi |
| 23 |
% \CheckSum{473} |
| 24 |
% |
| 25 |
% |
| 26 |
%% \CharacterTable |
| 27 |
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 28 |
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 29 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 30 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 31 |
%% Dollar \$ Percent \% Ampersand \& |
| 32 |
%% Acute accent \' Left paren \( Right paren \) |
| 33 |
%% Asterisk \* Plus \+ Comma \, |
| 34 |
%% Minus \- Point \. Solidus \/ |
| 35 |
%% Colon \: Semicolon \; Less than \< |
| 36 |
%% Equals \= Greater than \> Question mark \? |
| 37 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 38 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 39 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 40 |
%% Right brace \} Tilde \~} |
| 41 |
% |
| 42 |
%\iffalse |
| 43 |
% Taken from xkeyval.dtx |
| 44 |
%\fi |
| 45 |
%\makeatletter |
| 46 |
%\def\DescribeOption#1{\leavevmode\@bsphack |
| 47 |
% \marginpar{\raggedleft\PrintDescribeOption{#1}}% |
| 48 |
% \SpecialOptionIndex{#1}\@esphack\ignorespaces} |
| 49 |
%\def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ } |
| 50 |
%\def\SpecialOptionIndex#1{\@bsphack |
| 51 |
% \index{#1\actualchar{\protect\ttfamily#1} |
| 52 |
% (option)\encapchar usage}% |
| 53 |
% \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar |
| 54 |
% usage}\@esphack} |
| 55 |
%\def\DescribeOptions#1{\leavevmode\@bsphack |
| 56 |
% \marginpar{\raggedleft\strut\emph{options}% |
| 57 |
% \@for\@tempa:=#1\do{% |
| 58 |
% \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa |
| 59 |
% }}\@esphack\ignorespaces} |
| 60 |
%\makeatother |
| 61 |
% \newcommand{\progname}[1]{\textsf{#1}} |
| 62 |
% |
| 63 |
% \MakeShortVerb{|} |
| 64 |
% \GetFileInfo{estcpmm.dtx} |
| 65 |
% \title{\LaTeX{} Style For Munitions Management Project Reports, |
| 66 |
% \emph{Environmental Security Technology |
| 67 |
% Certification Program} |
| 68 |
% \thanks{\copyright 2008, Boris Veytsman}} |
| 69 |
% \author{Boris Veytsman\thanks{% |
| 70 |
% \href{mailto:[email protected]}{\texttt{[email protected]}}, |
| 71 |
% \href{mailto:[email protected]}{\texttt{[email protected]}}}} |
| 72 |
% \date{\filedate, \fileversion} |
| 73 |
% \maketitle |
| 74 |
% \begin{abstract} |
| 75 |
% This package provides class for typesetting Cost \& Performance |
| 76 |
% Reports and Final Reports for Munitions Management Reports, US |
| 77 |
% Environmental Security Technology Certification Program. |
| 78 |
% \end{abstract} |
| 79 |
% \changes{v0.2}{2008/12/09}{First fully functional version} |
| 80 |
% \changes{v0.4}{2010/03/01}{Documentation update} |
| 81 |
% \tableofcontents |
| 82 |
% |
| 83 |
% \clearpage |
| 84 |
%\section{Introduction} |
| 85 |
%\label{sec:intro} |
| 86 |
% |
| 87 |
% As described on its Web site, \url{http://www.estcp.org}, \emph{The |
| 88 |
% Environmental Security Technology Certification Program (ESTCP) is |
| 89 |
% a Department of Defense (DoD) program that promotes innovative, |
| 90 |
% cost-effective environmental technologies through demonstration |
| 91 |
% and validation at DoD sites.} Munitions Management Projects, |
| 92 |
% financed through this program, are required to file certain reports |
| 93 |
% according to the approved templates. This class |
| 94 |
% provides for typesetting Cost \& Performance reports and Final |
| 95 |
% Reports in the \LaTeX{} framework. |
| 96 |
% |
| 97 |
% The class was commissioned and paid for by US Army Corps of |
| 98 |
% Engineers, Engineer Research and Development Center, 3909 Halls |
| 99 |
% Ferry Road, Vicksburg, MS 39180-6199. |
| 100 |
% |
| 101 |
% I am grateful to Ryan E. North, RPG for his help in testing the |
| 102 |
% package and preparing the sample files. |
| 103 |
% |
| 104 |
%\section{User Guide} |
| 105 |
%\label{sec:user_guide} |
| 106 |
% |
| 107 |
% |
| 108 |
% |
| 109 |
%\subsection{Installation} |
| 110 |
%\label{sec:ug_install} |
| 111 |
% |
| 112 |
% The class uses a number of \LaTeX{} packages. Normally they should be |
| 113 |
% present in any up-to-date distribution. If you do not have them, |
| 114 |
% you can download them using the links below prior to using the class. |
| 115 |
% |
| 116 |
% You will need \progname{PSFNSS}~\cite{Schmidt04:PSNFSS9.2}: the |
| 117 |
% \LaTeX{} package providing the access to common PostScript fonts. |
| 118 |
% Of course you will need the fonts themselves. You will also need |
| 119 |
% \progname{graphics} bundle~\cite{Carlisle05:Graphics}, packages |
| 120 |
% \progname{geometry}~\cite{Umeki08:Geometry}, |
| 121 |
% \progname{caption}~\cite{Sommerfeldt07:Caption} and |
| 122 |
% \progname{fancyhdr}~\cite{Oostrum04:Fancyhdr}. |
| 123 |
% |
| 124 |
% |
| 125 |
% The installation of the class follows the usual |
| 126 |
% practice~\cite{TeXFAQ} for \LaTeX{} packages: |
| 127 |
% \begin{enumerate} |
| 128 |
% \item Run \progname{latex} on |estcpmm.ins|. This will produce the |
| 129 |
% \LaTeX{} class |estcpmm.cls|. |
| 130 |
% \item Put the file |estcpmm.cls| to |
| 131 |
% the place where \LaTeX{} can find it (see |
| 132 |
% \cite{TeXFAQ} or the documentation for your \TeX{} |
| 133 |
% system).\label{item:install} |
| 134 |
% \item Update the database of file names. Again, see \cite{TeXFAQ} |
| 135 |
% or the documentation for your \TeX{} system for the system-specific |
| 136 |
% details.\label{item:update} |
| 137 |
% \item The file |estcpmm.pdf| provides the documentation for the |
| 138 |
% package (this is the file you are probably reading now). |
| 139 |
% \end{enumerate} |
| 140 |
% As an alternative to items~\ref{item:install} and~\ref{item:update} |
| 141 |
% you can just put the file |estcpmm.cls| in the working directory |
| 142 |
% where your |.tex| file is. |
| 143 |
% |
| 144 |
% |
| 145 |
%\subsection{Invocation} |
| 146 |
%\label{sec:ug_invocation} |
| 147 |
% |
| 148 |
% To use the class, put in the preamble of your document |
| 149 |
% \begin{flushleft} |
| 150 |
% |\documentclass[|\meta{options}|]{estcpmm}| |
| 151 |
% \end{flushleft} |
| 152 |
% |
| 153 |
% The class recoginzes the standard \LaTeX{} options, shared by the |
| 154 |
% most document classes~\cite{Lamport94}. |
| 155 |
% \DescribeOptions{8pt,9pt,10pt,11pt,12pt} The default font size |
| 156 |
% changing options (|8pt|, |9pt|, \dots, |12pt|) have no effect other |
| 157 |
% than producing a warning in the log, since DoD requires the reports |
| 158 |
% to use 12\,pt fonts. |
| 159 |
% |
| 160 |
% |
| 161 |
%\subsection{Front Matter} |
| 162 |
%\label{sec:ug_frontmatter} |
| 163 |
% |
| 164 |
% \DescribeMacro{\frontmatter}. |
| 165 |
% The command |\frontmatter| starts the \emph{Front Matter} of the |
| 166 |
% document. This part includes title page, table of contents, list of |
| 167 |
% figures, list of tables. |
| 168 |
% |
| 169 |
% \DescribeMacro{\logo} |
| 170 |
% Many reports have logo in the title page. This logo is set up by |
| 171 |
% the command |\logo[|\meta{options}|]|\marg{file}. The syntax of the |
| 172 |
% command is the same as the syntax of the command |\includegraphics| |
| 173 |
% of the \progname{graphicx} package~\cite{Carlisle05:Graphics}. The |
| 174 |
% obligatory argument \marg{file} is the name of the graphics file |
| 175 |
% with the logo, and \oarg{options}, if present, may, for example, set |
| 176 |
% the dimensions of the logo. Note that our class uses the |
| 177 |
% ``extended'' version \progname{graphicx} of the package with its |
| 178 |
% ``key-value'' syntax. For example, |
| 179 |
% \begin{verbatim} |
| 180 |
% \logo[width=2in]{red_corps_castle2.eps} |
| 181 |
% \end{verbatim} |
| 182 |
% The format of the graphics file depends on the \TeX{} engine used. |
| 183 |
% If you use |
| 184 |
% \progname{latex}$\to$\progname{dvips}$\to$\progname{pstopdf} route, |
| 185 |
% then you need PostScript files (PS or EPS). If you use |
| 186 |
% \progname{pdflatex} engine, then you need graphics files in JPEG, |
| 187 |
% PNG or PDF formats (see~\cite{TeXFAQ} for more information). |
| 188 |
% |
| 189 |
% \DescribeMacro{\title} The command |\title| is used to store project |
| 190 |
% name. Unlike the similar command in most document |
| 191 |
% classes~\cite{Lamport94}, our version has both optional and |
| 192 |
% mandatory fields: |\title[|\oarg{Short Title}|]|\marg{Full Title}. |
| 193 |
% The full title is used in the document cover page. The short title |
| 194 |
% is used in footers in the document. For example: |
| 195 |
% \begin{verbatim} |
| 196 |
% \title{A New Project} |
| 197 |
% \title[A New Project]{A New Project And Great Project} |
| 198 |
% \end{verbatim} |
| 199 |
% |
| 200 |
% \DescribeMacro{\subtitle} |
| 201 |
% The command |\subtitle|\marg{Sub Title} us used to store the project |
| 202 |
% subtitle. For example, |
| 203 |
% \begin{verbatim} |
| 204 |
% \subtitle{Final Report} |
| 205 |
% \end{verbatim} |
| 206 |
% |
| 207 |
% \DescribeMacro{\date} |
| 208 |
% The macro |\date| stores the date of the document, for example |
| 209 |
% \begin{verbatim} |
| 210 |
% \date{March 2008} |
| 211 |
% \end{verbatim} |
| 212 |
% |
| 213 |
% \DescribeMacro{\projectno} |
| 214 |
% The command |\projectno|\marg{Project Number} is used to store the |
| 215 |
% project number. For example, |
| 216 |
% \begin{verbatim} |
| 217 |
% \projectno{MM-234-t567E} |
| 218 |
% \end{verbatim} |
| 219 |
% |
| 220 |
% \DescribeMacro{\internalno} |
| 221 |
% The command |\internalno|\marg{Internal Project Number} is used to store the |
| 222 |
% internal project number, if applicable. For |
| 223 |
% example, |
| 224 |
% \begin{verbatim} |
| 225 |
% \projectno{MM-234-t567E} |
| 226 |
% \end{verbatim} |
| 227 |
% |
| 228 |
% |
| 229 |
% \DescribeMacro{\version} |
| 230 |
% The command |\version|\marg{Version Information} is used to store |
| 231 |
% the document version, internal project number, etc. For example, |
| 232 |
% \begin{verbatim} |
| 233 |
% \version{DR-ATF-0.8} |
| 234 |
% \end{verbatim} |
| 235 |
% |
| 236 |
% |
| 237 |
% \DescribeMacro{\author} |
| 238 |
% The command |\author|\marg{Authors and Affiliations} stores the |
| 239 |
% names of the authors and their affiliations. For example: |
| 240 |
% \begin{verbatim} |
| 241 |
% \author{A.~U. Thor, University of Laputa\\ |
| 242 |
% C.~O. Rrespondent, Brobdingnag School of Technology} |
| 243 |
% \end{verbatim} |
| 244 |
% |
| 245 |
% \DescribeMacro{\maketitle} |
| 246 |
% The command |\maketitle| typesets the title page of the report. |
| 247 |
% |
| 248 |
% Note that some reports require Form~298 (see, for example, |
| 249 |
% \url{http://www.ntis.gov/pdf/rdpform.pdf}). This form should be |
| 250 |
% typeset separately. |
| 251 |
% |
| 252 |
% \DescribeMacro{\tableofcontents} |
| 253 |
% \DescribeMacro{\listoffigures} |
| 254 |
% \DescribeMacro{\listoftables} |
| 255 |
% Table of contents, list of figures, list of tables are typeset with |
| 256 |
% the usual \LaTeX{} commands~\cite{Lamport94}. Note that these |
| 257 |
% commands always typeset their contents starting from an odd page. |
| 258 |
% |
| 259 |
% |
| 260 |
%\subsection{Main Matter} |
| 261 |
%\label{sec:ug_mainmatter} |
| 262 |
% |
| 263 |
% \DescribeMacro{\mainmatter} |
| 264 |
% The main matter starts with the macro |\mainmatter|. The text is |
| 265 |
% divided into sections and subsections in the usual \LaTeX{} manner. |
| 266 |
% All familiar \LaTeX{} commands and packages should work without |
| 267 |
% problems. |
| 268 |
% |
| 269 |
% Note that the class assumes that the captions of tables are put |
| 270 |
% above the tables (this is the usual practice; the behavior of the |
| 271 |
% standard \LaTeX{}, which expects them below the tables, is rather |
| 272 |
% odd). |
| 273 |
% |
| 274 |
% \DescribeMacro{\specialsection} |
| 275 |
% Unlike standard \LaTeX, this class includes in the table of contents |
| 276 |
% both numbered and unnumbered sections. If you need to have a |
| 277 |
% section, that is not included in the table of contents, use |
| 278 |
% |\specialsection|\marg{Title} command. |
| 279 |
% |
| 280 |
% |
| 281 |
% |
| 282 |
%\subsection{Appendices} |
| 283 |
%\label{sec:app} |
| 284 |
% |
| 285 |
% |
| 286 |
% |
| 287 |
% \DescribeMacro{\appendix} |
| 288 |
% The command |\appendix| starts appendices. Each individual appendix |
| 289 |
% after this command should |
| 290 |
% be entered as either a |\section| or |\section*|. The |
| 291 |
% numbered sections will be called 'Appendix~A', 'Appendix~B', |
| 292 |
% etc. (so do not use the word 'Appendix' in your titles). |
| 293 |
% |
| 294 |
%\StopEventually{% |
| 295 |
% \clearpage |
| 296 |
% \bibliography{estcpmm} |
| 297 |
% \bibliographystyle{unsrt}} |
| 298 |
% \clearpage |
| 299 |
%\section{Implementation} |
| 300 |
%\label{sec:impl} |
| 301 |
% |
| 302 |
%\subsection{Identification} |
| 303 |
%\label{sec:ident} |
| 304 |
% |
| 305 |
% We start with the declaration who we are. Most |.dtx| files put |
| 306 |
% driver code in a separate driver file |.drv|. We roll this code into the |
| 307 |
% main file, and use the pseudo-guard |<gobble>| for it. |
| 308 |
% \begin{macrocode} |
| 309 |
%<class>\NeedsTeXFormat{LaTeX2e} |
| 310 |
%<*gobble> |
| 311 |
\ProvidesFile{estcpmm.dtx} |
| 312 |
%</gobble> |
| 313 |
%<class>\ProvidesClass{estcpmm} |
| 314 |
[2010/03/02 v0.4 Typesetting reports for ESTCP MM Reports] |
| 315 |
% \end{macrocode} |
| 316 |
% |
| 317 |
% And the driver code: |
| 318 |
% \begin{macrocode} |
| 319 |
%<*gobble> |
| 320 |
\documentclass{ltxdoc} |
| 321 |
\usepackage{array} |
| 322 |
\usepackage{url,amsfonts} |
| 323 |
\usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black, |
| 324 |
pagecolor=black,urlcolor=black,hyperindex=false]{hyperref} |
| 325 |
\PageIndex |
| 326 |
\CodelineIndex |
| 327 |
\RecordChanges |
| 328 |
\EnableCrossrefs |
| 329 |
\begin{document} |
| 330 |
\DocInput{estcpmm.dtx} |
| 331 |
\end{document} |
| 332 |
%</gobble> |
| 333 |
%<*class> |
| 334 |
% \end{macrocode} |
| 335 |
% |
| 336 |
% |
| 337 |
%\subsection{Options} |
| 338 |
%\label{sec:options} |
| 339 |
% |
| 340 |
% \begin{macro}{\estcpmm@size@warning} |
| 341 |
% The font-changing options are not used in our setup, so we just |
| 342 |
% produce a warning: |
| 343 |
% \begin{macrocode} |
| 344 |
\long\def\estcpmm@size@warning#1{% |
| 345 |
\ClassWarning{estcpmm}{Size-changing option #1 will not be |
| 346 |
honored}}% |
| 347 |
\DeclareOption{8pt}{\estcpmm@size@warning{\CurrentOption}}% |
| 348 |
\DeclareOption{9pt}{\estcpmm@size@warning{\CurrentOption}}% |
| 349 |
\DeclareOption{10pt}{\estcpmm@size@warning{\CurrentOption}}% |
| 350 |
\DeclareOption{11pt}{\estcpmm@size@warning{\CurrentOption}}% |
| 351 |
\DeclareOption{12pt}{\estcpmm@size@warning{\CurrentOption}}% |
| 352 |
% \end{macrocode} |
| 353 |
% \end{macro} |
| 354 |
% |
| 355 |
% All other options are just sent to the main class: |
| 356 |
% \begin{macrocode} |
| 357 |
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} |
| 358 |
\ProcessOptions\relax |
| 359 |
% \end{macrocode} |
| 360 |
% |
| 361 |
%\subsection{Loading Class and Packages} |
| 362 |
%\label{sec:loading} |
| 363 |
% |
| 364 |
% We start with the base class and packages |
| 365 |
% \begin{macrocode} |
| 366 |
\LoadClass[12pt]{book} |
| 367 |
\RequirePackage{graphicx} |
| 368 |
\RequirePackage{caption} |
| 369 |
\captionsetup[table]{position=top} |
| 370 |
\captionsetup{justification=centering,font=bf} |
| 371 |
% \end{macrocode} |
| 372 |
% |
| 373 |
%\subsection{Fonts} |
| 374 |
%\label{sec:fonts} |
| 375 |
% |
| 376 |
% We use Times for the main font. The guidelines say nothing about other |
| 377 |
% fonts, but to reproduce the familiar look, we also use Helvetica for |
| 378 |
% the sans serifed font, and Courier for the monospaced font: |
| 379 |
% \begin{macrocode} |
| 380 |
\usepackage{mathptmx} |
| 381 |
\usepackage[scaled]{helvet} |
| 382 |
\usepackage{courier} |
| 383 |
% \end{macrocode} |
| 384 |
% |
| 385 |
% |
| 386 |
% |
| 387 |
%\subsection{Page Dimensions and Paragraphing} |
| 388 |
%\label{sec:page} |
| 389 |
% |
| 390 |
% The requirements are 1'' margin top, left, right and bottom. Rather |
| 391 |
% ugly from the the point of view of classical typography, but this is |
| 392 |
% how DoD wants it. |
| 393 |
% |
| 394 |
% \begin{macrocode} |
| 395 |
\RequirePackage[margin=1in]{geometry} |
| 396 |
% \end{macrocode} |
| 397 |
% |
| 398 |
% |
| 399 |
% \begin{macro}{\parindent} |
| 400 |
% The paragraphs have no indentation\dots |
| 401 |
% \begin{macrocode} |
| 402 |
\setlength{\parindent}{0pt} |
| 403 |
% \end{macrocode} |
| 404 |
% \end{macro} |
| 405 |
% |
| 406 |
% \begin{macro}{\parskip} |
| 407 |
% \dots and there is one baseline skip between paragraphs |
| 408 |
% \begin{macrocode} |
| 409 |
\setlength{\parskip}{\baselineskip} |
| 410 |
% \end{macrocode} |
| 411 |
% \end{macro} |
| 412 |
% |
| 413 |
% |
| 414 |
%\subsection{Headers and Footers} |
| 415 |
%\label{sec:headers} |
| 416 |
% |
| 417 |
% We use \progname{fancyhdr}: |
| 418 |
% \begin{macrocode} |
| 419 |
\RequirePackage{fancyhdr} |
| 420 |
% \end{macrocode} |
| 421 |
% |
| 422 |
% |
| 423 |
% \begin{macro}{\headrulewidth} |
| 424 |
% \begin{macro}{\footrulewidth} |
| 425 |
% We do not want decorative rules: |
| 426 |
% \begin{macrocode} |
| 427 |
\renewcommand{\headrulewidth}{0pt} |
| 428 |
\renewcommand{\footrulewidth}{0pt} |
| 429 |
% \end{macrocode} |
| 430 |
% \end{macro} |
| 431 |
% \end{macro} |
| 432 |
% |
| 433 |
% |
| 434 |
% We do not have headers: |
| 435 |
% \begin{macrocode} |
| 436 |
\pagestyle{fancy} |
| 437 |
\lhead{} |
| 438 |
\rhead{} |
| 439 |
\chead{} |
| 440 |
% \end{macrocode} |
| 441 |
% |
| 442 |
% \changes{v0.3}{2010/02/28}{Bottom-aligned footers} |
| 443 |
% And we put title and date in the footers: |
| 444 |
% \begin{macrocode} |
| 445 |
\lfoot{\parbox[b]{\headwidth}{\setlength{\parskip}{0pt}\raggedright |
| 446 |
\itshape\fontsize{\@xipt}{\@xipt}\selectfont |
| 447 |
\@shorttitle}} |
| 448 |
\cfoot{{\small\thepage}} |
| 449 |
\rfoot{\textit{\small\@date}} |
| 450 |
% \end{macrocode} |
| 451 |
% |
| 452 |
% |
| 453 |
% |
| 454 |
%\subsection{Front Matter} |
| 455 |
%\label{sec:frontmatter} |
| 456 |
% |
| 457 |
% |
| 458 |
% \begin{macro}{\logo} |
| 459 |
% The |\logo| command has the same format as |\includegraphics|. It |
| 460 |
% actually sets up |\includegraphics| in |\maketitle|. |
| 461 |
% \begin{macrocode} |
| 462 |
\newcommand{\logo}[2][]{\gdef\@logo{\includegraphics[#1]{#2}}}% |
| 463 |
\def\@logo{}% |
| 464 |
% \end{macrocode} |
| 465 |
% \end{macro} |
| 466 |
% |
| 467 |
% |
| 468 |
% \begin{macro}{\title} |
| 469 |
% We redefine the title to have both mandatory and optional |
| 470 |
% arguments: |
| 471 |
% \begin{macrocode} |
| 472 |
\renewcommand{\title}[2][]{\gdef\@shorttitle{#1}\gdef\@title{#2}% |
| 473 |
\ifx\@shorttitle\@empty\gdef\@shorttitle{#2}\fi} |
| 474 |
\def\@title{} |
| 475 |
\def\@shorttitle{} |
| 476 |
% \end{macrocode} |
| 477 |
% \end{macro} |
| 478 |
% |
| 479 |
% \begin{macro}{\subtitle} |
| 480 |
% Subtitle: |
| 481 |
% \begin{macrocode} |
| 482 |
\newcommand{\subtitle}[1]{\gdef\@subtitle{#1}} |
| 483 |
\def\@subtitle{} |
| 484 |
% \end{macrocode} |
| 485 |
% \end{macro} |
| 486 |
% |
| 487 |
% |
| 488 |
% \begin{macro}{\projectno} |
| 489 |
% Project number: |
| 490 |
% \begin{macrocode} |
| 491 |
\newcommand{\projectno}[1]{\gdef\@projectno{#1}} |
| 492 |
\def\@projectno{} |
| 493 |
% \end{macrocode} |
| 494 |
% \end{macro} |
| 495 |
% |
| 496 |
% \begin{macro}{\internalno} |
| 497 |
% Internal project number: |
| 498 |
% \begin{macrocode} |
| 499 |
\newcommand{\internalno}[1]{\gdef\@internalno{#1}} |
| 500 |
\def\@internalno{} |
| 501 |
% \end{macrocode} |
| 502 |
% \end{macro} |
| 503 |
% |
| 504 |
% \begin{macro}{\version} |
| 505 |
% Version number: |
| 506 |
% \begin{macrocode} |
| 507 |
\newcommand{\version}[1]{\gdef\@version{#1}} |
| 508 |
\def\@version{} |
| 509 |
% \end{macrocode} |
| 510 |
% \end{macro} |
| 511 |
% |
| 512 |
% |
| 513 |
% |
| 514 |
% |
| 515 |
% \begin{macro}{\today} |
| 516 |
% We use only month and year in |\today|: |
| 517 |
% \begin{macrocode} |
| 518 |
\def\today{\ifcase\month\or |
| 519 |
January\or February\or March\or April\or May\or June\or |
| 520 |
July\or August\or September\or October\or November\or December\fi |
| 521 |
\space \number\year} |
| 522 |
% \end{macrocode} |
| 523 |
% \end{macro} |
| 524 |
% |
| 525 |
% \begin{macro}{\maketitle} |
| 526 |
% The |\maketitle| macro performs all the work of typesetting the |
| 527 |
% informations. Note that the guidance show flushed right title |
| 528 |
% page. |
| 529 |
% \begin{macrocode} |
| 530 |
\def\maketitle{% |
| 531 |
\thispagestyle{empty}% |
| 532 |
\begin{flushright}% |
| 533 |
% \end{macrocode} |
| 534 |
% First, we are setting up the logo---or empty space if none is |
| 535 |
% provided: |
| 536 |
% \begin{macrocode} |
| 537 |
\raisebox{0in}[2in][1in]{\@logo}\par |
| 538 |
% \end{macrocode} |
| 539 |
% And the other elements: |
| 540 |
% \begin{macrocode} |
| 541 |
\bgroup |
| 542 |
\fontsize{26pt}{32pt}\bfseries\selectfont\MakeUppercase{\@title}\\[-10pt] |
| 543 |
\rule{\textwidth}{5pt}\par |
| 544 |
\egroup |
| 545 |
\bgroup |
| 546 |
\fontsize{18pt}{24pt}\bfseries\selectfont |
| 547 |
\ifx\@subtitle\@empty\relax\else\@subtitle\par\fi |
| 548 |
\ifx\@projectno\@empty\relax\else Project Number \@projectno\par\fi |
| 549 |
\ifx\@internalno\@empty\relax\else\@internalno\par\fi |
| 550 |
\ifx\@date\@empty\relax\else\@date\par\fi |
| 551 |
\ifx\@version\@empty\relax\else\@version\par\fi |
| 552 |
\ifx\@author\@empty\relax\else\@author\par\fi |
| 553 |
\egroup |
| 554 |
\end{flushright}% |
| 555 |
\clearpage} |
| 556 |
% \end{macrocode} |
| 557 |
% |
| 558 |
% \end{macro} |
| 559 |
% |
| 560 |
% |
| 561 |
% |
| 562 |
% |
| 563 |
% |
| 564 |
%\subsection{Sectioning} |
| 565 |
%\label{sec:sectioning} |
| 566 |
% |
| 567 |
% \begin{macro}{\texorpdfstring} |
| 568 |
% \changes{v0.3}{2010/02/28}{Added macro} |
| 569 |
% The package \progname{hyperref} defines this macro. We provide it |
| 570 |
% to enable compatibility with it |
| 571 |
% \begin{macrocode} |
| 572 |
\def\texorpdfstring{% |
| 573 |
\expandafter\@firstoftwo} |
| 574 |
% \end{macrocode} |
| 575 |
% \end{macro} |
| 576 |
% \begin{macro}{\phantomsection} |
| 577 |
% \changes{v0.3}{2010/02/28}{Added macro} |
| 578 |
% Another hyperref-compatibility thing |
| 579 |
% \begin{macrocode} |
| 580 |
\let\phantomsection\@empty |
| 581 |
% \end{macrocode} |
| 582 |
% \end{macro} |
| 583 |
% |
| 584 |
% \begin{macro}{\@sectionprefix} |
| 585 |
% \changes{v0.3}{2010/02/28}{Added macro} |
| 586 |
% \changes{v0.4}{2010/03/01}{Moved from subsection to section} |
| 587 |
% This is empty, but |\appendix| redefines it to |Appendix~|. Used |
| 588 |
% in formatting numbered sections. |
| 589 |
% \begin{macrocode} |
| 590 |
\def\@sectionprefix{} |
| 591 |
% \end{macrocode} |
| 592 |
% \end{macro} |
| 593 |
% \begin{macro}{\@sectionsuffix} |
| 594 |
% \changes{v0.4}{2010/03/01}{Moved from subsection to section} |
| 595 |
% \changes{v0.3}{2010/02/28}{Added macro} |
| 596 |
% Another feature of section formatting. This is empty, but |
| 597 |
% |\appendix| redefines it to |:|. |
| 598 |
% \begin{macrocode} |
| 599 |
\def\@sectionsuffix{} |
| 600 |
% \end{macrocode} |
| 601 |
% \end{macro} |
| 602 |
% |
| 603 |
% \begin{macro}{\thesection} |
| 604 |
% \changes{v0.3}{2010/02/28}{Added decimal dot and zero after |
| 605 |
% section number} |
| 606 |
% We do not use chapter numbers in sections, and add .0 to the section |
| 607 |
% numbers. This is not too typographically sound, but it is |
| 608 |
% how it is done in the Army\dots |
| 609 |
% \begin{macrocode} |
| 610 |
\renewcommand \thesection {\@arabic\[email protected]} |
| 611 |
% \end{macrocode} |
| 612 |
% \end{macro} |
| 613 |
% \begin{macro}{\thesubsection} |
| 614 |
% \changes{v0.3}{2010/02/28}{Added macro} |
| 615 |
% Since we changed |\thesection|, we need to redefine this. |
| 616 |
% \begin{macrocode} |
| 617 |
\renewcommand \thesubsection{\@arabic\c@section.\@arabic\c@subsection} |
| 618 |
% \end{macrocode} |
| 619 |
% \end{macro} |
| 620 |
% |
| 621 |
% |
| 622 |
% \begin{macro}{\section} |
| 623 |
% Sections are in 14\,pt bold uppercase. They have a decorative |
| 624 |
% rule after heading. The guidelines do not say it, but it seems |
| 625 |
% that a section opens a new page. |
| 626 |
% \begin{macrocode} |
| 627 |
\renewcommand\section{\par\cleardoublepage |
| 628 |
\addpenalty\@secpenalty\nobreak |
| 629 |
\secdef\@section\@ssection} |
| 630 |
% \end{macrocode} |
| 631 |
% \end{macro} |
| 632 |
% |
| 633 |
% \begin{macro}{\@section} |
| 634 |
% This is for numbered sections: |
| 635 |
% \begin{macrocode} |
| 636 |
\def\@section[#1]#2{% |
| 637 |
\ifnum\c@secnumdepth>0\relax |
| 638 |
\refstepcounter{section}% |
| 639 |
\addcontentsline{toc}{section}{% |
| 640 |
\@sectionprefix\thesection\@sectionsuffix |
| 641 |
\texorpdfstring{\quad}{ }#1}% |
| 642 |
\else |
| 643 |
\addcontentsline{toc}{section}{#1}% |
| 644 |
\fi |
| 645 |
{\noindent\raggedright\interlinepenalty\@M |
| 646 |
\large\bfseries |
| 647 |
\ifnum\c@secnumdepth>0\relax |
| 648 |
\@sectionprefix\thesection\@sectionsuffix |
| 649 |
\quad\MakeUppercase{#2}% |
| 650 |
\else |
| 651 |
\MakeUppercase{#2}% |
| 652 |
\fi% |
| 653 |
\\[-10pt]\rule{\textwidth}{3pt}% |
| 654 |
\@afterheading |
| 655 |
\nobreak\par}} |
| 656 |
% \end{macrocode} |
| 657 |
% \end{macro} |
| 658 |
% \begin{macro}{\@ssection} |
| 659 |
% This is for unnumbered sections, Note that even unnumbered |
| 660 |
% sections go into TOC |
| 661 |
% \begin{macrocode} |
| 662 |
\def\@ssection#1{% |
| 663 |
\phantomsection |
| 664 |
\addcontentsline{toc}{section}{#1}% |
| 665 |
{\noindent\raggedright\interlinepenalty\@M |
| 666 |
\large\bfseries |
| 667 |
\MakeUppercase{#1}% |
| 668 |
\\[-10pt]\rule{\textwidth}{3pt}% |
| 669 |
\@afterheading |
| 670 |
\nobreak\par}} |
| 671 |
% \end{macrocode} |
| 672 |
% \end{macro} |
| 673 |
% |
| 674 |
% |
| 675 |
% \begin{macro}{\subsection} |
| 676 |
% Subsections are also bold uppercase |
| 677 |
% \begin{macrocode} |
| 678 |
\renewcommand\subsection{\par |
| 679 |
\addpenalty\@secpenalty\nobreak |
| 680 |
\secdef\@subsection\@ssubsection} |
| 681 |
% \end{macrocode} |
| 682 |
% \end{macro} |
| 683 |
% |
| 684 |
% \begin{macro}{\@subsection} |
| 685 |
% Numbered subsections: |
| 686 |
% \begin{macrocode} |
| 687 |
\def\@subsection[#1]#2{% |
| 688 |
% \changes{v0.3}{2010/02/28}{Deleted |\MakeUppercase|} |
| 689 |
\ifnum\c@secnumdepth>1\relax |
| 690 |
\refstepcounter{subsection}% |
| 691 |
\addcontentsline{toc}{subsection}{% |
| 692 |
\thesubsection\texorpdfstring{\quad}{ }#1}% |
| 693 |
\else |
| 694 |
\addcontentsline{toc}{subsection}{#1}% |
| 695 |
\fi |
| 696 |
{\noindent\raggedright\interlinepenalty\@M |
| 697 |
\normalsize\bfseries |
| 698 |
\ifnum\c@secnumdepth>0\relax |
| 699 |
\thesubsection\quad#2% |
| 700 |
\else% |
| 701 |
#2% |
| 702 |
\fi% |
| 703 |
\@afterheading |
| 704 |
\nobreak\par}} |
| 705 |
% \end{macrocode} |
| 706 |
% \end{macro} |
| 707 |
% |
| 708 |
% \begin{macro}{\@ssubsection} |
| 709 |
% \changes{v0.3}{2010/02/28}{Deleted |\MakeUppercase|} |
| 710 |
% Unnumbered subsections: |
| 711 |
% \begin{macrocode} |
| 712 |
\def\@ssubsection#1{% |
| 713 |
\phantomsection |
| 714 |
\addcontentsline{toc}{subsection}{#1}% |
| 715 |
{\noindent\raggedright\interlinepenalty\@M |
| 716 |
\normalsize\bfseries |
| 717 |
#1% |
| 718 |
\@afterheading |
| 719 |
\nobreak\par}} |
| 720 |
% \end{macrocode} |
| 721 |
% \end{macro} |
| 722 |
% |
| 723 |
% |
| 724 |
%\subsection{Appendix} |
| 725 |
%\label{sec:appendix} |
| 726 |
% |
| 727 |
% \begin{macro}{\appendix} |
| 728 |
% \changes{v0.4}{2010/03/01}{Changed appendices to be sections rather |
| 729 |
% than subsections} |
| 730 |
% \changes{v0.3}{2010/02/28}{Added macro} |
| 731 |
% \changes{v0.4}{2010/03/02}{Typo corrected} |
| 732 |
% Appendix changes the numbering |
| 733 |
% of sections and the formatting of section entries. |
| 734 |
% \begin{macrocode} |
| 735 |
\renewcommand\appendix{% |
| 736 |
\setcounter{chapter}{0}% |
| 737 |
\setcounter{section}{0}% |
| 738 |
\renewcommand \thesection{\@Alph\c@section}% |
| 739 |
\renewcommand \thesubsection{\@Alph\c@section.\@arabic\c@subsection}% |
| 740 |
\def\@sectionprefix{Appendix~}% |
| 741 |
\def\@sectionsuffix{:}} |
| 742 |
% \end{macrocode} |
| 743 |
% |
| 744 |
% \end{macro} |
| 745 |
% |
| 746 |
%\subsection{Special Sections} |
| 747 |
%\label{sec:special} |
| 748 |
% |
| 749 |
% Since our unnumbered sections go to the toc, we need to redefine |
| 750 |
% table of contents, list of figures, list of tables, bibliography and |
| 751 |
% index. |
| 752 |
% |
| 753 |
% \begin{macro}{\specialsection} |
| 754 |
% A section that does not go into TOC\dots |
| 755 |
% \begin{macrocode} |
| 756 |
\def\specialsection#1{% |
| 757 |
\par\cleardoublepage |
| 758 |
\addpenalty\@secpenalty\nobreak |
| 759 |
{\noindent\raggedright\interlinepenalty\@M |
| 760 |
\large\bfseries |
| 761 |
\MakeUppercase{#1}% |
| 762 |
\\[-10pt]\rule{\textwidth}{3pt}% |
| 763 |
\@afterheading |
| 764 |
\nobreak\par}} |
| 765 |
% \end{macrocode} |
| 766 |
% \end{macro} |
| 767 |
% |
| 768 |
% \begin{macro}{\tableofcontents} |
| 769 |
% TOC: |
| 770 |
% \begin{macrocode} |
| 771 |
\renewcommand\tableofcontents{% |
| 772 |
\specialsection{\contentsname}% |
| 773 |
\@starttoc{toc}} |
| 774 |
% \end{macrocode} |
| 775 |
% \end{macro} |
| 776 |
% \begin{macro}{\listoffigures} |
| 777 |
% LOF: |
| 778 |
% \begin{macrocode} |
| 779 |
\renewcommand\listoffigures{% |
| 780 |
\specialsection{\listfigurename}% |
| 781 |
\@starttoc{lof}} |
| 782 |
% \end{macrocode} |
| 783 |
% \end{macro} |
| 784 |
% \begin{macro}{\listoftables} |
| 785 |
% LOT: |
| 786 |
% \begin{macrocode} |
| 787 |
\renewcommand\listoftables{% |
| 788 |
\specialsection{\listtablename}% |
| 789 |
\@starttoc{lot}} |
| 790 |
% \end{macrocode} |
| 791 |
% \end{macro} |
| 792 |
% |
| 793 |
% \begin{macro}{\thebibliography} |
| 794 |
% Bibliography uses |\section*| instead of |\chapter*|: |
| 795 |
% \begin{macrocode} |
| 796 |
\renewenvironment{thebibliography}[1] |
| 797 |
{\section*{\bibname}% |
| 798 |
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}% |
| 799 |
\list{\@biblabel{\@arabic\c@enumiv}}% |
| 800 |
{\settowidth\labelwidth{\@biblabel{#1}}% |
| 801 |
\leftmargin\labelwidth |
| 802 |
\advance\leftmargin\labelsep |
| 803 |
\@openbib@code |
| 804 |
\usecounter{enumiv}% |
| 805 |
\let\p@enumiv\@empty |
| 806 |
\renewcommand\theenumiv{\@arabic\c@enumiv}}% |
| 807 |
\sloppy |
| 808 |
\clubpenalty4000 |
| 809 |
\@clubpenalty \clubpenalty |
| 810 |
\widowpenalty4000% |
| 811 |
\sfcode`\.\@m} |
| 812 |
{\def\@noitemerr |
| 813 |
{\@latex@warning{Empty `thebibliography' environment}}% |
| 814 |
\endlist} |
| 815 |
% \end{macrocode} |
| 816 |
% \end{macro} |
| 817 |
% |
| 818 |
% |
| 819 |
% \begin{macro}{\theindex} |
| 820 |
% Same with the index: |
| 821 |
% \begin{macrocode} |
| 822 |
\renewenvironment{theindex} |
| 823 |
{\section*{\indexname}% |
| 824 |
\parskip\z@ \@plus .3\p@\relax |
| 825 |
\columnseprule \z@ |
| 826 |
\columnsep 35\p@ |
| 827 |
\let\item\@idxitem} |
| 828 |
{\clearpage} |
| 829 |
% \end{macrocode} |
| 830 |
% |
| 831 |
% \end{macro} |
| 832 |
% |
| 833 |
% \subsection{The final word} |
| 834 |
%\label{sec:final} |
| 835 |
% |
| 836 |
% \begin{macrocode} |
| 837 |
%</class> |
| 838 |
% \end{macrocode} |
| 839 |
% |
| 840 |
%\Finale |
| 841 |
%\clearpage |
| 842 |
% |
| 843 |
%\PrintChanges |
| 844 |
%\clearpage |
| 845 |
%\PrintIndex |
| 846 |
% |
| 847 |
\endinput |