summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/erdc/erdc.dtx
blob: d27dc6f14f19347bcb81b1a386e4022898255fed (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
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
% \iffalse
% $Id: erdc.dtx,v 1.31 2009-07-24 19:46:11 boris Exp $
%
% Copyright 2008, 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 erdc.dtx and the
% derived file erdc.cls
%
% \fi 
% \CheckSum{1374}
%
%
%% \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 and amsdtx.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}
% \def\cls#1{\texttt{#1}}
% \def\cs#1{\textbackslash\texttt{#1}}
% \let\cn\cs
%\makeatother
% \newcommand{\progname}[1]{\textsf{#1}}
%
% \MakeShortVerb{|}
% \GetFileInfo{erdc.dtx}
% \title{\LaTeX{} Style For Technical Information
%                  Reports of the Engineer Research and
%                  Development Center
%   \thanks{\copyright 2009, 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 Technical Information
%   Reports of the Engineer Research and Development Center, US Army
%   Corps of Engineers.
% \end{abstract}
% \tableofcontents
%
% \clearpage
% \changes{v0.1}{2009/03/20}{First fully functional version} 
% \changes{v1.0}{2009/07/22}{Bug fixes} 
% \changes{v1.1}{2009/07/22}{Documentation Update} 
%
%\section{Introduction}
%\label{sec:intro}
%
% Technical publications for Engineer Research and Development Center,
% US Army Corps of Engineers follow an elaborate
% style~\cite{ERDC_Guide}.  This style is accompanied by templates for
% a popular word processor software.  In this class, commissioned by US
% Army Corps of Engineers, we try to recreate this style for \LaTeX.
%
% There are several kinds of documents described by~\cite{ERDC_Guide}:
% Technical Report, Technical Note, Miscellaneous Paper, Contract
% Report, Letter Report, Monograph, Special Report, Brochure.  In this
% class we follow the guidelines for Technical Reports (TR).  However,
% it can be used for other kinds of documents as long as they do not
% differ much from Technical Reports.  
%
%
%\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{mathgifg}~\cite{Mathgifg}: the
% \LaTeX{} package providing the access to Microsoft Georgia and ITC
% Franklin Gothic.
% 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},
% \progname{ragged2e}~\cite{Schroeder03:Ragged2e},
% \progname{longtable}~\cite{Carlisle04:Longtable},
% \progname{dcolumn}~\cite{Carlisle01:Dcolumn}.
% \progname{fancyhdr}~\cite{Oostrum04:Fancyhdr},
% \progname{natbib}~\cite{Daly07:Natbib} and
% \progname{amsmath}~\cite{amsldoc}.
%
%
% The installation of the class follows the usual
% practice~\cite{TeXFAQ} for \LaTeX{} packages:
% \begin{enumerate}
% \item Run \progname{latex} on |erdc.ins|.  This will produce the
% \LaTeX{} class |erdc.cls|.
% \item Put the files |erdc.cls|, |red_corps_castle2.eps| and
%   |red_corps_castle2.pdf| 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 |erdc.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 |erdc.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}|]{erdc}|
% \end{flushleft}
%
% The class should work both with |latex| and |pdflatex| work flows.
% Accordingly it is supplied with US Army Corps of Engineers in both
% EPS and PDF formats.  
%
%
% 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 the font sizes of the
% class are fixed by the guidelines~\cite{ERDC_Guide}. 
%
%
%\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{\laboratory}
% The cover page of the Technical Report should have the center name
% for Center-level reports or laboratory name for laboratory level
% reports.  By default a technical report is assumed to be a
% Center-level one, and the center name (Engineering Research and
% Development Center) is printed in the cover page.  The macro
% |\laboratory|\marg{Laboratory Name} overrides this default, for example:
% \begin{verbatim}
% \laboratory{Cold Regions Research and Engineering Laboratory}
% \end{verbatim}
% A line break command |\\| can be used inside this command to achieve
% a desirable line break in the laboratory name if the automatic one
% is not right.
%
% 
% \DescribeMacro{\reportnum}
% The command |\reportnum|\marg{Report Number} is used to store the
% project number.  For example,
% \begin{verbatim}
% \reportnum{ERDC/CRREL SR-05-78}
% \end{verbatim}
% The report number should include the laboratory abbreviation as its
% prefix.  
%
% \DescribeMacro{\program}
% The command |\program|\marg{Program Title} is used to store the
% title of the program.  For example,
% \begin{verbatim}
% \program{Military Engineering Technology}
% \end{verbatim}
% 
% \DescribeMacro{\title} The command |\title| is used to store project
% name:  |\title|\marg{Title}.  For example:
% \begin{verbatim}
% \title{A New Project}
% \end{verbatim}
% 
% \DescribeMacro{\subtitle}
% The command |\subtitle|\marg{Sub Title} us used to store the project
% subtitle.  For example,
% \begin{verbatim}
% \subtitle{Model Investigation}
% \end{verbatim}
% 
% \DescribeMacro{\date}
% The macro |\date| stores the date of the document, for example
% \begin{verbatim}
% \date{March 2009}
% \end{verbatim}
%
%
% \DescribeMacro{\author}
% \DescribeMacro{\affiliation}
% \DescribeMacro{\and}
% The macro |\author|\marg{Authors} stores the
% names of authors that share the same affiliation.  The authors with
% the same affiliation 
% should be listed in the same |\author| macro, separated by the
% keyword |\and|.  Do not put commas and the word ``and'' between the
% authors' names:  \LaTeX{}
% will take care of the proper punctuation.  The macro
% |\affiliation|\marg{Affiliation} stores the affiliation of the
% authors immediately preceding this command.  If a report is prepared
% by several laboratories, or a laboratory and an outside contractor,
% then you should list the authors with the same affiliation, then
% show the affiliation, then repeat for the next affiliation.  For example:
% \begin{verbatim}
% \author{A. U. Thor \and C. O. R. Respondent \and C. O. Author}
% \affiliation{Construction Engineering Research Laboratory\\
%   U.S. Army Engineer Research and Development Center\\
%   2902 Newmark Drive\\
%   Champaign, IL 61826-9005}
% \author{John M. Smith}
% \affiliation{Coastal and Hydraulics Laboratory\\
%   U.S. Army Engineer Research and Development Center\\
%   3909 Halls Ferry Road\\
%   Vicksburg, MS 39180-6199}
% \end{verbatim}
% Note that the guidelines~\cite{ERDC_Guide} do not say how to typeset
% the authors that have several affiliations.  Accordingly we do not
% deal with this case here.
%
% \DescribeMacro{\coverart}
% It is recommended to put some artwork on the cover of the title
% page.  It is set up by
% the command |\coverart[|\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 graphics.  By default the graphics is scaled
% to cover the full width of the page.  Note that our class uses the
% ``extended'' version \progname{graphicx} of the package with its
% ``key-value'' syntax.  For example,
% \begin{verbatim}
% \coverart[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{\reporttype}
% The type of the report is stored in the macro
% |\reporttype|\marg{type}, for example:
% \begin{verbatim}
% \reporttype{Final Report}
% \end{verbatim}
% 
% \DescribeMacro{\distribution}
% All reports should have a distribution statement.  There are several
% standard distribution statements, approved by  Department of Defense
% Directive~5230.24~\cite{DoD5230.24}.  By default the reports have
% Statement~A: \emph{Approved for public release; distribution is
% unlimited.}  To change the default, use the macro
% |\distribution|\marg{Distribution Statement}, for example
% \begin{verbatim}
% \distribution{Distribution authorized to U.S. Government Agencies
% only; Test and Evaluation; November 2005.  Other requests should be
% referred to U.S. Army Engineer Research and Development Center}
% \end{verbatim}
% 
% \DescribeMacro{\preparedfor}
% By default the reports have the phrase \emph{Prepared for U.S. Army
% Corps of Engineers, Washington, DC 20314-1000} on the title page.
% To change this designation, use the command |\preparedfor|, for
% example,
% \begin{verbatim}
% \preparedfor{U.S. Army Engineer Research and Development Center\\
% 3909 Halls Ferry Road, Vicksburg, MS 39180-6199} 
% \end{verbatim}
% To delete this phrase altogether, use |\preparedfor{}|.
%
% \DescribeMacro{\contractnum}
% Contract or work unit number is set by |\contractnum| command, for example
% \begin{verbatim}
% \contractnum{Work Unit 33143}
% \end{verbatim}
% 
% \DescribeMacro{\monitoredby}
% Contract reports are monitored by a controlling laboratory.  Its
% name and address is set by this command, for example
% \begin{verbatim}
% \monitoredby{U.S. Army Engineer Research and Development Center\\
% 3909 Halls Ferry Road, Vicksburg, MS 39180-6199}
% \end{verbatim}
% 
%
%
% \DescribeMacro{\additionalinfo}
% The command |\additionalinfo|\marg{Additional Information} is used
% to store additional information for the title page, for example,
% \begin{verbatim}
% \additionalinfo{Supercedes TR-2345-12345}
% \end{verbatim}
% 
% \DescribeMacro{abstract}
% The abstract of the report is set using the environment |abstract|:
% \begin{verbatim}
% \begin{abstract}
%   This report disusses spins of electrons, protons and other
%   fermions. 
% \end{abstract}
% \end{verbatim}
% 
% \DescribeMacro{\disclaimer}
% By default all reports have the standard disclaimer.  If its text
% should be changed for any reason, use the macro
% |\disclaimer|\marg{New Disclaimer}, for example
% \begin{verbatim}
% \disclaimer{The contents of this report are not to be used for
% advertising, publication, or promotional purposes. Citation of trade
% names does not constitute an official endorsement or approval of the
% use of such commercial products. All product names and trademarks
% cited are the property of their respective owners. The findings of
% this report are not to be construed as an official Department of the
% Army position unless so designated by other authorized documents. 
%
% \textbf{DESTROY THIS REPORT WHEN NO LONGER NEEDED. DO NOT RETURN IT
% TO THE ORIGINATOR.}}
% \end{verbatim}
% 
%
% \DescribeMacro{\maketitle}
% The command |\maketitle| typesets the cover page, title page and
% abstract page
% of the report based on the data supplied by the macros above.  It
% should therefore be issued \emph{after} these macros.
%
%
% \DescribeMacro{\tableofcontents}
% \DescribeMacro{\listoffigures}
% \DescribeMacro{\listoftables}
% \DescribeMacro{\listoffiguresandtables}
% Table of contents is typeset with
% the usual \LaTeX{} command~\cite{Lamport94} |\tableofcontents|.
% This situation with the list of tables and the list of figures is
% slightly more involved.  The guidelines~\cite{ERDC_Guide} require
% the authors to combine the lists into the common list called
% ``Figures and Tables'', which is subdivided into Figures and
% Tables.  The heading of this joint list is a chapter heading, while
% the headings of the sublists are on the section level.  However, the
% guidelines say nothing about the situation where a report has only
% figures or only tables.  Therefore we chose the following solution:
% \begin{enumerate}
% \item If you have \emph{both} figures and tables, use 
%   |\listoffiguresandtables|.  It will automatically typeset both
%   lists according to the requirements~\cite{ERDC_Guide}
% \item If you have \emph{only} figures or \emph{only} tables, use either
%   |\listoffigures| or |\listoftables| correspondingly.  In this case
%   the heading will be typeset on the chapter level.
% \item If you have neither (probably a rare situation), do not use
%   any of these commands.
% \end{enumerate}
% 
% \DescribeMacro{\chapter}
% In the front matter the command |\chapter| produces an
% \emph{unnumbered} chapter, so the commands |\chapter{Preface}| and
% |\chapter*{Preface}|  give the same result (see also
% Section~\ref{sec:ug_mainmatter} below).
%
%
%\subsection{Main Matter}
%\label{sec:ug_mainmatter}
%
% \DescribeMacro{\mainmatter}
% The main matter starts with the macro |\mainmatter|.  The text is
% divided into chapters, sections and subsections in the usual
% \LaTeX{} manner. 
% All familiar \LaTeX{} commands and packages should work without
% problems.  Note that unlike articles, reports have chapters as the
% highest subdivisions.  The chapters are numbered, while sections and
% subsections are not.
%
% \DescribeMacro{\chapter}
% \DescribeMacro{\chapter*}
% One important difference between the standard \LaTeX{} and our class
% is the following.  In standard \LaTeX{} the starred command
% |\chapter*| produces an unnumbered chapter, that does not go into
% the table of contents.  In our class \emph{all} chapters, numbered
% or not, go into the table of contents.
%
% Tables should have the caption \emph{above} the tabular material
% rather than below it as in standard \LaTeX.  The class automatically
% sets the proper spacing for this arrangement, but it is the user's
% responsibility to put the |\caption| command before the |tabular|
% environment, for example
% \begin{verbatim}
% \begin{table}
%   \centering
%   \caption{Yearly Dividens}
%   \label{tab:dividends}
%   \footnotesize\sffamily
%   \begin{tabular}{||l|D{.}{.}{2.2}||}
%     \hline\hline
%     \textbf{Year}  &  \multicolumn{1}{|c||}{\textbf{Dividends, \%}}\\
%     \hline\hline
%     $1880$  & 2.50  \\
%     \hline
%     $1881$  & 12.1  \\
%     \hline
%     $1882$  & 2.6  \\
%     \hline\hline
%   \end{tabular}
% \end{table}
% \end{verbatim}
% Note that the guidelines~\cite{ERDC_Guide} recommend excessive rules
% in the tables, with borders around the cells, as shown in the
% example above.  This is usually frowned upon in the good typesetting
% practice.  
%
% The guidelines~\cite{ERDC_Guide} recommend use footnotesize sans
% serif entries in the tables itself.  The class does \emph{not} do
% this automatically:  the users should put |\footnotesize\sffamily|
% before |\begin{tabular}|, as shown in the example above.
%
% The guidelines require the centering of numerical columns on decimal
% point.  The class automatically loads \progname{dcolumn} package, so
% to get aligned columns use the special column designator
% |D{.}{.}|\marg{n.m} where $n$ and $m$ are the numbers of decimal
% points before and after the dot correspondingly. It is possible to
% achieve other effects with this package like centering on the
% multiplication sign;  see the
% documentation~\cite{Carlisle01:Dcolumn} for further information.  
% 
% \DescribeMacro{\fbox}
% The guidelines~\cite{ERDC_Guide} require the graphics to be
% surrounded by a hairline box.  This is done by the standard |\fbox|
% command, for example
% \begin{verbatim}
% \begin{figure}
%   \centering
%   \fbox{\includegraphics[width=3in]{plot}}
%   \caption{Plot of $f(x)$}
%   \label{fig:plot}
% \end{figure}
% \end{verbatim}
% 
% The guidelines~\cite{ERDC_Guide} require equations to be
% individually centered.
% This probably precludes the use of |eqnarray| environment and such
% \progname{amsmath} constructions as |align|, |aligned|, |alignedat|
% etc. 
%
%
%
%\subsection{Back Matter}
%\label{sec:ug_backmatter}
%
% \DescribeMacro{\appendix} 
% Back matter in ERDC reports consists of
% the bibliography, appendices and distribution forms.  The standard
% \LaTeX{} command |\appendix| changes the numeration of chapters
% according to the rules~\cite{ERDC_Guide}.  It should be issued after
% the bibliography, but before the appendices.
%
% 
% The reports should contain Form~298 (see, for example,
% \url{http://www.ntis.gov/pdf/rdpform.pdf}).  This form should be
% typeset separately.
%
%\StopEventually{%
%
%\subsection{Acknowledgements}
%\label{sec:ack}
%
% 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 Gordon L. Cohen, ERDC-ITL-IL for the detailed
% explanations of the ERDC guidelines, to Christopher E. Kees,
% ERDC-CHL-MS and Ryan E. North, ERDC-GSL-MS, for the formatting
% suggestions and the patient 
% recompilation of the reports with each new version of the style.
%
% \clearpage
% \bibliography{erdc}
% \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{erdc.dtx}
%</gobble>
%<class>\ProvidesClass{erdc}
[2009/07/22 v1.1 Typesetting Technical Information Reports of 
the Engineer Research and Development Center (ERDC), 
US Army Corps of Engineers]
%    \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{erdc.dtx}
\end{document}
%</gobble> 
%<*class>
%    \end{macrocode}
%
%
%\subsection{Options}
%\label{sec:options}
%
% \begin{macro}{\erdc@size@warning}
% The font-changing options are not used in our setup, so we just
% produce a warning:
%    \begin{macrocode}
\long\def\erdc@size@warning#1{%
  \ClassWarning{erdc}{Size-changing option #1 will not be
    honored}}%
\DeclareOption{8pt}{\erdc@size@warning{\CurrentOption}}%
\DeclareOption{9pt}{\erdc@size@warning{\CurrentOption}}%
\DeclareOption{10pt}{\erdc@size@warning{\CurrentOption}}%
\DeclareOption{11pt}{\erdc@size@warning{\CurrentOption}}%
\DeclareOption{12pt}{\erdc@size@warning{\CurrentOption}}%      
%    \end{macrocode}
% \end{macro}
%
% All other options are just sent to the main class:
%    \begin{macrocode}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions\relax
%    \end{macrocode}
% 
%\subsection{Loading Class and Packages}
%\label{sec:loading}
%
% We start with the base class and some packages
%    \begin{macrocode}
\LoadClass[12pt,twoside]{report}
\RequirePackage{graphicx,color,caption,longtable}
%    \end{macrocode}
%
%
% \changes{v0.2}{2009/07/07}{Added dcolumn} 
% We use \progname{dcolumn} for dot-centered columns:
%    \begin{macrocode}
\RequirePackage{dcolumn}
%    \end{macrocode}
% 
% \changes{v0.3}{2009/07/18}{Added natbib} 
% We use \progname{natbib}~\cite{Daly07:Natbib} for bibliography
% formatting:
%    \begin{macrocode}
\RequirePackage{natbib}
\renewcommand{\bibfont}{\fontsize{10pt}{12pt}\selectfont}
\setlength{\bibhang}{0.5in}
\setlength{\bibsep}{12pt}
%    \end{macrocode}
% 
% \changes{v0.3}{2009/07/18}{Added amsmath} 
% We load \progname{amsmath} since we want to change the equation
% numbering scheme:  \progname{amsmath} redefines it.
%    \begin{macrocode}
\RequirePackage{amsmath}
%    \end{macrocode}
%
% \changes{v0.2}{2009/07/07}{Added ragged2e} 
% We do not want the option |document| with \progname{ragged2e}: this
% calls \progname{footmisc}, while we want our own footnotes:
%    \begin{macrocode}
\RequirePackage[originalcommands]{ragged2e}
\setlength\RaggedRightParindent{\parindent}
\RaggedRight
%    \end{macrocode}
%
%\subsection{Fonts}
%\label{sec:fonts}
%
%\begin{macro}{\normalsize}
% \changes{v0.2}{2009/07/07}{Changed line spacing} 
% The size is basically from~\cite{classes}, but with some changes
% according to our fonts:
%    \begin{macrocode}
\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xiipt{16}%
   \abovedisplayskip 16\p@ \@plus3\p@ \@minus7\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\normalsize
%    \end{macrocode}
%\end{macro}
%
%
% \changes{v0.2}{2009/07/07}{Changed fonts} 
%
% We use Georgia for the main font, matching Franklin Gothic for
% the sans serifed font, and Courier for the monospaced font:
%    \begin{macrocode}
\usepackage{mathgifg}
\usepackage{courier}
%    \end{macrocode}
% 
% \begin{macro}{\@laboratoryfont}
% \changes{v0.2}{2009/07/07}{Introduced the macro} 
%   Font to typeset the laboratory on the cover
%    \begin{macrocode}
\def\@laboratoryfont{%
  \sffamily\bfseries\fontsize{22pt}{25pt}\selectfont}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@reportnumfont}
% \changes{v0.2}{2009/07/07}{Introduced the macro} 
%   Font to typeset the report number on the cover
%    \begin{macrocode}
\def\@reportnumfont{%
  \sffamily\bfseries\fontsize{18pt}{22pt}\selectfont}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\@programfont}
% \changes{v0.2}{2009/07/07}{Introduced the macro} 
% \changes{v0.3}{2009/07/18}{Changhed weight to Book} 
%   Font to typeset the program on the cover
%    \begin{macrocode}
\def\@programfont{%
  \sffamily\fontseries{k}\itshape\normalsize\selectfont}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@titlefont}
% \changes{v0.2}{2009/07/07}{Introduced the macro} 
%   Font to typeset the title on the cover \emph{and} chapter numbers
%    \begin{macrocode}
\def\@titlefont{%
  \sffamily\fontseries{h}\fontsize{20pt}{25pt}\selectfont}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@distributionfont}
% \changes{v0.3}{2009/07/18}{Introduced the macro} 
%   Font to typeset the distribution statement
%    \begin{macrocode}
\def\@distributionfont{%
  \sffamily\fontseries{k}\fontsize{9pt}{11pt}\selectfont}
%    \end{macrocode}   
% \end{macro}
%
%
% \begin{macro}{\@eqtagfont}
% \changes{v0.3}{2009/07/18}{Introduced the macro} 
%   The font for the equations
%    \begin{macrocode}
\def\@eqtagfont{\sffamily\bfseries\footnotesize}
%    \end{macrocode}
%   
% \end{macro}
%
%\subsection{Page Dimensions and Paragraphing}
%\label{sec:page}
%
% \changes{v1.1}{2009/07/22}{Changed bottom margin to 0.7''} 
% 
% The requirements are 1.25'' (top), 0.7'' (bottom), 1.5'' (left), and
% 1.5'' (right). However, we need to add for the headers.
%    \begin{macrocode}
\RequirePackage[letterpaper, top=1in, bottom=0.7in, 
  left=1.5in, right=1.5in]{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}
%
% \begin{macro}{\labelwidth}
% \changes{v1.1}{2009/07/22}{Changed defaults} 
% The width of label for enumerate and itemize environments
%    \begin{macrocode}
\setlength\labelwidth{1em}
%    \end{macrocode}
% 
% \end{macro}
%
%
% \begin{macro}{\leftmargini}
% \changes{v1.1}{2009/07/22}{Changed defaults} 
% We align lists with the body
%    \begin{macrocode}
\setlength\leftmargini\z@
\addtolength\leftmargini\labelwidth
\addtolength\leftmargini\labelsep
%    \end{macrocode}
% 
% \end{macro}
%
% \begin{macro}{\itemize}
% \changes{v1.1}{2009/07/22}{Changed defaults} 
%   We want left-aligned bullets:
%    \begin{macrocode}
\def\itemize{%
  \ifnum \@itemdepth >\thr@@\@toodeep\else
    \advance\@itemdepth\@ne
    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
    \expandafter
    \list
      \csname\@itemitem\endcsname
      {\def\makelabel##1{##1}}%
  \fi}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\enumerate}
% \changes{v1.1}{2009/07/22}{Changed defaults} 
% We left-align numbers
%    \begin{macrocode}
\def\enumerate{%
  \ifnum \@enumdepth >\thr@@\@toodeep\else
    \advance\@enumdepth\@ne
    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
      \expandafter
      \list
        \csname label\@enumctr\endcsname
        {\usecounter\@enumctr\def\makelabel##1{##1}}%
      \fi}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\widowpenalty}
% \begin{macro}{\clubpenalty}
% \changes{v1.1}{2009/07/22}{Changed settings} 
%   We forbid widows and clubs.  To prevent too extended pages we use
%   |\raggedbottom|:
%    \begin{macrocode}
\widowpenalty=10000
\clubpenalty=10000
\raggedbottom
%    \end{macrocode}
%   
% \end{macro}
% \end{macro}
%
%
%\subsection{Headers and Footers}
%\label{sec:headers}
% 
% We use \progname{fancyhdr}:
%    \begin{macrocode}
\RequirePackage{fancyhdr}
%    \end{macrocode}
% 
%
% \begin{macro}{\headrulewidth}
% \changes{v0.3}{2009/07/18}{Chaneged thickness}  
% \begin{macro}{\footrulewidth}
%   Decorative rules:
%    \begin{macrocode}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\fancyhfoffset}
%   Headers are wider than the text
%    \begin{macrocode}
\fancyhfoffset{35pt}
%    \end{macrocode}
%   
% \end{macro}
%
% We do not have headers:
%    \begin{macrocode}
\pagestyle{fancy}
\lhead{\textsf{\textbf{\footnotesize\@reportnum}}}
\rhead{\textsf{\textbf{\footnotesize\thepage}}}
\chead{}
%    \end{macrocode}
%
% We do not have footers:
%    \begin{macrocode}
\lfoot{}
\cfoot{}
\rfoot{}
%    \end{macrocode}
% 
%
%
%\subsection{Main Subdivisions}
%\label{sec:subdivisions}
%
% \begin{macro}{\if@frontmatter}
%   The switch whether we are in the frontmatter
%    \begin{macrocode}
\newif\if@frontmatter
\@frontmatterfalse
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\if@appendix}
%   The switch whether we are in the appendix
%    \begin{macrocode}
\newif\if@appendix
\@appendixfalse
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\frontmatter}
%   Starting front matter
%    \begin{macrocode}
\def\frontmatter{%
  \pagenumbering{roman}%
  \@frontmattertrue
  \@appendixfalse}
