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