summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/rus/uni.sty
blob: ca2d6367d7d74783bf98fe35f08a8d2f5892f1cf (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

%  ********************************************
%  * Universtity of Stuttgart Universal Style *
%  ********************************************
%  *            USUS DOCUMENT STYLE           *
%  *      R.Harscheidt, IKE/UNI Stuttgart     *
%  ********************************************
%
%  All macros like in the usplain format. This
%  file can also be used to make this format
%  by INITEX. In the loading INITEX-file the
%  definition "\def\initex{INITEX}" should be
%  included.
%
\makeatletter   % make at a letter

%  ****************************************
%  *                BANNER                *
%  ****************************************
%
\def\@usname    {USUS - University of Stuttgart Universal Style }
\def\@usdate    {14. July 1988}
\def\@usversion {RUS1.0}
\everyjob{\typeout{\@usname \@usversion\space- Released \@usdate}}
\immediate\write10{\@usname \@usversion\space- Released \@usdate}

%%%%% The following comes from usgerman.sty %%%%%%%%%%%%

%  *****************************************
%  *                HEADERS                *
%  *****************************************
%
\gdef\@headabstract {\"Ubersicht}
\gdef\@headpreface  {Vorwort}
\gdef\@headappendix {Anhang}
\gdef\@headpart     {Teil}
\gdef\@headchapter  {}
\gdef\@headtoc      {Inhalt}
\gdef\@headloa      {Abk\"urzungen}
\gdef\@headlof      {Abbildungen}
\gdef\@headlos      {Formelzeichen}
\gdef\@headlot      {Tabellen}
\gdef\@headglo      {Erkl\"arungen}
\gdef\@headidx      {Index}
\gdef\@headbib      {Literatur}

%  *****************************************
%  *                CAPTIONS               *
%  *****************************************
%
\gdef\@capfigure    {Abbildung}
\gdef\@captable     {Tabelle}

%  *****************************************
%  *                  DATE                 *
%  *****************************************
%
\gdef\monthname{
     \ifcase\month\or
        Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or
        Juli\or August\or September\or Oktober\or November\or Dezember
     \fi}
\gdef\thismonth{\monthname\space\number\year}
\gdef\today{\number\day.\thismonth}

%%%%% Here the original ususall.sty goes on %%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This was made from:
%
% BOOK DOCUMENT STYLE -- Released 23 September 1985
%    for LaTeX version 2.09
% Copyright (C) 1985 by Leslie Lamport
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%  ****************************************
%  *          TWO-COLUMN OPTION           *
%  ****************************************
%
% \@twocolumnfalse              % Default is one column.
\def\ds@twocolumn{              % Defines two column option.
    \@twocolumntrue}

%  ****************************************
%  *           TWO-SIDE OPTION            *
%  ****************************************
%
% \twosidefalse                 % Default is single sided.
\def\ds@twoside{                % Defines twoside option.
    \@twosidetrue
    \@mparswitchtrue}           % Marginpars go on outside of page.

%  ****************************************
%  *             DRAFT OPTION             *
%  ****************************************
%
% \overfullrule = 0em           % Default is don't mark overfull hboxes.
\def\ds@draft{                  % Causes overfull hboxes to be marked.
    \overfullrule .5em}

%  ****************************************
%  *                FONTS                 *
%  ****************************************
%
\lineskip       .1em      % \lineskip is 0.1em for all font sizes.
\normallineskip .1em
\def\baselinestretch{1}   % 1=1-zeilig, 1.33=1.5-zeilig, 1.66=2-zeilig

%  The font size option is handled by reading a different file for each
%  size, as follows, to define font size-specific commands:
%       10pt : US10, 11pt : US11, 12pt : US12
%  Implemented by \def'ing \@fontload to the nesessary input command.
%
%  in 10pt type size : 1em = 10pt
%  in 11pt type size : 1em = 11pt
%  in 12pt type size : 1em = 12pt
%
\def\definefont#1{%
    \def\@ptsize{#1}                    % define ptsize used by some macros
    \def\@fontload{%
        \input us1\@ptsize.sty          % input fontfile
        \let\@fontload\relax}}          % load only once

\definefont{2}                          % 12pt is default
\@namedef{ds@12pt}{}                    % 12pt option does nothing
\@namedef{ds@11pt}{\definefont{1}}      % 11pt option loads us11.sty
\@namedef{ds@10pt}{\definefont{0}}      % 10pt option loads us10.sty

% The sans serif option must be set before the optionfiles are loaded. Some of
% these files use the \@fontstyle.
%
\def\@fontstyle{}                       % default is roman
\@namedef{ds@sf}{\let\@fontstyle\sf}    % sf option  sans serif

%  ****************************************
%  *            LOAD OPTIONFILES          *
%  ****************************************
%
% The \@options command causes the execution of every command \ds@FOO
% which is defined and for which the user typed the FOO option in his
% \documentstyle command.  For every option BAR he typed for which
% \ds@BAR is not defined, the file BAR.sty will be read after the present
% (main) .STY file is executed.
%
\def\@options{\let\@elt\relax
    \@for\@tempa:=\@optionlist\do
        {\@ifundefined{ds@\@tempa}                          % option command ?
             {\xdef\@optionfiles{\@optionfiles              % load option file
              \catcode`@=11\@elt\@tempa.sty\relax}}
             {\csname ds@\@tempa\endcsname}}}               % execute command

\ifx \initex \undefined                 % do not load option- and fontfiles
     \@options                          % when this is used to make a format.
     \relax                             % that must then be done by 'usus.sty'
\fi

\@fontload                              % load default fontsize
%\input logos.sty                        % logo makros
%\input quotes.sty                       % quote makros
%
%  ****************************************
%  *            PAGE LAYOUT               *
%  ****************************************
%
% All margin dimensions measured from a point one inch from top and side
% of page.
% SIDE MARGINS:
%
\if@twoside
   \oddsidemargin     5mm % rh  % Left margin on odd-numbered pages.
   \evensidemargin   -5mm % rh  % Left margin on even-numbered pages.
\else
   \oddsidemargin     5mm % rh  % Left margin on odd-numbered pages.
   \evensidemargin    5mm % rh  % Left margin on even-numbered pages.
\fi

% VERTICAL SPACING:
%                               % Top of page:
\topmargin           -5mm % rh  %   Nominal distance from top of page to
                                %   top of box containing running head.
\headheight           5mm % rh  %   Height of box containing running head.
\headsep             10mm % rh  %   Space between running head and text.
\topskip              4mm % rh  %   '\baselineskip' for first line of page.
                                % Bottom of page:
\footheight           5mm % rh  %   Height of box containing running foot.
\footskip            10mm % rh  %   Distance from baseline of box containing
                                %   foot to baseline of last line of text.
% DIMENSION OF TEXT:
%
\textheight         225mm % rh  % Height of text (including footnotes and
                                % figures, excluding running head and foot).
\textwidth          150mm % rh  % Width of text line.
                                % For two-column mode:
\columnsep            1em % rh  %    Space between columns
\columnseprule        0mm % rh  %    Width of rule between columns.

% A \raggedbottom command causes 'ragged bottom' pages: pages set to
% natural height instead of being stretched to exactly \textheight.
% FOOTNOTES:
%
\footnotesep          3mm % rh  % Height of strut placed at the beginning of
                                % every footnote = height of normal
                                % \footnotesize strut, so no extra space
                                % between footnotes.
\skip\footins 4mm plus .4em minus .2em    % Space between last line of text
                                          % text and top of first footnote.

%  ****************************************
%  *                FLOATS                *
%  ****************************************
%
% FLOATS: (a float is something like a figure or table)
%
%  FOR FLOATS ON A TEXT PAGE:
%
%    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
%
\floatsep   1.2em plus .2em minus .2em  % Space between adjacent floats moved
                                        % to top or bottom of text page.
\intextsep  1.2em plus .2em minus .2em  % Space between in-text figures and
                                        % text.
\textfloatsep 2em plus .2em minus .4em  % Space between main text and floats
                                        % at top or bottom of page.
\@maxsep      2em                       % The maximum of \floatsep,
                                        % \textfloatsep and \intextsep (minus
                                        % the stretch and shrink).

%    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
%
\dblfloatsep   1.2em plus .2em minus .2em % Same as \floatsep for double-column
                                          % figures in two-column mode.
\dbltextfloatsep 2em plus .2em minus .4em % \textfloatsep for double-column
                                          % floats.
\@dblmaxsep      2em                      % The maximum of \dblfloatsep and
                                          % \dbltexfloatsep.

%  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
%
%    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
%
\@fptop  0em plus 1fil          % Stretch at top of float page/column.
                                % (Must be 0em plus ...)
\@fpbot  0em plus 1fil          % Stretch at bottom of float page/column.
                                % (Must be 0em plus ... )
\@fpsep .8em plus 2fil          % Space between floats on float page/column.

%   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
%
\@dblfptop  0em plus 1fil       % Stretch at top of float page.
                                % (Must be 0em plus ...)
\@dblfpbot  0em plus 1fil       % Stretch at bottom of float page.
                                % (Must be 0em plus ...)
\@dblfpsep .8em plus 2fil       % Space between floats on float page.

% MARGINAL NOTES:
%
\marginparwidth      20mm % rh  % Width of marginal notes.
\marginparsep        .5em % rh  % Horizontal space between outer margin
                                % and marginal note
\marginparpush       .5em       % Minimum vertical separation between two
                                % marginal notes.

%  ****************************************
%  *           PARAGRAPHING               *
%  ****************************************
%
\parindent   0em                        % Width of paragraph indentation.
\parskip    .8em plus .2em minus .2em   % Extra vertical space between
                                        % paragraphs.
\topsep     .4em plus .2em minus .1em   % Extra vertical space, in addition to
                                        % \parskip, added above and below list
                                        % and paragraphing environments.
\partopsep  .2em plus .1em minus .1em   % Extra vertical space, in addition to
                                        % \parskip and \topsep, added when
                                        % user leaves blank line before the
                                        % environment.
\itemsep    .2em plus .1em minus .1em   % Extra vertical space, in addition to
                                        % \parskip, added between list items.
\newskip    \tocparskip
\tocparskip .4em plus .2em minus .1em   % Extra vertical space between lines
                                        % in the content tables

%  ****************************************
%  *              PENALTIES               *
%  ****************************************
%
% The following page-breaking penalties are defined
%
\@lowpenalty   51       % Produced by \nopagebreak[1] or \nolinebreak[1]
\@medpenalty  151       % Produced by \nopagebreak[2] or \nolinebreak[2]
\@highpenalty 301       % Produced by \nopagebreak[3] or \nolinebreak[3]
\@beginparpenalty -\@lowpenalty % Before a list or paragraph environment.
\@endparpenalty   -\@lowpenalty % After a list or paragraph environment.
\@itempenalty     -\@lowpenalty % Between list items.
% \clubpenalty                  % 'Club line'  at bottom of page.
% \widowpenalty                 % 'Widow line' at top of page.
% \displaywidowpenalty          % Math display widow line.
% \predisplaypenalty            % Breaking before a math display.
% \postdisplaypenalty           % Breaking after a math display.
% \interlinepenalty             % Breaking at a line within a paragraph.
% \brokenpenalty                % Breaking after a hyphenated line.

%    ****************************************
%    *     PARTS, CHAPTERS AND SECTIONS     *
%    ****************************************
%
% \secdef{UNSTARCMDS}{STARCMDS} :
%    When defining a \chapter or \section command without using
%    \@startsection, you can use \secdef as follows:
%       \def\chapter { ... \secdef \CMDA \CMDB }
%       \def\CMDA    [#1]#2{ ... }  % Command to define \chapter[...]{...}
%       \def\CMDB    #1{ ... }      % Command to define \chapter*{...}
%
% The value of the counter secnumdepth gives the depth of the
% highest-level sectioning command that is to produce section numbers.
%
\setcounter{secnumdepth}{3}
\def\part{
    \cleardoublepage            % Starts new page.
    \thispagestyle{usplain}     % rh Page style of part page is 'usplain'
    \if@twocolumn               % IF two-column style THEN
       \onecolumn               %   \onecolumn
       \@tempswatrue            %   @tempswa := true
    \else                       % ELSE
       \@tempswafalse           %   @tempswa := false
    \fi                         % FI
    \hbox{} \vfil               % Add fil glue to center title
    \bgroup \centering          % BEGIN centering
    \secdef\@part\@spart}

\def\@part[#1]#2{
    \ifnum \c@secnumdepth >-2\relax     % IF secnumdepth > -2 THEN
       \refstepcounter{part}            %   step part counter
       \addcontentsline{toc}{part}      %   add toc numbered line
       {\protect\numberline{\thepart}{#1}}
       \LARGE\bf\@headpart\ \thepart    %   Print 'Part' and number
       \par                             %   in \LARGE bold.
       \vskip 2em                       %   Add space before title.
    \else                               % ELSE
       \addcontentsline{toc}{part}{#1}  %   add toc unnumbered line
    \fi                                 % FI
    \markboth{}{}
    \huge \bf #1\@endpart               % Print Title in \huge bold.
    \addtocontents{lof}{\protect\addvspace{4\parskip}}  % rh
    \addtocontents{lot}{\protect\addvspace{4\parskip}}} % rh

\def\@spart#1{
    \huge \bf #1\@endpart}              % Print title in \huge boldface

% \@endpart finishes the part page
%
\def\@endpart{
    \par\egroup                         % END centering
    \vfil\newpage                       % End page with 1fil glue.
    \if@twoside                         % IF twoside printing THEN
       \hbox{}                          %   Produce totally blank page
       \thispagestyle{empty}
       \newpage
    \fi                                 % FI
    \if@tempswa                         % IF @tempswa = true THEN
       \twocolumn                       %   \twocolumn
    \fi}                                % FI

\def\chapter{
    \cleardoublepage            % Starts new right-hand page.
    \thispagestyle{usplain}     % rh Page style of chapter page is 'usplain'
    \global\@topnum\z@          % Prevents figures from going at top of page.
    \@afterindentfalse          % Suppresses indent in first paragraph.
    \secdef\@chapter\@schapter} % Change to \@afterindenttrue to have indent.

\def\@chapter[#1]#2{
    \ifnum \c@secnumdepth >\m@ne                % IF secnumdepth > -2 THEN
       \refstepcounter{chapter}                 %   step chapter counter
       \typeout{\@chapapp\space\thechapter.}    %
       \addcontentsline{toc}{chapter}           %   add toc numbered line
       {\protect\numberline{\thechapter}{#1}}
    \else                                       % ELSE
      \addcontentsline{toc}{chapter}{#1}        %   add toc unnumbered line
    \fi                                         % FI
    \chaptermark{#1}
    \if@twocolumn                               % Tests for two-column mode.
       \@topnewpage[\@makechapterhead{#2}]
    \else
       \@makechapterhead{#2}
       \@afterheading                           % Routine called after
                                                % chapter and section
                                                % heading.
    \fi
    \addtocontents{lof}{\protect\addvspace{2\parskip}} % Adds between-chapter
    \addtocontents{lot}{\protect\addvspace{2\parskip}}}% space to lists of
                                                       % figs & tables.

\def\@schapter#1{
    \if@twocolumn
       \@topnewpage[\@makeschapterhead{#1}]
    \else
       \@makeschapterhead{#1}
       \@afterheading
    \fi}

% \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
%
\def\@makechapterhead#1{                % Heading for \chapter command
    \vspace{40pt}
    { \Large \bf
      \parindent  \z@
      \hangindent \@pnumwidth
      \makebox[\hangindent][l]{\thechapter}#1\par}
    \nobreak
    \vspace{25pt}}

% \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
%
\def\@makeschapterhead#1{               % Heading for \chapter* command
    \vspace{40pt}
    { \Large \bf
      \parindent  \z@
      #1\par}
    \nobreak
    \vspace{25pt}}

% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
%            optional * [ALTHEADING]{HEADING}
%    Generic command to start a section.
%    NAME       : e.g., 'subsection'
%    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
%                 section = 2, etc.  A section number will be printed if
%                 and only if LEVEL < or = the value of the secnumdepth
%                 counter.
%    INDENT     : Indentation of heading from left margin
%    BEFORESKIP : Absolute value = skip to leave above the heading.
%                 If negative, then paragraph indent of text following
%                 heading is suppressed.
%    AFTERSKIP  : if positive, then skip to leave below heading,
%                       else - skip to leave to right of run-in heading.
%    STYLE      : commands to set style
%  If '*' missing, then increments the counter.  If it is present, then
%  there should be no [ALTHEADING] argument.  A sectioning command
%  is normally defined to \@startsection + its first six arguments.
%
\def\section{\@startsection {section}{1}{\z@}
    {-3.5ex plus -1ex minus  -.2ex}
    {2.3ex plus .2ex}{\large\bf}}
\def\subsection{\@startsection {subsection}{2}{\z@}
    {-3.25ex plus -1ex minus -.2ex}
    {1.5ex plus .2ex}{\normalsize\bf}}
\def\subsubsection{\@startsection {subsubsection}{3}{\z@}
    {-3.25ex plus -1ex minus -.2ex}
    {1.5ex plus .2ex}{\normalsize\bf}}
\def\paragraph{\@startsection {paragraph}{4}{\z@}
    {3.25ex plus 1ex minus .2ex}
    {-1em}{\normalsize\bf}}
\def\subparagraph{\@startsection {subparagraph}{4}{\parindent}
    {3.25ex plus 1ex minus .2ex}
    {-1em}{\normalsize\bf}}

% Default initializations of \...mark commands.  (See below for their
% use in defining page styles.
%
\def\chaptermark#1{}
% \def\sectionmark#1{}           % Preloaded definitions
% \def\subsectionmark#1{}
% \def\subsubsectionmark#1{}
% \def\paragraphmark#1{}
% \def\subparagraphmark#1{}

%    ****************************************
%    *          DOCUMENT-SECTIONS           *
%    ****************************************
%
% FRONT % rh
%
% The \front command must do the following:
%    -- begin a new page
%    -- set \@chapapp empty (for messages)
%    -- set the page counter to one
%    -- reset the chapter counter to zero
%    -- reset the section counter to zero
%    -- redefine the page counter to produce roman numbers
%
\def\front{
    \clearpage
    \def\@chapapp{}
    \setcounter{page}{1}
    \setcounter{chapter}{0}
    \setcounter{section}{0}
    \setcounter{footnote}{0}
    \def\thepage{\Roman{page}}}

% BODY % rh
%
% The \body command must do the following:
%    -- begin a new page
%    -- set \@chapapp empty (for messages)
%    -- reset the page counter to one
%    -- reset the chapter counter to zero
%    -- reset the section counter to zero
%    -- redefine the page counter to produce arabic numbers
%    -- redefine the chapter counter to produce arabic numbers
%
\def\body{
    \clearpage
    \def\@chapapp{\@headchapter}
    \setcounter{page}{1}
    \setcounter{chapter}{0}
    \setcounter{section}{0}
    \def\thepage{\arabic{page}}
    \def\thechapter{\arabic{chapter}}}

% APPENDIX
%
% The \appendix command must do the following:
%    -- begin a new unnumbered part
%    -- set \@chapapp to Appendix (for messages)
%    -- reset the chapter counter to zero
%    -- redefine the chapter counter to produce appendix numbers
%    -- reset the section counter to zero
%
\def\appendix{
    \part*{\@headappendix}
    \def\@chapapp{\@headappendix}
    \setcounter{chapter}{0}
    \setcounter{section}{0}
    \def\thechapter{\Alph{chapter}}
    \addtocontents{toc}{\protect\addvspace{4\parskip}}}
    \addtocontents{lof}{\protect\addvspace{4\parskip}}
    \addtocontents{lot}{\protect\addvspace{4\parskip}}

%    ****************************************
%    * PART, CHAPTER AND SECTION NUMBERING  *
%    ****************************************
%
% DEFINE COUNTERS:
%
% \newcounter{NEWCTR}[OLDCTR] : Defines NEWCTR to be a counter, which is
%                               reset to zero when counter OLDCTR is stepped.
%                               Counter OLDCTR must already be defined.
%
\newcounter {part}
\newcounter {chapter}
\newcounter {section}[chapter]
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
\newcounter {subparagraph}[paragraph]

% For any counter CTR, \theCTR is a macro that defines the printed version
% of counter CTR.  It is defined in terms of the following macros:
%
%  \arabic{COUNTER} : The value of COUNTER printed as an arabic numeral.
%  \roman{COUNTER}  : Its value printed as a lower-case roman numberal.
%  \Roman{COUNTER}  : Its value printed as an upper-case roman numberal.
%  \alph{COUNTER}   : Value of COUNTER printed as a lower-case letter:
%                         1 = a, 2 = b, etc.
%  \Alph{COUNTER}   : Value of COUNTER printed as an upper-case letter:
%                           1 = A, 2 = B, etc.
%
\def\thepart          {\Roman{part}}
\def\thechapter       {\arabic{chapter}}
\def\thesection       {\thechapter.\arabic{section}}
\def\thesubsection    {\thesection.\arabic{subsection}}
\def\thesubsubsection {\thesubsection .\arabic{subsubsection}}
\def\theparagraph     {\thesubsubsection.\arabic{paragraph}}
\def\thesubparagraph  {\theparagraph.\arabic{subparagraph}}

% \@chapapp is initially defined to be 'Chapter'.  The \appendix
% command redefines it to be 'Appendix'.
%
\def\@chapapp{\@headchapter}

%    ****************************************
%    *         TABLE OF CONTENTS, ETC.      *
%    ****************************************
%
% A \subsection command writes a
%       \contentsline{subsection}{TITLE}{PAGE}
% command on the .toc file, where TITLE contains the contents of the
% entry and PAGE is the page number.  If subsections are being numbered,
% then TITLE will be of the form
%       \numberline{NUM}{HEADING}
% where NUM is the number produced by \thesubsection.  Other sectioning
% commands work similarly.
%
% A \caption command in a 'figure' environment writes
%    \contentsline{figure}{\numberline{NUM}{CAPTION}}{PAGE}
% on the .lof file, where NUM is the number produced by \thefigure and
% CAPTION is the figure caption.  It works similarly for a 'table' environment.
%
% The command \contentsline{NAME} expands to \l@NAME.  So, to specify
% the table of contents, we must define \l@chapter, \l@section,
% \l@subsection, ... ; to specify the list of figures, we must define
% \l@figure; and so on.  Most of these can be defined with the
% \@dottedtocline command, which works as follows.
%
% \@dottedtocline{LEVEL}{INDENT}{NUMWIDTH}{TITLE}{PAGE}
%    LEVEL    : An entry is produced only if LEVEL < or = value of
%               'tocdepth' counter.  Note, \chapter is level 0, \section
%               is level 1, etc.
%    INDENT   : The indentation from the outer left margin of the start of
%               the contents line.
%    NUMWIDTH : The width of a box in which the section number is to go,
%               if TITLE includes a \numberline command.
%
% This command uses the following three parameters, which are set
% with a \def (so em's can be used to make them depend upon the font).
%   \@pnumwidth : The width of a box in which the page number is put.
%   \@tocrmarg  : The right margin for multiple line entries.  One
%                 wants \@tocrmarg > or = \@pnumwidth
%   \@dotsep    : Separation between dots, in mu units.  Should be \def'd to
%                 a number like 2 or 1.7
%
% TABLEOFCONTENTS
%  In report style, \tableofcontents, \listoffigures, etc. are always
%  set in single-column style.  @restonecol
%
\def\tableofcontents{
    \@restonecolfalse
    \if@twocolumn
       \@restonecoltrue
       \onecolumn
    \fi
    \chapter*{\@headtoc
    \@mkboth{\uppercase{\@headtoc}}
            {\uppercase{\@headtoc}}}
    {\parskip \tocparskip \@starttoc{toc}}
    \if@restonecol
       \twocolumn
    \fi}

%    ****************************************
%    *       TABLE OF CONTENTS ENTRIES      *
%    ****************************************
%
\setcounter{tocdepth}{3}
\def\@dotsep         {4.5}
\def\@tocrmarg       {2.55em}
\def\@pnumwidth      {1.55em}

\def\l@part#1#2{
    \addpenalty{-\@highpenalty}
    \addvspace{4\parskip}
    \begingroup
       { \large\bf
         \parindent    \z@
         \@tempdima    \@pnumwidth
         \rightskip    \@tocrmarg
         \parfillskip -\@tocrmarg
         \leavevmode #1\hfill#2\par}
       \nobreak
    \endgroup}

\def\l@chapter#1#2{
    \pagebreak [3]
    \addvspace{2\parskip}
    \begingroup
       { \bf
         \parindent    \z@
         \@tempdima    \@pnumwidth
         \rightskip    \@tocrmarg
         \parfillskip -\@tocrmarg
         \leavevmode #1\hfill#2\par}
    \endgroup}

\def\l@section       {\@dottedtocline{1} {\@pnumwidth} {2.3em}}
\def\l@subsection    {\@dottedtocline{2} {3.8em}       {3.2em}}
\def\l@subsubsection {\@dottedtocline{3} {7.0em}       {4.1em}}
\def\l@paragraph     {\@dottedtocline{4} {10em}        {5em}}
\def\l@subparagraph  {\@dottedtocline{5} {12em}        {6em}}

%    ****************************************
%    *           LIST OF FIGURES            *
%    ****************************************
%
\def\listoffigures{
    \@restonecolfalse
    \if@twocolumn
       \@restonecoltrue
       \onecolumn
    \fi
    \chapter*{\@headlof
    \@mkboth{\uppercase{\@headlof}}
            {\uppercase{\@headlof}}}
    {\parskip \tocparskip \@starttoc{lof}}
    \if@restonecol
       \twocolumn
    \fi}
\def\l@figure{\@dottedtocline{1}{\@pnumwidth}{2.3em}}

%    ****************************************
%    *             LIST OF TABLES           *
%    ****************************************
%
\def\listoftables{
    \@restonecolfalse
    \if@twocolumn
       \@restonecoltrue
       \onecolumn
    \fi
    \chapter*{\@headlot
    \@mkboth{\uppercase{\@headlot}}
            {\uppercase{\@headlot}}}
    {\parskip \tocparskip \@starttoc{lot}}
    \if@restonecol
       \twocolumn
    \fi}
\let\l@table\l@figure

%    ****************************************
%    *         LIST OF ABBREVIATIONS        *
%    ****************************************
%
\def\listofabbrev{\@ifnextchar[{\@listofabbrev}{\@listofabbrev[MMMM]}}
\def\@listofabbrev[#1]{
    \@restonecolfalse
    \if@twocolumn
       \@restonecoltrue
       \onecolumn
    \fi
    \chapter*{\@headloa
    \@mkboth{\uppercase{\@headloa}}
            {\uppercase{\@headloa}}}
    \begin{list}{}{
           \labelsep 1em
           \settowidth\labelwidth{#1}
           \leftmargin\labelwidth
           \advance\leftmargin\labelsep}
       {\parskip \tocparskip \@starttoc{loa}}
       \item [~] ~ % Dummy
    \end{list}
    \if@restonecol \twocolumn \fi}
\def\abbrev#1#2{\addtocontents{loa}{\protect{\item [#1] #2 }}}

\let\listofshortcuts=\listofabbrev
\let\shortcut       =\abbrev

%    ****************************************
%    *            LIST OF SYMBOLS           *
%    ****************************************
%
\def\listofsymbols{\@ifnextchar[{\@listofsymbols}{\@listofsymbols[MMMM]}}
\def\@listofsymbols[#1]{
    \@restonecolfalse
    \if@twocolumn
       \@restonecoltrue
        \onecolumn
    \fi
    \chapter*{\@headlos
    \@mkboth{\uppercase{\@headlos}}
            {\uppercase{\@headlos}}}
    \begin{list}{}{
           \settowidth\labelwidth{#1}
           \labelsep 1em
           \leftmargin\labelwidth
           \advance\leftmargin\labelsep}
       {\parskip \tocparskip \@starttoc{los}}
       \item [~] ~ % Dummy
    \end{list}
    \if@restonecol \twocolumn \fi}
\def\symbol#1#2{\addtocontents{los}{\protect{\item [#1] #2 }}}

%    ****************************************
%    *                ABSTRACT              *
%    ****************************************
%
\def\abstract{\@ifnextchar[{\@abstract}{\@abstract[d]}}
\def\@abstract[#1]{\def\temp{#1}
    \if \temp d \chapter*{\@headabstract                        % default
                \@mkboth{\uppercase{\@headabstract}}
                        {\uppercase{\@headabstract}}} \fi
    \if \temp g \chapter*{Zusammenfassung                       % german
                \@mkboth{ZUSAMMENFASSUNG}
                        {ZUSAMMENFASSUNG}} \fi
    \if \temp e \chapter*{Abstract                              % english
                \@mkboth{ABSTRACT}
                        {ABSTRACT}} \fi}
\def\endabstract{}

%    ****************************************
%    *               PREFACE                *
%    ****************************************
%
\def\preface{\chapter*{\@headpreface
             \@mkboth{\uppercase{\@headpreface}}
                     {\uppercase{\@headpreface}}}}
\def\endpreface{}

%    ****************************************
%    *             BIBLIOGRAPHY             *
%    ****************************************
%
% The thebibliography environment executes the following commands:
%
%  \def\newblock{\hskip .11em plus .33em minus -.07em} --
%      Defines the `closed' format, where the blocks (major units of
%      information) of an entry run together.
%
%  \sloppy  -- Used because it's rather hard to do line breaks in
%      bibliographies,
%
%  \sfcode`\.=1000\relax --
%      Causes a `.' (period) not toproduce an end-of-sentence space.
%
\def\thebibliography#1{
    \chapter*{\@headbib
    \@mkboth{\uppercase{\@headbib}}
            {\uppercase{\@headbib}}}
    \def\newblock{\hskip .11em plus .33em minus -.07em}
    \sfcode`\.=1000\relax
    \sloppy
    \list{[\arabic{enumi}]}{
          \settowidth\labelwidth{[#1]}
          \labelsep 1em
          \leftmargin\labelwidth
          \advance\leftmargin\labelsep
          \usecounter{enumi}}}
\let\endthebibliography=\endlist

% \def\@biblabel#1{[#1]\hfill}  % Produces the label for a \bibitem[...]
                                % command.
% \def\@cite#1{[#1]}            % Produces the output of the \cite command.

%    ****************************************
%    *              THE INDEX               *
%    ****************************************
%
% THE THEINDEX ENVIRONMENT
% Produces double column format, with each paragraph a separate entry.
% The user commands \item, \subitem and \subsubitem are used to
% produce the entries, and \indexspace adds an extra vertical space
% that's the right size to put above the first entry with a new letter
% of the alphabet.
%
\newif\if@restonecol
\def\theindex{
    \@restonecoltrue
    \if@twocolumn
       \@restonecolfalse
    \fi
    \columnseprule \z@
    \columnsep 3.5em
    \twocolumn
    \chapter{\@headidx
    \@mkboth{\uppercase{\@headidx}}
            {\uppercase{\@headidx}}}
    \thispagestyle{usplain} % rh
    \parindent\z@
    \parskip \z@ plus .03em
    \relax
    \let\item\@idxitem}

\def\endtheindex{
    \if@restonecol
       \onecolumn
    \else
       \clearpage
    \fi}

\def\@idxitem{\par\hangindent 4em}
\def\subitem{\par\hangindent 4em \hspace*{2em}}
\def\subsubitem{\par\hangindent 4em \hspace*{3em}}
\def\indexspace{\par \vskip 1em plus .5em minus .3em\relax}

%    ****************************************
%    *                LISTS                 *
%    ****************************************
%
% The following commands are used to set the default values for the list
% environment's parameters. See the LaTeX manual for an explanation of
% the meanings of the parameters.  Defaults for the list environment are
% set as follows.  First, \rightmargin, \listparindent and \itemindent
% are set to 0pt.  Then, for a Kth level list, the command \@listK is
% called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
% called for a third-level list.)  By convention, \@listK should set
% \leftmargin to \leftmarginK.
%
% For efficiency, level-one list's values are defined at top level, and
% \@listi is defined to set only \leftmargin.
% In two-column format the indentations for level i, v and vi are smaller
% than in one-column format.
%
\if@twocolumn
   \leftmargini      2em
   \leftmarginii   2.2em   % > \labelsep + width of '(m)'
   \leftmarginiii  1.87em  % > \labelsep + width of 'vii.'
   \leftmarginiv   1.7em   % > \labelsep + width of 'M.'
   \leftmarginv    0.5em
   \leftmarginvi   0.5em
\else
   \leftmargini    2.5em
   \leftmarginii   2.2em   % > \labelsep + width of '(m)'
   \leftmarginiii  1.87em  % > \labelsep + width of 'vii.'
   \leftmarginiv   1.7em   % > \labelsep + width of 'M.'
   \leftmarginv    1.0em
   \leftmarginvi   1.0em
\fi

\leftmargin\leftmargini
\labelwidth\leftmargini\advance\labelwidth-\labelsep
\labelsep .5em
\parsep .4em plus .2em minus .1em

\def\@listi{\leftmargin\leftmargini}
\def\@listii{\leftmargin\leftmarginii
    \labelwidth\leftmarginii
    \advance\labelwidth-\labelsep
    \topsep .4em plus .2em minus .1em
    \parsep .2em plus .1em minus .1em
    \itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii
    \labelwidth\leftmarginiii
    \advance\labelwidth-\labelsep
    \topsep .2em plus .1em minus .1em
    \parsep \z@
    \partopsep .1em plus 0em minus .1em
    \itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
    \labelwidth\leftmarginiv
    \advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
    \labelwidth\leftmarginv
    \advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
    \labelwidth\leftmarginvi
    \advance\labelwidth-\labelsep}

%    ****************************************
%    *           LIST ENVIRONMENTS          *
%    ****************************************
%
% ENUMERATE
%  Enumeration is done with four counters: enumi, enumii, enumiii
%  and enumiv, where enumN controls the numbering of the Nth level
%  enumeration.  The label is generated by the commands \labelenumi
%  ... \labelenumiv.  The expansion of \p@enumN\theenumN defines the
%  output of a \ref command.
%
\def\theenumi     {\arabic{enumi}}
\def\theenumii    {\alph{enumii}}
\def\theenumiii   {\roman{enumiii}}
\def\theenumiv    {\Alph{enumiv}}
\def\labelenumi   {\theenumi.}          % rh {\arabic{enumi}.}
\def\labelenumii  {(\theenumii)}        % rh {(\alph{enumii})}
\def\labelenumiii {\theenumiii.}        % rh {\roman{enumiii}.}
\def\labelenumiv  {\theenumiv.}         % rh {\Alph{enumiv}.}
\def\p@enumii     {\theenumi}
\def\p@enumiii    {\theenumi(\theenumii)}
\def\p@enumiv     {\p@enumiii\theenumiii}

% ITEMIZE
% Itemization is controlled by four commands: \labelitemi, \labelitemii,
% \labelitemiii, and \labelitemiv, which define the labels of the various
% itemization levels.
%
\def\labelitemi   {$\bullet$}
\def\labelitemii  {\bf --}
\def\labelitemiii {$\circ$}
\def\labelitemiv  {$\cdot$}

% VERSE
%   The verse environment is defined by making clever use of the
%   list environment's parameters.  The user types \\ to end a line.
%   This is implemented by \let'in \\ equal \@centercr.
%
\def\verse{
    \let\\=\@centercr
    \list{}{\itemsep       \z@
            \itemindent    -1.5em
            \listparindent \itemindent
            \rightmargin   \leftmargin
            \advance\leftmargin 1.5em}
    \item[]}
\let\endverse\endlist

% QUOTATION
%   Fills lines
%   Indents paragraph
%
\def\quotation{
    \list{}{\itemindent    1.5em
            \listparindent \itemindent
            \rightmargin   \leftmargin
            \parsep 0em plus .1em}
    \item[]}
\let\endquotation=\endlist

% QUOTE -- same as quotation except no paragraph indentation,
%
\def\quote{
    \list{}{\rightmargin\leftmargin}
    \item[]}
\let\endquote=\endlist

% DESCRIPTION
%
%  To change the formatting of the label, you must redefine
%  \descriptionlabel.
%
\def\descriptionlabel#1{\hspace\labelsep \bf #1}
\def\description{
    \list{}{\labelwidth    \z@
            \itemindent   -\leftmargin
            \let\makelabel \descriptionlabel}}
\let\enddescription\endlist
\newdimen\descriptionmargin
\descriptionmargin=3em


% DEFLIST
%
%\def\deflabel#1{\bf #1\hfill}
\def\deflabel#1{#1\hfill}
\def\deflist#1{
%    \list{}{\settowidth{\labelwidth}{\bf #1}
    \list{}{\settowidth{\labelwidth}{#1}
            \setlength{\leftmargin}{\labelwidth}
            \addtolength{\leftmargin}{\labelsep}
            \let\makelabel \deflabel}}
\let\enddeflist\endlist

%    ****************************************
%    *         OTHER ENVIRONMENTS           *
%    ****************************************
%
% THEOREM
%
% \@begintheorem ... \@endtheorem are the commands executed at the
% beginning and end of a (user-defined) theorem-like environment.
% Except \@opargbegintheorem is executed when an optional argument is
% given.  Cf. LATEX.TEX.
%
% \def\@begintheorem#1#2{
%     \it \trivlist \item[\hskip \labelsep{\bf #1\ #2}]}
% \def\@opargbegintheorem#1#2#3{
%     \it \trivlist \item[\hskip \labelsep{\bf #1\ #2\ (#3)}]}
% \def\@endtheorem{\endtrivlist}
% TITLEPAGE
%  In the normal environments, the titlepage environment does nothing but
%  start and end a page, and inhibit page numbers.  It also resets the
%  page number to zero.  In two-column style, it still makes a one-column
%  page.
%
\def\titlepage{
    \if@twocolumn
       \@restonecoltrue
       \onecolumn
    \else
       \@restonecolfalse
       \newpage
    \fi
    \thispagestyle{empty}
    \c@page\z@}

\def\endtitlepage{
    \if@restonecol
       \twocolumn
    \else
       \newpage
    \fi}

% ARRAY AND TABULAR
%
\arraycolsep    .5em  % Half the space between columns in array environment.
\tabcolsep      .6em  % Half the space between columns in tabular environment.
\arrayrulewidth .04em % Width of rules in array and tabular environment.
\doublerulesep  .2em  % Space between adjacent rules in array or tabular env.

% TABBING
%
\tabbingsep\labelsep % Space used by the \' command.  (See LaTeX manual.)

% MINIPAGE
%  \@minipagerestore is called upon entry to a minipage environment to
%  set up things that are to be handled differently inside a minipage
%  environment. In the current styles, it does nothing.
%
% \skip\@mpfootins : plays same role for footnotes in a minipage as
%                    \skip\footins does for ordinary footnotes
%
\skip\@mpfootins = \skip\footins

% FRAMEBOX
%
\fboxsep    .3em  % Space left between box and text by \fbox and \framebox.
\fboxrule   .04em % Width of rules in box made by \fbox and \framebox.

%    ****************************************
%    *             FOOTNOTES                *
%    ****************************************
%
% \footnoterule is a macro to draw the rule separating the footnotes from
% the text.  It should take zero vertical space, so it needs a negative
% skip to compensate for any positive space taken by the rule.  (See
% PLAIN.TEX.)
%
\def\footnoterule{
    \kern-3\p@
    \hrule width .4\columnwidth
    \kern 2.6\p@}               % The \hrule has default height of .04em .

% \newcounter{footnote}
\@addtoreset{footnote}{chapter}  % Numbers footnotes within chapters
%   \@makefntext{NOTE} :
%        Must produce the actual footnote, using \@thefnmark as the mark
%        of the footnote and NOTE as the text.  It is called when effectively
%        inside a \parbox of width \columnwidth (i.e., with \hsize =
%        \columnwidth).
%
%        The following macro indents all lines of the footnote by 1em, and
%        indents the first line of a new paragraph by 1em.  To change these
%        dimensions, just substitute the desired value for '10pt' [in both
%        places] or '1em'.  The mark is flushright against the footnote.
%          \long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize
%             \advance\@tempdima-10pt\parshape \@ne 1em \@tempdima}\par
%             \parindent 1em\noindent \hbox to \z@{\hss$^{\@thefnmark}$}#1}
%
%        A simpler macro is used, in which the footnote text is
%        set like an ordinary text paragraph, with no indentation except
%        on the first line of a paragraph, and the first line of the
%        footnote.  Thus, all the macro must do is set \parindent
%        to the appropriate value for succeeding paragraphs and put the
%        proper indentation before mark.
\long\def\@makefntext#1{
     \parindent    0em
     \hangindent 1.8em
     \makebox[\hangindent][r]{$^{\@thefnmark}$}#1}
% \@makefnmark : A macro to generate the footnote marker that goes
%    in the text.  Default used.
%

%    ****************************************
%    *         FIGURES AND TABLES           *
%    ****************************************
%
% Float placement parameters.  See LaTeX manual for their definition.
%
%****
%\setcounter{topnumber}    {2}
\setcounter{topnumber}     {1}
%***
%\setcounter{bottomnumber} {1}
\setcounter{bottomnumber}  {2}
%***
\setcounter{totalnumber}  {3}
%***
\setcounter{dbltopnumber} {2}
%***
%\def\topfraction          {.7}
\def\topfraction          {.8}
%***
%\def\bottomfraction       {.3}
\def\bottomfraction       {.8}
%***
%\def\textfraction         {.2}
\def\textfraction         {.1}
%***
%\def\floatpagefraction    {.5}
\def\floatpagefraction    {.2}
%***
\def\dbltopfraction       {.7}
%***
\def\dblfloatpagefraction {.5}

% \@makecaption{NUMBER}{TEXT} : Macro to make a figure or table caption.
%      NUMBER : Figure or table number--e.g., 'Figure 3.2'
%      TEXT   : The caption text.
%  Macro should be called inside a \parbox of right width, with \normalsize.
%
\long\def\@makecaption#1#2{
     \vskip 1em
     \setbox\@tempboxa\hbox{{\normalsize \sf #1: #2}}
     \ifdim \wd\@tempboxa >\hsize   % IF longer than one line THEN
        \parindent    0em
        \settowidth{\hangindent}{{\normalsize \sf #1: }}
        \makebox[\hangindent][r]{{\normalsize \sf #1: }}{\normalsize \sf #2}
%       \unhbox\@tempboxa\par       %   set as ordinary paragraph.
     \else                          % ELSE
        \hbox to\hsize{\hfil\box\@tempboxa\hfil} % center.
     \fi}
% To define a float of type TYPE (e.g., TYPE = figure), the document style
% must define the following.
%
%  \fps@TYPE   : The default placement specifier for floats of type TYPE.
%
%  \ftype@TYPE : The type number for floats of type TYPE.  Each TYPE has
%                associated a unique positive TYPE NUMBER, which is a power
%                of two.  E.g., figures might have type number 1, tables type
%                number 2, programs type number 4, etc.
%
%  \ext@TYPE   : The file extension indicating the file on which the
%                contents list for float type TYPE is stored.  For example,
%                \ext@figure = 'lof'.
%
%  \fnum@TYPE  : A macro to generate the figure number for a caption.
%                For example, \fnum@TYPE == Figure \thefigure.
%
%  The actual float-making environment commands--e.g., the commands
%  \figure and \endfigure--are defined in terms of the macros \@float
%  and \end@float, which are described below.
%
%  \@float{TYPE}[PLACEMENT] : Macro to begin a float environment for a
%     single-column float of type TYPE with PLACEMENT as the placement
%     specifier.  The default value of PLACEMENT is defined by \fps@TYPE.
%     The environment is ended by \end@float.
%     E.g., \figure == \@float{figure}, \endfigure == \end@float.

% FIGURE
%
\newcounter{figure}[chapter]
\def\thefigure{\thechapter.\@arabic\c@figure}
\def\ext@figure{lof}
\def\ftype@figure{1}
\def\fps@figure{htbp}
\def\fnum@figure{{\sf \@capfigure\ \thefigure}}
\def\figure{\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}

% TABLE
%
\newcounter{table}[chapter]
\def\thetable{\thechapter.\@arabic\c@table}
\def\ext@table{lot}
\def\ftype@table{2}
\def\fps@table{htbp}
\def\fnum@table{\@captable\ \thetable}
\def\table{\@float{table}}
\let\endtable\end@float
\@namedef{table*}{\@dblfloat{table}}
\@namedef{endtable*}{\end@dblfloat}

%    ****************************************
%    *                TITLE                 *
%    ****************************************
%
% Uses same title and abstract format as the article style's
% titlepage option.
%
\def\maketitle{
    \begin{titlepage}
    \let\footnotesize\small     % Local definitions to make \thanks produce
    \let\footnoterule\relax     % \normalsize footnotes with no separating rule.
    \setcounter{page}{0}
    \null
    \vfil
    \vskip 6em                          % To adjust centering.
    \begin{center}
       {\LARGE\@title\par}              % Set title in \LARGE size.
       \vskip 3em                       % Vertical space after title.
       { \large                         % Set author in \large size.
         \lineskip .75em
         \begin{tabular}[t]{c}\@author
         \end{tabular}\par}
       \vskip 1.5em                     % Vertical space after author.
       {\large \@date \par}             % Set date in \large size.
    \end{center}\par
    \@thanks
   \vfil
   \null
   \end{titlepage}
   \setcounter{footnote}{0}             % Footnotes start at zero again.
   \let\thanks\relax
   \gdef\@thanks{}
   \gdef\@author{}
   \gdef\@title{}
   \let\maketitle\relax}

%    ****************************************
%    *            PAGE STYLES               *
%    ****************************************
%
% The page style 'foo' is defined by defining the command \ps@foo.  This
% command should make only local definitions.  There should be no stray
% spaces in the definition, since they could lead to mysterious extra
% spaces in the output.
%
% The \ps@... command defines the macros \@oddhead, \@oddfoot,
% \@evenhead, and \@evenfoot to define the running heads and
% feet---e.g., \@oddhead is the macro to produce the contents of the
% heading box for odd-numbered pages.  It is called inside an \hbox of
% width \textwidth.
%
% To make headings determined by the sectioning commands, the page style
% defines the commands \chaptermark, \sectionmark, ... , where
% \chaptermark{TEXT} is called by \chapter to set a mark, and so on.
% The \...mark commands and the \...head macros are defined with the
% help of the following macros.  (All the \...mark commands should be
% initialized to no-ops.)
%
% MARKING CONVENTIONS:
% LaTeX extends TeX's \mark facility by producing two kinds of marks
% a 'left' and a 'right' mark, using the following commands:
%     \markboth{LEFT}{RIGHT} : Adds both marks.
%     \markright{RIGHT}      : Adds a 'right' mark.
%     \leftmark  : Used in the \@oddhead, \@oddfoot, \@evenhead or \@evenfoot
%                  macro, gets the current 'left'  mark.  Works like TeX's
%                  \botmark command.
%     \rightmark : Used in the \@oddhead, \@oddfoot, \@evenhead or \@evenfoot
%                  macro, gets the current 'right'  mark.  Works like TeX's
%                  \firstmark command.
% The marking commands work reasonably well for right marks 'numbered
% within' left marks--e.g., the left mark is changed by a \chapter command and
% the right mark is changed by a \section command.  However, it does
% produce somewhat anomalous results if two \bothmark's occur on the same page.
%
% Commands like \tableofcontents that should set the marks in some page styles
% use a \@mkboth command, which is \let by the pagestyle command (\ps@...)
% to \markboth for setting the heading or \@gobbletwo to do nothing.
%
\mark{{}{}}   % Initializes TeX's marks
% \ps@empty and \ps@plain defined in LATEX.TEX

% Definition of 'headings' page style
%
%  Note the use of ##1 for parameter of \def\chaptermark inside the
%  \def\ps@headings.
%
\def\ps@headings{
    \let\@mkboth\markboth
    \def\@evenhead{\rm\thepage\hfil \sl\leftmark\hbox{}}% Left heading.
    \def\@oddhead{\hbox{}\sl\rightmark \hfil\rm\thepage}% Right heading.
    \def\@oddfoot{}
    \def\@evenfoot{}
    \def\chaptermark##1{
        \markboth{\uppercase{\ifnum \c@secnumdepth >\m@ne
                                \@chapapp\ \thechapter. \
                             \fi ##1}}{}}%
    \def\sectionmark##1{\markright{\uppercase{ \ifnum \c@secnumdepth >\z@
                                                  \thesection. \
                                               \fi ##1}}}}
% Definition of 'myheadings' page style.
%
\def\ps@myheadings{
    \let\@mkboth\@gobbletwo
    \def\@oddhead{\hbox{}\sl\rightmark \hfil\rm\thepage}
    \def\@evenhead{\rm\thepage\hfil \sl\leftmark\hbox{}}
    \def\@oddfoot{}
    \def\@evenfoot{}
    \def\sectionmark##1{}
    \def\subsectionmark##1{}}
% Definition of 'usplain' page style.
%
\def\ps@usplain{
    \let\@mkboth\@gobbletwo
    \def\@oddhead {\hfil \thepage \hfil }
    \def\@evenhead{\hfil \thepage \hfil }
    \def\@oddfoot{}
    \def\@evenfoot{}
    \def\sectionmark##1{}
    \def\subsectionmark##1{}}

%    ****************************************
%    *            MISCELLANEOUS             *
%    ****************************************
%
% EQUATION and EQNARRAY -- put here because it must follow \chapter definition
%
% \newcounter{equation}
%
\@addtoreset{equation}{chapter}   % Makes \chapter reset 'equation' counter.
\def\theequation{\thechapter.\arabic{equation}}

% \jot = 0.3em     % Extra space added between lines of an eqnarray environment
% The macro \@eqnnum defines how equation numbers are to appear in equations.
%
% \def\@eqnnum{(\theequation)}
%
\def\bs{$\backslash$}
\let\3\ss

%    ****************************************
%    *           INITIALIZATION             *
%    ****************************************
%
% Default initializations
%
\if@twocolumn \twocolumn \sloppy % Two-column.
\else         \onecolumn \fussy  % Single-column.
\fi
\pagenumbering{arabic}           % Arabic page numbers
\pagestyle{usplain}              % `usplain' page style
\makeatother                     % re-make at a special character