%    \end{macrocode}   
% \end{macro}
%
% 
% \begin{macro}{\mainmatter}
%   Starting main matter
%    \begin{macrocode}
\def\mainmatter{%
  \cleardoublepage
  \pagenumbering{arabic}%
  \@frontmatterfalse
  \@appendixfalse}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\appendix}
%   Start appendices
%    \begin{macrocode}
\def\appendix{%
  \clearpage
  \@frontmatterfalse
  \@appendixtrue
  \@addtoreset{table}{chapter}%
  \@addtoreset{equation}{chapter}%
  \@addtoreset{figure}{chapter}%
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\appendixname}%
  \gdef\thechapter{\@Alph\c@chapter}%
  \gdef\thefigure{\@Alph\c@chapter\@arabic\c@figure}%
  \gdef\thetable{\@Alph\c@chapter\@arabic\c@table}%
  \gdef\theequation{\@Alph\c@chapter\@arabic\c@equation}}
%    \end{macrocode}
%   
% \end{macro}
%
%\subsection{Cover and Title Pages}
%\label{sec:cover_title}
%
%
%
%
% \begin{macro}{\laboratory}
%   This macro sets up the laboratory name:
%    \begin{macrocode}
\def\laboratory#1{\gdef\@laboratory{#1}}
\laboratory{Engineer Research and\\Development Center}
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\reportnum}
%   Report number:
%    \begin{macrocode}
\def\reportnum#1{\gdef\@reportnum{#1}}
\reportnum{ERDC TR-01-01}
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\program}
%   Program:
%    \begin{macrocode}
\def\program#1{\gdef\@program{#1}}
\program{}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\subtitle}
%   Subtitle:
%    \begin{macrocode}
\newcommand{\subtitle}[1]{\gdef\@subtitle{#1}}
\def\@subtitle{}
%    \end{macrocode}
% \end{macro}
%
%
% The author and affiliation processing follows the ideas
% of~\cite{Downes04:amsart}.  We lift most of the code from there.
% \begin{quotation}
% \em
%    The general function to convert a list of items in the form
%\begin{verbatim}
% A\and B\and C\and D
%\end{verbatim}
%    to the form `A, B, C, and D' is \cs{xandlist}:
%\begin{verbatim}
% \xandlist{, }{ and }{, and }{A\and B\and C\and D}
%\end{verbatim}
%    This is a completely expandable macro, with the return value being
%    the converted list. There is also a `no-execute' version whose
%    fourth argument should be a macro; the text to be converted will be
%    taken from that macro and after conversion will be put back as the
%    macro's new replacement text.
%\begin{verbatim}
%      \nxandlist{, }{ and }{, and }\result
%\end{verbatim}
%    I don't think I want to explain this except by recommending that
%    you watch it in operation with \cs{tracingmacros} if you're
%    interested. [mjd,1994/10/19]
%    \begin{macrocode}
\newcommand{\xandlist}[4]{\@andlista{{#1}{#2}{#3}}#4\and\and}
\def\@andlista#1#2\and#3\and{\@andlistc{#2}\@ifnotempty{#3}{%
  \@andlistb#1{#3}}}
\def\@andlistb#1#2#3#4#5\and{%
  \@ifempty{#5}{%
    \@andlistc{#2#4}%
  }{%
    \@andlistc{#1#4}\@andlistb{#1}{#3}{#3}{#5}%
  }}
\let\@andlistc\@iden
\newcommand{\nxandlist}[4]{%
  \def\@andlistc##1{\toks@\@xp{\the\toks@##1}}%
  \toks@{\toks@\@emptytoks \@andlista{{#1}{#2}{#3}}}%
  \the\@xp\toks@#4\and\and
  \edef#4{\the\toks@}%
  \let\@andlistc\@iden}
%    \end{macrocode}
%
%  \begin{macro}{andify}
%
%    The \cs{andify} function is provided as a convenient abbreviation
%    for the most common case.  See also \cs{author@andify} (for
%    \cls{amsart} and \cls{amsproc} only), which gives better results
%    in cases with a large number of authors.  Provide a substitutable
%    text string to simplify language-specific modifications.
%    \begin{macrocode}
\def\@@and{and}
\newcommand{\andify}{%
  \nxandlist{\unskip, }{\unskip{} \@@and~}{\unskip, \@@and~}}
%    \end{macrocode}
%    Override the funny default definition of \cn{and} from \LaTeX.
%    This is not actually used by AMS classes, however.
%    \begin{macrocode}
\def\and{\unskip{ }\@@and{ }\ignorespaces}
%    \end{macrocode}
%  \end{macro}   
% \end{quotation}
%   This requires some other AMS math macros:
%    \begin{macrocode}
\let\@xp\expandafter\relax
\let\@nx=\noexpand
\def\@oparg#1[#2]{\@ifnextchar[{#1}{#1[#2]}}
\long\def\@ifempty#1{\@xifempty#1@@..\@nil}
\long\def\@xifempty#1#2@#3#4#5\@nil{%
  \ifx#3#4\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}
\long\def\@ifnotempty#1{\@ifempty{#1}{}}
\def\setboxz@h{\setbox\z@\hbox}
\def\@addpunct#1{%
  \relax\ifhmode
    \ifnum\spacefactor>\@m \else#1\fi
  \fi}
\newtoks\@emptytoks
%    \end{macrocode}
%
%
% \begin{macro}{\authors}
%   The full authors lists
%    \begin{macrocode}
\def\authors{}
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\addresses}
%   The list of authors \emph{and} addresses
%    \begin{macrocode}
\def\addresses{}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\author}
%   This also follows AMS ideas
%    \begin{macrocode}
\def\author#1{%
  \ifx\@empty\authors\gdef\authors{#1}\else
  \g@addto@macro{\authors}{\and#1}\fi
  \ifx\@empty\@addresses\gdef\addresses{\author{#1}}\else
  \g@addto@macro{\addresses}{\par\author{#1}}\fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\affiliation}
%   And affiliation
%    \begin{macrocode}
\def\affiliation#1{%
  \ifx\@empty\@addresses\gdef\addresses{#1\par}\else
  \g@addto@macro{\addresses}{#1\par\vspace{\baselineskip}}\fi}
%    \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}{\coverart}
% \changes{v0.2}{2009/07/08}{Changed the width of cover art} 
%   The |\logo| command has the same format as |\includegraphics|.  It
%   actually sets up |\includegraphics| in |\maketitle|.
%    \begin{macrocode}
\newcommand{\coverart}[2][]{%
  \def\@tempa{#1}%
  \ifx\@empty\@tempa
     \gdef\@coverart{\includegraphics[width=435\p@]{#2}}\else
     \gdef\@coverart{\includegraphics[#1]{#2}}\fi}
\def\@coverart{}%
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\reporttype}
%   Type of the report
%    \begin{macrocode}
\def\reporttype#1{\gdef\@reporttype{#1}}
\reporttype{}
%    \end{macrocode}
% \end{macro}
% 
%
% \begin{macro}{\distribution}
%   Distribution of the report
%    \begin{macrocode}
\def\distribution#1{\gdef\@distribution{#1}}
\distribution{Approved for public release; distribution is unlimited.}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\preparedfor}
%   The organization that ordered the report
%    \begin{macrocode}
\def\preparedfor#1{\gdef\@preparedfor{#1}}
\preparedfor{U.S. Army Corps of Engineers\\ Washington, DC 20314-1000}
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\contractnum}
%   Contract number
%    \begin{macrocode}
\def\contractnum#1{\gdef\@contractnum{#1}}
\contractnum{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\monitoredby}
%   Controlling lab
%    \begin{macrocode}
\def\monitoredby#1{\gdef\@monitoredby{#1}}
\monitoredby{}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\additionalinfo}
%   Anything else on the title page
%    \begin{macrocode}
\def\additionalinfo#1{\gdef\@additionalinfo{#1}}
\additionalinfo{}
%    \end{macrocode}   
% \end{macro}
% 
%
% \begin{macro}{\abstract}
% \changes{v0.4}{2009/07/20}{Increased parsep} 
%   We save abstract till later.  Again, this is uses code
%   from~\cite{Downes04:amsart}.
%    \begin{macrocode}
\newbox\abstractbox
\renewenvironment{abstract}{%
  \global\setbox\abstractbox=\vtop \bgroup
    \normalfont
    \list{}{\labelwidth\z@
      \leftmargin\z@ \rightmargin\leftmargin
      \listparindent\z@ \itemindent\z@
      \parsep16\p@ \topsep\z@
      \let\fullwidthdisplay\relax
    }%
    \item[\hskip\labelsep\bfseries Abstract:]%
}{%
  \endlist\egroup}
%    \end{macrocode}   
% \end{macro}
% 
%
% \begin{macro}{\disclaimer}
%   And disclaimer
%    \begin{macrocode}
\long\def\disclaimer#1{\long\gdef\@disclaimer{#1}}
\disclaimer{The contents of this report are not to be used for
advertising, publication, or promotional purposes. Citation of trade
names does not constitute an official endorsement or approval of the
use of such commercial products. All product names and trademarks
cited are the property of their respective owners. The findings of
this report are not to be construed as an official Department of the
Army position unless so designated by other authorized documents. 

\textbf{DESTROY THIS REPORT WHEN NO LONGER NEEDED. DO NOT RETURN IT
TO THE ORIGINATOR.}}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{@coverlist}
% \changes{v0.2}{2009/07/08}{Made slightly thinner} 
%   The  title page consists of boxes, which are extended beyond the
%   margins. Here we define the margins
%    \begin{macrocode}
\newenvironment{@coverlist}{\begin{list}{}{%
      \leftmargin40\p@\rightmargin-85\p@%
      \topsep\z@\partopsep\z@\labelwidth\z@\labelsep\z@}\item{}}{%
    \end{list}}
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{@titlelist}
%   Similar to |@coverlist|, but for title page
%    \begin{macrocode}
\newenvironment{@titlelist}{\begin{list}{}{%
      \leftmargin-20\p@\rightmargin100\p@%
      \topsep\z@\partopsep\z@\labelwidth\z@\labelsep\z@}\item{}}{%
    \end{list}}
%    \end{macrocode}   
% \end{macro}
%
%
% \begin{macro}{\if@titleblock}
%   Title block consists of Prepared for, Work Under and Monitored By
%   statements.  We need to decide whether to print it:
%    \begin{macrocode}
\newif\if@titleblock
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{@titleblock}
%   This is the macro for title block:
%    \begin{macrocode}
\newenvironment{@titleblock}{%
  \list{}{\labelwidth80\p@\labelsep10\p@ \leftmargin70\p@
    \rightmargin-150\p@
    \let\makelabel\@titleblocklabel}}{\endlist}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@titleblocklabel}
%   Small labels:
%    \begin{macrocode}
\newcommand*{\@titleblocklabel}[1]{\hfill\small#1}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\maketitle}
% \changes{v0.2}{2009/07/07}{Changed fonts} 
% \changes{v0.2}{2009/07/08}{Made slightly thinner} 
% \changes{v0.3}{2009/07/18}{Increased box for the laboratory} 
% \changes{v0.3}{2009/07/18}{Changhed weight to Book} 
% \changes{v0.3}{2009/07/18}{Aligned the distribution line} 
% \changes{v0.3}{2009/07/18}{Changed font sizes} 
% \changes{v0.3}{2009/07/18}{Changed disclaimer width} 
% \changes{v0.4}{2009/07/20}{Made the gap between red and black
% stripes on the cover exactly 4.5pt (added 2.75pt)} 
% \changes{v0.4}{2009/07/20}{Moved boxes around} 
% \changes{v1.1}{2009/07/22}{Added drop between authors and addresses} 
% \changes{v1.1}{2009/07/22}{Compensated for top margin change} 
%   The |\maketitle| macro performs all the work of typesetting the
%   information above.
%
% First, we typeset the cover page
%    \begin{macrocode}
\def\maketitle{%
  \thispagestyle{empty}%
  \enlargethispage{0.34in}%
  \vspace*{-0.95in}
     \makebox[0cm][r]{%
       \raisebox{-720\p@}[\z@][\z@]{%
         \rotatebox{90}{\makebox[\z@][l]{%
             \colorbox{red}{\color{white}\parbox{720\p@}{%
                 \rule{0\p@}{85\p@}%
                 \hspace{28\p@}\raisebox{40\p@}{%
                   \parbox[c]{350\p@}{\@laboratoryfont\@laboratory}%
                   \hspace{10\p@}%
                   \parbox[c]{300\p@}{\hfill\@reportnumfont\@reportnum}}}}}}}%
     \hspace*{-14\p@}}%
     \makebox[0cm][r]{\raisebox{-720\p@}[\z@][\z@]{\rule{8\p@}{726\p@}%
       \hspace{-26.75\p@}}}%
   \begin{@coverlist}%
     \sffamily\fontseries{k}\selectfont%
     \hfill\parbox{145\p@}{
       \includegraphics[width=65\p@]{red_corps_castle2}\\
       {\bfseries 
         US Army Corps\\
         of Engineers\raisebox{-1\p@}{\scriptsize\textregistered}}\\
       Engineering Research and\\
       Development Center}\par
     \vspace{0.5cm}%
     {\@programfont\@program\par}%
     \vspace{0.3cm}%
     {\raggedright\@titlefont\@title\par
       \vspace{0.3cm}%
       \normalsize\bfseries\@subtitle\par}%
     \vspace{0.3cm}%
     \begin{minipage}[t]{300\p@}\raggedright
       \nxandlist{\unskip, }{\unskip{} \@@and~}{\unskip{} \@@and~}\authors
       \authors\end{minipage}%
     \begin{minipage}[t]{135\p@}\flushright\@date\end{minipage}\par
     \vspace{0.3cm}%
     \@coverart
   \end{@coverlist}%
   \vfill
   \begin{@coverlist}%
     \@distributionfont\@distribution
   \end{@coverlist}%
   \newpage\thispagestyle{empty}\hbox{}\newpage
%    \end{macrocode}
%
%
% Now title page
%    \begin{macrocode}
%
  \thispagestyle{empty}%
  \setcounter{page}{1}%
  \vspace*{-1.5in}%
  \vspace*{-\topmargin}%
  \begin{@titlelist}%
    \sffamily\fontseries{k}\selectfont
    \begin{minipage}[t]{275\p@}%
      \bfseries\@program
    \end{minipage}%
    \begin{minipage}[t]{175\p@}%
      \bfseries\flushright\@reportnum\\\@date
    \end{minipage}\rule[-0.5in]{\z@}{0.625in}\par
    \begin{minipage}{\textwidth}
      \vspace*{1cm}%
      {\@titlefont\raggedright\@title\par}
      \vspace*{3\p@}%
      \bfseries\@subtitle\par
  \end{minipage}\rule[-0.7in]{\z@}{1in}\par
%    \end{macrocode}
%
%
% Inside title page we use special processing for authors' names
%    \begin{macrocode}
     \def\author##1{%
       \def\@tempa{##1}%
       \nxandlist{\unskip, }{\unskip{} \@@and~}{\unskip{} \@@and~}\@tempa
       {\upshape\normalsize\@tempa}\par\vspace{6\p@}}%
     \begin{minipage}{\textwidth}
     \textit{\footnotesize\addresses}\par
   \end{minipage}\rule[-2.7in]{\z@}{3.7in}\par
   \begin{minipage}{\textwidth}
     \@reporttype\par\vspace*{3\p@}%
     {\@distributionfont\@distribution\par}%
   \end{minipage}
 \end{@titlelist}%
  \vfill
  \begin{@titlelist}%
    \sffamily\normalsize\fontseries{k}\selectfont
    \ifx\@additionalinfo\@empty\else\@additionalinfo\par\fi
    \@titleblockfalse
    \ifx\@empty\@preparedfor\relax\else\@titleblocktrue\fi
    \ifx\@empty\@contractnum\relax\else\@titleblocktrue\fi
    \ifx\@empty\@monitoredby\relax\else\@titleblocktrue\fi
    \if@titleblock
       \begin{@titleblock}%
             \ifx\@empty\@preparedfor\else
                \item[Prepared for]\@preparedfor
             \fi
             \ifx\@empty\@contractnum\else
                \item[Under]\@contractnum
             \fi
             \ifx\@empty\@monitoredby\else
                \item[Monitored by]\@monitoredby
             \fi
       \end{@titleblock}
    \fi
  \end{@titlelist}%
  \clearpage
%    \end{macrocode}
%
%
% Now half title page.  Again see~\cite{Downes04:amsart}
%    \begin{macrocode}
  \ifvoid\abstractbox
  \else
    \box\abstractbox
    \prevdepth\z@ 
  \fi
  \vfill
  \bgroup
  \setlength{\fboxsep}{5\p@}%
  \makebox[\textwidth]{\fbox{\parbox{6.5in}{%
        \fontsize{8.5\p@}{9.5\p@}\selectfont
        \parskip\baselineskip
        \textbf{Disclaimer:} \@disclaimer}}}%
  \egroup
  \clearpage}
%    \end{macrocode}
% \end{macro}
%
%
%
%
%
%\subsection{Sectioning}
%\label{sec:sectioning}
% \changes{v0.5}{2009/07/22}{Changed numbering of sections} 
%
% \begin{macro}{\cl@chapter}
%   We do \emph{not} reset equation counters when stepping chapters, except
%   in appendices:
%    \begin{macrocode}
\def\cl@chapter{}
%    \end{macrocode}
% \end{macro}
% However, we do reset section and subsection counters
%    \begin{macrocode}
\@addtoreset{section}{chapter}%
\@addtoreset{subsection}{chapter}%
\@addtoreset{subsection}{section}%
%    \end{macrocode}
% 
%
% \begin{macro}{\chapter}
% \changes{v0.2}{2009/07/07}{Changed font} 
%   We redefine |\chapter| to suppress empty page style on chapter
%   opening:
%    \begin{macrocode}
\renewcommand\chapter{%
  \clearpage
  \global\@topnum\z@
  \@afterindentfalse
  \secdef\@chapter\@schapter}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\@chapter}
% \changes{v1.1}{2009/07/22}{Changed wrapping} 
%   Non-starred chapter:
%    \begin{macrocode}
\def\@chapter[#1]#2{%
  \if@frontmatter
      \addcontentsline{toc}{chapter}{#1}%
      \@makechapterhead{#2}%
  \else
      \refstepcounter{chapter}%
      \typeout{\@chapapp\space\thechapter.}%
      \if@appendix
         \addcontentsline{toc}{chapter}%
             {\@chapapp\space\thechapter: #1}%
         \@makechapterhead{\@chapapp\space\thechapter: #2}%
      \else
         \addcontentsline{toc}{chapter}%
             {\protect\numberline{\thechapter}#1}%
         \@makechapterhead{\makebox[35\p@]{\thechapter\hfill}#2}%
      \fi
  \fi
  \@afterheading}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\@schapter}
%   Starred chapter:
%    \begin{macrocode}
\def\@schapter#1{%
  \if@appendix
     \addcontentsline{toc}{chapter}{\@chapapp: #1}%
     \@makeschapterhead{\@chapapp: #1}%
  \else
    \addcontentsline{toc}{chapter}{#1}%
    \@makeschapterhead{#1}%
  \fi
  \@afterheading}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\@makechapterhead}
% \changes{v1.1}{2009/07/22}{Changed wrapping} 
%   This is the macro that actually prints the chapter:
%    \begin{macrocode}
\def\@makechapterhead#1{%
  \vspace*{5\p@}%
  {\hskip-35\p@%
      \parindent\z@\raggedright
      \interlinepenalty\@M
      \@titlefont #1\par\nobreak
    \vspace*{10\p@}%
  }}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@makeschapterhead}
% \changes{v1.1}{2009/07/22}{Wrote the macro} 
%   This is like |\makechapterhead|, but does not create hanging
%   indent:
%    \begin{macrocode}
\def\@makeschapterhead#1{%
  \vspace*{5\p@}%
  {%
      \parindent\z@\raggedright
      \interlinepenalty\@M
      \leftskip-35\p@\@titlefont #1\par\nobreak
    \vspace*{10\p@}%
  }}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\theequation}
%   We do not use chapter number in equations, except in appendices:
%    \begin{macrocode}
\renewcommand \theequation {\@arabic\c@equation}
%    \end{macrocode}
%   
% \end{macro}
%
%
%
% \begin{macro}{tocdepth}
%   Only chapters, sections, subsections are in TOC:
%    \begin{macrocode}
\setcounter{tocdepth}{2}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\section}
%   Sections are in 14\,pt bold. 
%    \begin{macrocode}
\renewcommand\section{%
  \addpenalty\@secpenalty\nobreak
  \secdef\@section\@ssection}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@section}
% \changes{v0.4}{2009/07/20}{Made sections numbered} 
% \changes{v1.1}{2009/07/22}{Changed wrapping} 
%   This is for numbered sections:
%    \begin{macrocode}
\def\@section[#1]#2{%
  \ifnum1>\c@secnumdepth
     \addcontentsline{toc}{section}{#1}%
  \else
    \refstepcounter{section}%
     \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}%
  \fi
  {\hskip-35\p@\raggedright\interlinepenalty\@M
   \large\sffamily\bfseries
     \ifnum1>\c@secnumdepth\else\makebox[35\p@]{\thesection\hfill}\fi#2\nobreak\par}
   \@afterheading
   \nobreak\par}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@ssection}
% \changes{v0.4}{2009/07/20}{Wrote the macro} 
% \changes{v1.1}{2009/07/22}{Changed wrapping} 
%   Unnumbered sections:
%    \begin{macrocode}
\def\@ssection#1{
  \addcontentsline{toc}{section}{#1}%
  {\raggedright\interlinepenalty\@M
   \large\sffamily\bfseries\leftskip-35\p@#1\nobreak\par}
   \@afterheading
   \nobreak\par}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\subsection}
%   Subsections are also bold 
%    \begin{macrocode}
\renewcommand\subsection{\par
  \addpenalty\@secpenalty\nobreak
  \secdef\@subsection\@ssubsection}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@subsection}
% \changes{v0.4}{2009/07/20}{Made subsections numbered} 
%   Numbered subsections:
%    \begin{macrocode}
\def\@subsection[#1]#2{%
  \ifnum2>\c@secnumdepth
     \addcontentsline{toc}{subsection}{\itshape#1}%
  \else
    \refstepcounter{subsection}%
    \addcontentsline{toc}{subsection}{\itshape\fontsize{9}{12}\selectfont
      \protect\numberline{\thesubsection}%
      #1}%
  \fi
  {\noindent\raggedright\interlinepenalty\@M
   \normalsize\sffamily\bfseries
   \ifnum2>\c@secnumdepth\else\thesubsection\hspace{1em}\fi#2}\nobreak\par}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@ssubsection}
% \changes{v0.4}{2009/07/20}{Wrote the macro} 
%   Unnumbered subsections
%    \begin{macrocode}
\def\@ssubsection#1{%
  \addcontentsline{toc}{subsection}{\itshape\fontsize{9}{12}\selectfont#1}%
  {\noindent\raggedright\interlinepenalty\@M
   \normalsize\sffamily\bfseries#1}\nobreak\par}
%    \end{macrocode}
% \end{macro}
%
%
%
%\subsection{Special Chapters and Sections}
%\label{sec:special}
%
% Since our unnumbered sections go to the TOC, we need to have 
% special ones that do not.
%
% \begin{macro}{\specialchapter}
%   A chapter that does not go into TOC\dots
%    \begin{macrocode}
\def\specialchapter#1{%
  \clearpage
  \global\@topnum\z@
  \@afterindentfalse
  \@makeschapterhead{#1}\par
  \@afterheading}
%    \end{macrocode}   
% \end{macro}
%
%
%
%\subsection{Front Page Lists}
%\label{sec:frontlists}
%
% Here we define tables of contents, lists of figures, tables and the
% combined lists.
%
% \begin{macro}{\@dotsep}
%   Separation between dots in tables
%    \begin{macrocode}
\def\@dotsep{0.5}
%    \end{macrocode}
% \end{macro}
%
%   
%
% \begin{macro}{\l@chapter}
% \changes{v0.3}{2009/07/18}{Deleted leaders} 
% \changes{v0.4}{2009/07/20}{Added leaders} 
% \changes{v1.1}{2009/07/22}{Changed wrapping} 
%   Here we define chapter entry in TOC.  Note the leaders to the end: 
%    \begin{macrocode}
\renewcommand\l@chapter[2]{%
  \def\numberline##1{\makebox[1.9em]{##1\hfill}}%
  \addpenalty{-\@highpenalty}%
  \vskip5\p@
  \bgroup
    \parindent\z@\rightskip\@pnumwidth
    \parfillskip-\@pnumwidth
    \leavevmode\bfseries
    \leftskip1.9em%
    \hskip-\leftskip
    #1\nobreak\leaders\hbox{$\m@th\mkern\@dotsep
      mu\hbox{.}\mkern\@dotsep
      mu$}\hfill\nobreak{\hfil\,#2}\par
    \vskip5\p@
      \penalty\@highpenalty
  \egroup}
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\@dottedtocline}
% \changes{v0.4}{2009/07/20}{Redefined} 
% \changes{v0.4}{2009/07/21}{Deleted hanging indent} 
% \changes{v1.1}{2009/07/22}{Changed wrapping} 
% We  redefine the standard macro to allow page number font to be
% right and to continue leaders to the end:
%    \begin{macrocode}
\def\@dottedtocline#1#2#3#4#5{%
  \bgroup
  \def\numberline##1{\makebox[#3]{##1\hfill}}%
  \ifnum #1>\c@tocdepth \else
    \vskip \z@ \@plus.2\p@
    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent #2\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima #3\relax
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     #4\nobreak
     \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
     \nobreak
     {\hfil \normalcolor \,#5}%
     \par}%
  \fi
  \egroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@dottedtoclineLF}
% \changes{v0.4}{2009/07/21}{Wrote macro} 
%   This is the version of |\@dottedtocline| used in LOT and LOF
%    \begin{macrocode}
\def\@dottedtoclineLF#1#2#3#4#5{%
  \bgroup
  \ifnum #1>\c@tocdepth \else
    \vskip \z@ \@plus.2\p@
    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent #2\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima #2\relax
     \advance\leftskip \@tempdima \null\nobreak\hskip -\@tempdima
     #4\nobreak
     \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
     \nobreak
     {\hfil \normalcolor \,#5}%
     \par}%
  \fi
  \egroup}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\l@section}
% \changes{v0.4}{2009/07/20}{Changed defaults} 
% \changes{v1.1}{2009/07/22}{Changed wrapping} 
% Section formatting in TOC
%    \begin{macrocode}
\renewcommand*\l@section{\@dottedtocline{1}{2em}{2.5em}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\l@subsection}
% \changes{v0.4}{2009/07/20}{Changed defaults} 
% \changes{v1.1}{2009/07/22}{Changed wrapping} 
% Subsection formatting in TOC
%    \begin{macrocode}
\renewcommand*\l@subsection{\@dottedtocline{2}{4.7em}{3em}}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\l@figure}
% \changes{v0.4}{2009/07/21}{Redefined} 
%   Figure in lot
%    \begin{macrocode}
\renewcommand*\l@figure{\@dottedtoclineLF{1}{0em}{2.3em}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\l@table}
% \changes{v0.4}{2009/07/21}{Redefined} 
%   Table in lot
%    \begin{macrocode}
\let\l@table\l@figure
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\contentsname}
% \changes{v0.4}{2009/07/20}{Changed defaults} 
%  Contents...
%    \begin{macrocode}
\renewcommand\contentsname{Table of Contents}
%    \end{macrocode}
%  
% \end{macro}
%
%
% \begin{macro}{\tableofcontents}
%   TOC:
%    \begin{macrocode}
\renewcommand\tableofcontents{%
  \specialchapter{\contentsname}%
  \def\numberline##1{\hb@xt@\@pnumwidth{##1\hfill}}%
  {\parskip2.5\p@\footnotesize\sffamily\fontseries{k}\selectfont\raggedright 
    \@starttoc{toc}}}
%    \end{macrocode}   
% \end{macro}
% \begin{macro}{\listoffigures}
%   LOF:
%    \begin{macrocode}
\renewcommand\listoffigures{%
  \chapter{\listfigurename}%
  \def\numberline##1{Figure ##1. }%
  {\parskip2.5\p@\footnotesize\sffamily\fontseries{k}\selectfont\raggedright
    \@starttoc{lof}}}
%    \end{macrocode}   
% \end{macro}
% \begin{macro}{\listoftables}
%   LOT:
%    \begin{macrocode}
\renewcommand\listoftables{%
  \chapter{\listtablename}%
  \def\numberline##1{Table ##1. }%
  {\parskip2.5\p@\footnotesize\sffamily\fontseries{k}\selectfont\raggedright
    \@starttoc{lot}}}
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\listfiguretablename}
%   The name for the combined list
%    \begin{macrocode}
\def\listfiguretablename{Figures and Tables}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\listoffiguresandtables}
% \changes{v0.3}{2009/07/18}{Added some vertical space} 
%  And the combined LOF and TOC
%    \begin{macrocode}
\newcommand\listoffiguresandtables{%
  \chapter{\listfiguretablename}
  {\sffamily\bfseries\normalsize Figures\par}%
  \vspace*{10pt}%
  \def\numberline##1{Figure ##1. }%
  {\parskip2.5\p@\footnotesize\sffamily\fontseries{k}\selectfont\raggedright
    \@starttoc{lof}}%
  {\sffamily\bfseries\normalsize Tables\par}%
  \vspace*{10pt}%
  \def\numberline##1{Table ##1. }%
  {\parskip2.5\p@\footnotesize\sffamily\fontseries{k}\selectfont\raggedright
    \@starttoc{lot}}}
%    \end{macrocode}  
% \end{macro}
%
% \begin{macro}{\bibname}
%   We use ``References'' for bibliography
%    \begin{macrocode}
\renewcommand\bibname{References}
%    \end{macrocode}
% \end{macro}
%
%
%
% 
%
%\subsection{Figures and Tables}
%\label{sec:floats}
%
% \begin{macro}{\@fptop}
% \changes{v0.5}{2009/07/21}{Redefined} 
% We want the figures on figures-only page to be vertically
% top-aligned rather than centered:
%    \begin{macrocode}
\setlength{\@fptop}{0pt}%
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\thefigure}
% We do not use chapter numbers in figures, except in appendix:
%    \begin{macrocode}
\renewcommand \thefigure {\@arabic\c@figure}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\thetable}
% We do not use chapter numbers in tables either:
%    \begin{macrocode}
\renewcommand \thetable {\@arabic\c@table}
%    \end{macrocode}
% \end{macro}
%
%
% \changes{v0.2}{2009/07/07}{Changed caption skips} 
% Setting up captions:
%    \begin{macrocode}
\captionsetup{justification=centering,font={footnotesize,sf,bf},
labelsep=period,aboveskip=3pt}
\captionsetup[table]{position=top}
%    \end{macrocode}
% 
%
% \begin{macro}{\arraystretch}
%   Increase array stretch:
%    \begin{macrocode}
\def\arraystretch{1.3}
%    \end{macrocode}
%   
% \end{macro}
%
%
%
%
% 
%
% \subsection{Equation Numbering}
% \label{sec:eqnum}
%
% \begin{macro}{\maketag@@@}
% \changes{v0.3}{2009/07/18}{Introduced the macro} 
%   We change the \progname{amsmath} definition:
%    \begin{macrocode}
\let\maketag@@@@\maketag@@@
\def\maketag@@@#1{\hbox{\m@th\@eqtagfont#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\eqref}
% \changes{v0.3}{2009/07/18}{Introduced the macro} 
%   We also change |\eqref|, otherwise the references will be in the
%   wrong font:
%    \begin{macrocode}
\renewcommand{\eqref}[1]{\textup{\tagform@@{\ref{#1}}}}
%    \end{macrocode}   
% \end{macro}
%
% 
% \begin{macro}{\tagform@@}
% \changes{v0.3}{2009/07/18}{Introduced the macro} 
%   This is the original \progname{amsmath} version:
%    \begin{macrocode}
\def\tagform@@#1{\maketag@@@@{(\ignorespaces#1\unskip\@@italiccorr)}}
%    \end{macrocode}   
% \end{macro}
%
% 
%
%
%
% \subsection{The final word}
%\label{sec:final}
%
%    \begin{macrocode}
%</class>      
%    \end{macrocode}
%   
%\Finale
%\clearpage
%
%\PrintChanges
%\clearpage
%\PrintIndex
%
\endinput