summaryrefslogtreecommitdiff
path: root/obsolete/macros/latex209/contrib/tamueethesis/eethesis.sty
blob: d952e5eb061530a986b3bb5117eb978d7b556eab (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
% EETHESIS DOCUMENT STYLE -- Version 2.22 Released 21 July 1993
% EETHESIS DOCUMENT STYLE -- Version 2.21 Released 5 July 1991
% EETHESIS DOCUMENT STYLE -- Version 2.2 Released 20 November 1990
% EETHESIS DOCUMENT STYLE -- Version 2.1 Released 20 June 1989
% Adapted from report.sty for LaTeX version 2.09
% Copyright (C) 1985 by Leslie Lamport
%
% Change History:
%   1)  fixed roman numeral problem in list of tables 28 Feb 1989 --- RLO
%   2)  eliminated extra spacing at top of References section 3 May 1989 --- RLO
%   3)  Fixed problem with two line chapter titles in table of contents
%	where the second line did not indent properly. This problem
%	only appeared  with versions of latex after the 4 Aug 88 release.
%       -p cantrell june 20, 1989
%   4)  Caption text set to be \def\captionpace{\baselineskip=18pt}. 
%       --Ken 4-20-90
%   5)  In \listoffigures(\listoftables) the space between figure(table) line is
%       doublespaced, however, the space inside figure(table) line is \tocspace.
%       --Ken 5-28-90
%   6)  The numbers of 'TABLE OF CONTENTS', 'LIST OF FIGURES', and 'LIST OF 
%       TABLES' in tableofcontents, listoffigures, and listoftables can be 
%       switched to be lined up to right hand side of the box. The default is
%       lined up to the left hand side of the box, the command for switching to 
%       be lined up to the right hand side of the box is \tocnumflushright. 
%       The box of the number may be too samll, 
%       the user can set the width of the box by setting \fignumbox to the 
%       number the user thinks that is right (the default is 4em).
%       --Todd and Ken. 6-5-90
%    7) newcommand \longcaption{sentence 1}{rest of caption}
%       only 'sentence 1' will be written to the lof/lot as appropriate.
%       'sentence 1' and 'rest of caption' will be written together to the
%       figure/table caption.
%       --Todd 
%    8) Multiline Fig/Tab captions shown as following
%       
%       Fig. ##.  Long caption ....
%                 Start of second line ...
%                 Statr of Third line ...
%                 etc.
%       --Todd
%   9)  Put more sapce for Chapter headings before start of text.
%       --Todd
%  10)  The first paragraph indented for section and subsection.
%       --Todd
%  11)  Improve to set the title on the abstract page
%       --Todd
%  12)  Include doublespace.sty from Jean-Francois Lamy, and make the single 
%       space in tabbing and tabular environment possible. It is simply write
%       as following.
%       \begin{sspace} 
%        \begin{tabbing}(or \begin{tabular})
%         \foo
%         \foo
%        \end{tabular}(or \end{tabular}
%       \end{sspace}
%       For normal text just type \singlespace to switch to single spaced 
%       contents, if it does not work, then try use \sspace environment.
%       --Ken 7-16-90 
%  13)  Blueline emulating. If you want the blueline emulating alive, just
%       type \blueline, and then there will generate a frame similar to blue
%       line in every page.  
%       --Ken 7-24-90
%  14)  verbatimfiles, this macro is adopted from Chris Rowley. It can include
%       code that the thesis either in the text or in the appendix. 
%       \verbatimfile{<filename>}    for verbatim inclusion of a file
%       \verbatimlisting[n]{<filename>} for verbatim inclusion
%                                       with line numbers every nth line
%       --Ken 7-24-90
%  15)  Originally when \ref chapter, section, or subsection, the \label
%       always generate 'chapter.', 'section.' and 'subsection.'. In this
%       version, the '.' is gone.
%       --Ken 7-24-90 
%  16)  Table of Contents would violate the blue line at the bottom
%	of the page if certain letters were used on the lower most
%	line such as 'g' or 'q'.  Removed some of the space between
%	lines of the table of contents to compress vertically the
%	text.  This was accomplished by changing the
%       \vspace*{-1em} to \vspace*{-2em}.
%	--John Hermann 4-22-93
%  17)	Reduced the length of the line used by footnotes to separate
%	the footnote from the text.  This was done so that the 10
%	character length requirement for the first footnote was
%	satisfied as specified by the thesis manual.
%	--John Hermann (jkh) 3-29-93
%  18)  The \parindent variable was changed from 20pt to 25pt in the
%       \verbatimlisting function.
%	--John Hermann 4-22-93
%  19)  The signature(approval) page has been modified based on
%	the OGS Thesis Manual version July 1992. This modification is
%	made in the eethetitle.sty file.
%	--Wen-Lin Hsieh 7-21-1993

%\typeout{Document Style 'report'.  Released 23 September 1985}
%\typeout{Document Style 'eethesis'.  Ver. 2.1 Released 20 June 1989}
%\typeout{Document Style 'eethesis'.  Ver. 2.2 Released 20 November 1990}
\typeout{Document Style 'eethesis'.  Ver. 2.21 Released 5 July 1991}

%  The type size option is handled by reading a different file for each
%  size, as follows, to define font size-specific commands:
%       10pt : THE10, 11pt : THE11, 12pt : THE12
%  Implemented by \def'ing \@ptsize to last digit of file name.
%
%  In eethesis of Electrical Engineering Dept. at Texas A&M university
%  only 12pt is available. The relational style files are eethe12.sty,
%  and eethetitle.sty.
%

\def\@ptsize{2}               % Default is THE12.STY
\@namedef{ds@11pt}{\def\@ptsize{1}} % 11pt option reads in THE11.STY
\@namedef{ds@10pt}{\def\@ptsize{0}} % 10pt option reads in THE10.STY

%  Two-side or one-side printing.
%
% \@twosidefalse               %  Default is one-sided printing.
\def\ds@twoside{\@twosidetrue  %  Defines twoside option.
           \@mparswitchtrue}   %    Marginpars go on outside of page.
%  draft option
%
% \overfullrule = 0pt             % Default is don't mark overfull hboxes.
\def\ds@draft{\overfullrule 5pt}  % Causes overfull hboxes to be marked.

% 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.

\@options

\input eethe1\@ptsize.sty\relax


%    ****************************************
%    *                LISTS                 *
%    ****************************************
%

% 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\labelenumi{\arabic{enumi}.}
\def\theenumi{\arabic{enumi}}

\def\labelenumii{(\alph{enumii})}
\def\theenumii{\alph{enumii}}
\def\p@enumii{\theenumi}

\def\labelenumiii{\roman{enumiii}.}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}

\def\labelenumiv{\Alph{enumiv}.}
\def\theenumiv{\Alph{enumiv}}
\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{$\ast$}
\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{}{\listparindent 1.5em
    \itemindent\listparindent
    \rightmargin\leftmargin\parsep 0pt plus 1pt}\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


%    ****************************************
%    *         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{
     \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
     \else \newpage \fi \thispagestyle{empty}\c@page\z@}

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

% ARRAY AND TABULAR
%

\arraycolsep 5pt     % Half the space between columns in an array environment.
\tabcolsep 6pt       % Half the space between columns in a tabular environment.
\arrayrulewidth .4pt % Width of rules in array and tabular environment.
\doublerulesep 2pt   % 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 = 3pt    % Space left between box and text by \fbox and \framebox.
\fboxrule = .4pt  % Width of rules in box made by \fbox and \framebox.


%    ****************************************
%    *        CHAPTERS AND SECTIONS         *
%    ****************************************
%
% 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]
%
% thesis mod
\newcounter {appendix}
\newcounter {sucount}		% counter for supplemental sources
%
% 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}}
%
% old eethesis mod
%\def\thepart          {\Roman{part}.}
%\def\thechapter       {\Roman{chapter}}
%\def\thesection       {\Alph{section}.}
%\def\thesubsection    {\arabic{subsection}.}
%\def\thesubsubsection {\alph{subsubsection}.}
%\def\theparagraph     {\null}
%\def\thesubparagraph  {\null}
%\def\theappendix      {\Alph{appendix}}
%
% thesis mod
\def\thepart          {\Roman{part}.}
\def\thechapter       {\Roman{chapter}}
\def\thesection       {\Alph{section}}
\def\thesubsection    {\arabic{subsection}}
\def\thesubsubsection {\alph{subsubsection}}
\def\theparagraph     {\null}
\def\thesubparagraph  {\null}
\def\theappendix      {\Alph{appendix}}

%
% when ref section(subsection and subsubsection) there is no '.' generated after
% section number any more.   Ken 6-29-90
%
\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
     \def\@svsec{}\else 
     \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname.\hskip 1em }\fi
     \@tempskipa #5\relax
      \ifdim \@tempskipa>\z@ 
        \begingroup #6\relax
          \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
        \endgroup
       \csname #1mark\endcsname{#7}\addcontentsline
         {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                      \protect\numberline{\csname the#1\endcsname.}\fi
                    #7}\else
        \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
                      {#7}\addcontentsline
                           {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                             \protect\numberline{\csname the#1\endcsname.}\fi
                       #7}}\fi
     \@xsect{#5}}

% \@chapapp is initially defined to be 'Chapter'.  The \appendix
% command redefines it to be 'Appendix'.
%
\def\@chapapp{CHAPTER}



%    ****************************************
%    *         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

\def\@pnumwidth{1.5em}
\def\@tocrmarg {4.5em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}


% TABLEOFCONTENTS
%  In report style, \tableofcontents, figures, etc. are always
%  set in single-column style.  @restonecol

\newdimen\toddhack
\newdimen\twoem \twoem 0em
\newdimen\zeroem \zeroem 0em
\newdimen\fignumbox \fignumbox 4em

\def\tocnumflushright{
\twoem 2em
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   The justification of the chapter heads is on the left side instead of
%   the right
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   The macro below controls how the box is formed.  
%\def\numberline#1{\hbox to\@tempdima{#1\hfil}}
\def\numberline##1{\hbox to\@tempdima{\hfil##1\hskip 2ex\hskip \toddhack}}

%
%   these control the spacing from the left margin
%   #1 is the indentation level at which an entry is produced in the toc file
%   #2 is the total indentation from the left margin
%   #3 is the width of the box containing the chapter/section number
%

\def\l@section{\@dottedtocline{1}{4em}{2.0em}}
\def\l@subsection{\@dottedtocline{2}{6em}{2.0em}}
\def\l@subsubsection{\@dottedtocline{3}{8.0em}{2.0em}}
\def\l@paragraph{\@dottedtocline{4}{7em}{2.0em}}
\def\l@subparagraph{\@dottedtocline{5}{8em}{2.0em}}


\def\l@chapter##1##2{\pagebreak[3]
\vskip 0.75em plus 1pt %%%%%% 1 em seems too large, 
                       %%%%%% change to 0.75em; by Ken 7-8-91
{\leftskip 0em\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent 0em\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima 4em \toddhack 1em \relax
\advance\leftskip \@tempdima \hbox{}\hskip -\leftskip
\uppercase{##1}\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern
\@dotsep mu$}\hfill \nobreak \hbox to\@pnumwidth{\hfil\rm ##2}\par}
\vskip 0.5em plus 1pt\toddhack 0em}} %%% change 1 em to 0.5em; by Ken 7-8-91.

\def\tableofcontents{
\newpage
   \let \tempp \topskip
   \topskip 1em
%  \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi
% thesis mod
\tocspace
%
%  \chapter*{TABLE OF CONTENTS\markright{CONTENTS}}
% thesis mod
  \chapter*{\vspace*{-2em}TABLE OF CONTENTS\markright{CHAPTER}} % change -1em to -2em ; by jkh(16) 4-22-1993
  {\vskip -1em CHAPTER \hfill Page\\}
  \thispagestyle{myheadings}
%
  \@starttoc{toc}
%  \if@restonecol\twocolumn\fi}
% thesis mod
  \doublespace  \topskip \tempp}
%
%\def\l@part#1#2{\addpenalty{-\@highpenalty}
%   \addvspace{2.25em plus 1pt}  % space above part line
%   \begingroup
%   \@tempdima 3em         % width of box holding part number, used by
%     \parindent \z@ \rightskip \@pnumwidth             %% \numberline
%     \parfillskip -\@pnumwidth
%     {\large \bf          % set line in \large boldface
%     \leavevmode          % TeX command to enter horizontal mode.
%     #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
%     \nobreak             % Never break after part entry
%   \endgroup}
%
% thesis mod
\def\l@part#1#2{\pagebreak[3]
  \vskip 0.75em plus 1pt  % space above chapter line
                          %% change 1 em to 0.75em; by Ken 7-8-91.
   \@tempdima 1.5em       % width of box holding chapter number
   \begingroup
     \parindent \z@ \rightskip \@pnumwidth
     \parfillskip -\@pnumwidth
     \leavevmode          % TeX command to enter horizontal mode.
     #1\dotfill \hbox to\@pnumwidth{\hss #2}\par
   \endgroup}

\def\l@chapter#1#2{\pagebreak[3]
   \vskip 0.75em plus 1pt   % space above chapter line
                            %% change 1 em to 0.75em; by Ken 7-8-91.
%   \@tempdima 1.55em       % width of box holding chapter number
% thesis mod
%	this section is adapted from def of \@dottedtocline
% change hangindent in next line to 
%  leftskip 6-20-89 to work with later latex changes
    {\leftskip 2em\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent 2em\relax\@afterindenttrue
    \interlinepenalty\@M
    \leavevmode
    \@tempdima 4em\relax       % width of box holding chapter number
% change 6-20-89
    \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip
% end 6-20-89
     \uppercase{#1}\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern 
       \@dotsep mu$}\hfill \nobreak \hbox to\@pnumwidth{\hfil\rm #2}\par}
    \vskip 0.5em plus 1pt}  % space below chapter line
                            %% change 1 em to 0.5em; by Ken 7-8-91.
%
%   \begingroup
%     \parindent \z@ \rightskip \@pnumwidth
%     \parfillskip -\@pnumwidth
%     \bf                  % Boldface.
%     \leavevmode          % TeX command to enter horizontal mode.
%     #1\hfil \hbox to\@pnumwidth{\hss #2}\par
%
%
%   \endgroup}

%\def\l@section{\@dottedtocline{1}{1.55em}{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}}
%
% thesis mod
\def\l@section{\@dottedtocline{1}{7em}{1.5em}}
\def\l@subsection{\@dottedtocline{2}{9em}{1.5em}}
\def\l@subsubsection{\@dottedtocline{3}{11em}{1.5em}}
\def\l@paragraph{\@dottedtocline{4}{13em}{1.5em}}
\def\l@subparagraph{\@dottedtocline{5}{14em}{1.5em}}
%

%LIST OF FIGURES
%
%\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
%  \fi\chapter*{LIST OF FIGURES\markboth
%   {LIST OF FIGURES}{LIST OF FIGURES}}\@STARTTOC{lof}\if@restonecol\twocolumn
%  \fi}
%
% thesis mod
\def\listoffigures{\tocspace   % \tocspace for \listoffigures, Ken 5-28-90
   \let \tempp \topskip
   \topskip 1em
   \chapter*{LIST OF FIGURES\markright{Figure}}
   {\vskip -1em FIGURE \hfill Page\\}
   \thispagestyle{myheadings}
     \toddhack \twoem
    \@starttoc{lof}\if@restonecol\twocolumn
     \toddhack \zeroem
   \fi\topskip \tempp \doublespace}
%
%\def\l@figure{\@dottedtocline{1}{0em}{5em}}
%%%%
%%%%
%%%% Inside the figure line is \tocspaced (16pt)
%%%% Between the figureline is 1.0em
%%%% Revised by Ken, 5-28-90
%%%% 
%%%%
   %\begin
\def\l@figure#1#2{\pagebreak[3]
   \vskip .5em plus 1pt  % space above figure line
     {\leftskip 0pt\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent 0pt\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode               
     \@tempdima \fignumbox\relax       % width of box holding figure number
                                       % \fignumbox default to 4em
     \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip
       #1\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern 
       \@dotsep mu$}\hfill \nobreak \hbox to\@pnumwidth{\hfil #2}\par}
   \vskip .5em plus 1pt}  % space below figure line
    %\end

% LIST OF TABLES
%
%\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
%  \fi\chapter*{LIST OF TABLES\markboth
%   {LIST OF TABLES}{LIST OF TABLES}}\@starttoc{lot}\if@restonecol\twocolumn
%  \fi}
% thesis mod
\def\listoftables{\tocspace
   \let \tempp \topskip
   \topskip 1em
   \chapter*{\vspace*{-1em}LIST OF TABLES\markright{Table}}
   {\vskip -1em TABLE \hfill Page\\}
   \thispagestyle{myheadings}
     \toddhack \twoem
    \@starttoc{lot}\if@restonecol\twocolumn
     \toddhack \zeroem
   \fi\topskip \tempp \doublespace}
%
\let\l@table\l@figure



%    ****************************************
%    *             BIBLIOGRAPHY             *
%    ****************************************
%
%
%  \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{
\addcontentsline{toc}{chapter}{\null\hspace{4.0em}REFERENCES}
%
% Modification to eliminate extra space 5-3-89   --- RLO
%\chapter*{REFERENCES\markboth{REFERENCES}{REFERENCES}}\list
\vskip .2truein
\centerline{REFERENCES}
\bigskip
\list    % ******* LOST FOR SOME REASON, BUT RECOVERED AT RIGHT NOW ****** 
%
  {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumi}}
    \def\newblock{\hskip .11em plus .33em minus -.07em}
    \sloppy
    \sfcode`\.=1000\relax}

\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 35pt\twocolumn[\@makeschapterhead{Index}]
    \markboth{INDEX}{INDEX}\thispagestyle{plain}\parindent\z@
    \parskip\z@ plus .3pt\relax\let\item\@idxitem}

\def\@idxitem{\par\hangindent 40pt}

\def\subitem{\par\hangindent 40pt \hspace*{20pt}}

\def\subsubitem{\par\hangindent 40pt \hspace*{30pt}}

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

\def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax}


%    ****************************************
%    *             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.)

%  Paper format footnote separating line on first page of body must be 10 chars.
%  Therefore, changed the hrule below from .4 to .125
%  John Hermann (jkh(17)) March 27, 1993
\def\footnoterule{\kern-1\p@
  \hrule width .125\columnwidth
  \kern .6\p@}                 % The \hrule has default height of .4pt .

% \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 10pt, 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 10pt \@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 1em\noindent
            \hbox to 1.8em{\hss$^{\@thefnmark}$}#1}
%
% thesis mod
%\long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize
%  \advance\@tempdima-10pt\parshape \@ne 10pt \@tempdima}\par
%  \parindent 1em\noindent \hbox to z@{\hss$^{\@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}
\def\topfraction{.7}
\setcounter{bottomnumber}{1}
\def\bottomfraction{.3}
\setcounter{totalnumber}{3}
\def\textfraction{.2}
\def\floatpagefraction{.5}
\setcounter{dbltopnumber}{2}
\def\dbltopfraction{.7}
\def\dblfloatpagefraction{.5}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   Long Captions --  this is a slightly modified \caption to allow just
%                     the first sentence on a very long caption to be
%                     written on the lof/lot
%
%   \longcaption{sentence 1}{rest of caption}
%
%   only 'sentence 1' will be written to the lof/lot as appropriate.
%   'sentence 1' and 'rest of caption' will be written together to the
%   figure/table caption. --Todd
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%  \@dblarg{CMD}{ARG}  : \@dblarg{CMD}{ARG} expands to CMD[ARG]{ARG}.  Use
%                        \@dblarg\CS when \CS takes arguments [ARG1]{ARG2}, 
%                        where default is ARG1 = ARG2.
%
% \def\caption{\refstepcounter\@captype \@dblarg{\@caption\@captype}}


\def\longcaption{\refstepcounter\@captype \@longcaption\@captype}

\long\def\@longcaption#1#2#3{\par\addcontentsline{\csname
  ext@#1\endcsname}{#1}{\protect\numberline{\csname 
  the#1\endcsname}{\ignorespaces #2}}\begingroup
    \@parboxrestore
    \normalsize
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #2 #3}\par
  \endgroup}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   Multiline Fig. captions --  calculated the width of "Fig. ##. "
%   and use that to indent the caption so all lines will allign under the
%   first letter of the caption rather than against the right margin.
%
%   Fig. ##.  Long caption ....
%             Start of second line....
%             third line ...  etc.
%   --Todd
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \@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.

\def\captionspace{\baselineskip=18pt} %%%%%%%%%%%%%%%%% 4-24-90
                                      %% \captionspace is added by Ken 4-20-90
\long\def\@makecaption#1#2{       
   \vskip 10pt 
   \setbox\@tempboxa\hbox{#1 #2}  %  
   \ifdim \wd\@tempboxa >\hsize   %  IF longer than one line:
      \captionspace               %   THEN measure the width of "Fig. ##. "
      \setbox\@tempboxa\hbox{#1}  %       we'll indent the entire TEXT portion
      \hangindent=\wd\@tempboxa   %       of the caption by this amount.
      \hangafter=0                %       The Fig. num. is typeset as a negative
                                  %       width hbox to cancel the \hangindent
                                  %       on the first line. This the only way
                                  %       I could line things up without
                                  %       messing with tex glue.
      \setbox\@tempboxa\hbox{\llap{#1 }#2}
      \unhbox\@tempboxa\par        %       set TEXT as an ordinary paragraph
      \doublespace                % 
     \else                        %  ELSE  center.
       \hbox to\hsize{\hfil\box\@tempboxa\hfil}
   \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}
%\@addtoreset{figure}{chapter}
%\def\thefigure{\@arabic\c@figure}
%
% thesis mod
\def\thefigure{\@arabic\c@figure}

\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{Fig.\ \thefigure.}
\def\figure{\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}

% TABLE
%
\newcounter{table}
%\@addtoreset{table}{chapter} 
%\def\thetable{\@arabic\c@table}
% thesis mod
%
\def\thetable{\@Roman\c@table}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{Table \thetable.}
\def\table{\@float{table}}
\let\endtable\end@float
\@namedef{table*}{\@dblfloat{table}}
\@namedef{endtable*}{\end@dblfloat}


%    ****************************************
%    *         TITLE AND ABSTRACT           *
%    ****************************************
%
%
% Uses same title and abstract format as the article style's
% titlepage option.

\input eethetitle.sty


%    ****************************************
%    *            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.
%

\mark{{}{}}   % Initializes TeX's marks

% \def\ps@empty{\def\@oddhead{}
%   \def\@oddfoot{}
%   \def\@evenhead{}\def\@evenfoot{}}
%
% \def\ps@plain{\def\@oddhead{}
%   \def\@oddfoot{\rm\hfil\thepage\hfil}
%   \def\@evenhead{}
%   \let\@evenfoot\@oddfoot}

% Definition of 'headings' page style
%  Note the use of ##1 for parameter of \def\chaptermark inside the
%  \def\ps@headings.
%

\def\@headmk{\vbox to 36pt{\hbox to \hsize{\hfil \rm\thepage} %Ken 11-16-90
                    \vskip 37pt 
		    \hbox to \hsize{\rightmark \hfil Page}}}
\if@twoside         % If two-sided printing.
\def\ps@headings{\def\@oddfoot{}\def\@evenfoot{}%       No feet.
%\def\@evenhead{\rm \thepage\hfil \sl \leftmark}%        Left heading.
%\def\@oddhead{\hbox{}\sl \rightmark \hfil \rm\thepage}% Right heading.
\def\@evenhead{\vbox to 36pt{\hbox to \hsize{\rm\thepage \hfil} % Ken 11-16-90
                    \vskip 37pt 
		    \hbox to \hsize{\leftmark\hfil Page}}}
\def\@oddhead{\@headmk} %%%%%%%%%%%% Ken 11-16-90
\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}}}}
\else               % If one-sided printing.
\def\ps@headings{\def\@oddfoot{}\def\@evenfoot{}%     No feet.
%\def\@oddhead{\hbox {}\sl \rightmark \hfil \rm\thepage}% Heading.
%
% thesis mod
\def\@oddhead{\@headmk} %%%%%%%%%%%% Ken 11-16-90
%\def\@oddhead{\vbox to 36pt{\hbox to \hsize{\hfil \rm\thepage}
%                   \vskip 12pt
% For page number moving to between top edge and blue line the \vskip should
% be changed from 12 pt to 37pt. ******* K. C. 12-4-89 
%                    \vskip 37pt 
%		    \hbox to \hsize{\rightmark \hfil Page}}}
%
\def\chaptermark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\m@ne
  \@chapapp\ \thechapter. \ \fi ##1}}}}
\fi

% Definition of 'myheadings' page style.
%
% thesis mod - change necessary for headings on continued pages of toc, etc.
%
%\def\ps@myheadings{\def\@oddhead{\hbox{}\sl\rightmark \hfil \rm\thepage}%
\def\ps@myheadings{\def\@oddhead{\vbox to \headheight{\hbox to \hsize{\hfil 
				 \rm\thepage}\vfill}}
\def\@oddfoot{}\def\@evenhead{\rm \thepage\hfil\null\hbox {}}
%\sl\leftmark\hbox {}}%
\def\@evenfoot{}\def\sectionmark##1{}\def\subsectionmark##1{}}



%    ****************************************
%    *            MISCELLANEOUS             *
%    ****************************************
%
% DATE
%
\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\day, \number\year}

% EQUATION and EQNARRAY -- put here because it must follow \chapter definition
% thesis mod
%
% \newcounter{equation}
%
\@addtoreset{equation}{chapter}   % Makes \chapter reset 'equation' counter.

\def\theequation{\arabic{chapter}.\arabic{equation}}

% \jot = 3pt      % Extra space added between lines of an eqnarray environment

% The macro \@eqnnum defines how equation numbers are to appear in equations.
%
% \def\@eqnnum{(\theequation)}
%


%    ****************************************
%    *           INITIALIZATION             *
%    ****************************************
%
% Default initializations

% thesis mod
%\ps@plain                   % 'plain' page style
\ps@myheadings		    % default is `myheadings' page style
%
\pagenumbering{arabic}      % Arabic page numbers 
\onecolumn                  % Single-column.
\if@twoside\else\raggedbottom\fi % Ragged bottom unless twoside option.

%    ***************************************
%    *     SINGLESPACE ANd DOUBLESPACE	   *
%    ***************************************     


%-------------------------------------------------------------------------------
%
% LaTeX Document style option "doublespace"
% -- usage:  \documentstyle[...,doublespace,...]{...}
%
% This style option produces a double-spaced document by redefining
% the LaTeX parameter \baselinestretch to 2.
%
% It also fixes a number of problems with standard LaTeX, as follows:
%
% 1. A new environment "singlespace" is provided, within which single
%    spacing will apply.
%    JFL - changed so that it works in regular text and so that vertical
%    space is before and after is correctly computed
% 2. Double spacing is turned off within footnotes and floats (figures
%    and tables).
% 3. Proper double spacing happens below tabular environments and in other
%    places where LaTeX uses a strut.
% 4. Slightly more space is inserted before footnotes.
% 5. JFL - fixes spacing before and after displayed math
%
% Note: This version sets a baselinestretch of 2. If this is too much,
%    put  \setstretch{1.7}  (or some appropriate value) before the
%    \begin{document} command. To print the document with single spacing
%    again, without removing "singlespace" environments, just put a
%    \setstretch{1} at the top of the document.
%
% PLEASE REPORT ANY BUGS
%
% Modified by: Jean-Francois Lamy
%                          lamy@ai.toronto.edu
%                          lamy@utai.uucp
%
% Author: Stephen Page  -- sdpage@prg.oxford.ac.uk
%                          sdpage%prg.oxford.ac.uk@cs.ucl.ac.uk
%
% Release date: 6 July 1986 - September 3, 1986
%
% Known bugs:
%    . It might be nice if spacing before the footnote rule (\footins)
%      were provided in a tidier way.
%    . Increasing struts may possibly cause some other obscure part of
%      formatting to fall over.
%    . \begin{singlespace}\begin{quote} produces the wrong spacing before
%      the quote (extra glue is inserted).
%    . shouldn't @setsize stretch parskip as well?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%---Set up double spacing

%\def\baselinestretch{1}


%---New command "\setstretch" (slightly more mnemonic... and easier to type)

\def\setstretch#1{\renewcommand{\baselinestretch}{#1}}

%---Stretch the baseline BEFORE calculating the strut size. This improves
%   spacing below tabular environments etc., probably...
%   Comments are welcomed.

\def\@setsize#1#2#3#4{\@nomath#1%
   \let\@currsize#1\baselineskip
   #2\baselineskip\baselinestretch\baselineskip
   \parskip\baselinestretch\parskip
   \setbox\strutbox\hbox{\vrule height.7\baselineskip
      depth.3\baselineskip width\z@}%
   \normalbaselineskip\baselineskip#3#4}


%---Increase the space between last line of text and footnote rule.
%   This is a very untidy way to do it!

\skip\footins 20pt plus4pt minus4pt


%---Reset baselinestretch within footnotes and floats. Originally stolen
%   from Stanford thesis style.

\def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
   \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
      \@parmoderr\@floatpenalty\z@
    \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
       \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
       \@tfor \@tempa :=#2\do
                        {\if\@tempa h\advance\@tempcnta \@ne\fi
                         \if\@tempa t\advance\@tempcnta \tw@\fi
                         \if\@tempa b\advance\@tempcnta 4\relax\fi
                         \if\@tempa p\advance\@tempcnta 8\relax\fi
         }\global\count\@currbox\@tempcnta}\@fltovf\fi
    \global\setbox\@currbox\vbox\bgroup 
    \def\baselinestretch{1}\small\normalsize
    \boxmaxdepth\z@
    \hsize\columnwidth \@parboxrestore}
\long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize
    \interlinepenalty\interfootnotelinepenalty 
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
   \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
    {\rule{\z@}{\footnotesep}\ignorespaces
      #1\strut}}}

% Stolen from MIT.
%
% A single spaced quote (say) is done by surrounding singlespace with quote.
%
\def\sspace{%
\vskip\parskip%
\vskip\baselineskip%
\def\baselinestretch{0.65}%
\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
\vskip-\parskip%
\vskip-\baselineskip%
}

\def\endsspace{\par}

%  spacing, doublespace and onehalfspace all are meant to INCREASE the
%  spacing (i.e. calling onehalfspace from within doublespace will not
%  produce a graceful transition between spacings)
%
\def\spacing#1{\par%
 \def\baselinestretch{#1}%
 \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi}

\def\endspacing{\par%
 \vskip \parskip%
 \vskip \baselineskip%
 \endgroup%
 \vskip -\parskip%
 \vskip -\baselineskip%
 \begingroup}

\def\onehalfspace{\spacing{1.5}}
\let\endonehalfspace=\endspacing

\def\dspace{\spacing{2}}
\let\dspace=\endspacing

% Fix up spacing before and after displayed math
% (arraystretch seems to do a fine job for inside LaTeX displayed math,
% since array and eqnarray seem to be affected as expected)
% Changing \baselinestretch and doing a font change also works if done here,
% but then you have to change @setsize to remove the call to @nomath)
%
\everydisplay{
   \abovedisplayskip \baselinestretch\abovedisplayskip%
   \belowdisplayskip \abovedisplayskip%
   \abovedisplayshortskip \baselinestretch\abovedisplayshortskip%
   \belowdisplayshortskip  \baselinestretch\belowdisplayshortskip}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%          verbatimfiles, adopted from Chris Rowley           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --- This LaTeX style-file defines two user-callable macros:
% ---     \verbatimfile{<filename>}    for verbatim inclusion of a file
% ---     \verbatimlisting[n]{<filename>} for verbatim inclusion
%                                         with line numbers every nth line
%
% --- The macros are based on those distributed with Sunil Podar's
% --- `EPIC.STY' macro package, attributed to Tim Morgan,
% --- modified to keep internal macros internal by Adrian F. Clark,
% --- alien@uk.ac.essex.ese
% --- ---and further latexification by Chris Rowley,
% --- ca_rowley@uk.ac.open.acs.vax.
% --- optional argument for numbering multiples of [N] by H. Schulzrinne
%     hgschulz@cs.umass.edu
%
% --- Note that the precise layout of line breaks in this file is important!
%

\def\verbatimfile#1{\begingroup
                    \@verbatim\frenchspacing \@vobeyspaces
                    \input#1 \endgroup
}

\newcounter{lineno}\newcounter{Lineno}
\def\verbatimlisting{\@ifnextchar[{\@verbatimlisting}{\@verbatimlisting[5]}}
\def\@verbatimlisting[#1]#2{\setcounter{lineno}{0}\setcounter{Lineno}{0}%
  \begingroup \@verbatim \frenchspacing \@vobeyspaces \parindent=25pt %jkh(18)
  \everypar{\stepcounter{lineno}\stepcounter{Lineno}\ifnum\value{Lineno}=#1
    \setcounter{Lineno}{0}\llap{\footnotesize\it\thelineno\ \ }\fi}\input#2
  \endgroup
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%         Blue line emulator              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Box the pages similarly to the blue line paper boxs the pages. 
% In \tableofcontents, \listoffigures, and \listoftables we set the \headheight
% to be 36pt and it is too much so we have to reduce that by setting 
% \extraspace to be 24pt. And after we finish \tableofcontents, \listoffigures,
% and listoftables, the \extraspace should be recovered to be 0pt. So the 
% \extraspace should be set to 0pt just right before \include{ch1}.
%
%
\def\blueline{
\newdimen\topdist \topdist 4pt
\newdimen\rightdist \rightdist .23in
\newdimen\marsepsize \marsepsize 8pt
\newdimen\theight \theight 8.5in
\newdimen\twidth \twidth 6.0in
\newdimen\botdist \botdist 6pt
\newdimen\extraspace \extraspace 0pt
\newdimen\extradim \extradim 0pt

\def\tableofcontents{
\newpage
\extraspace 24pt
   \let \tempp \topskip
   \topskip 1em
%  \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi
% thesis mod
\tocspace
%
%  \chapter*{TABLE OF CONTENTS\markright{CONTENTS}}
% thesis mod
  \chapter*{\vspace*{-1em}TABLE OF CONTENTS\markright{CHAPTER}}
  {\vskip -1em CHAPTER \hfill Page\\}
  \thispagestyle{myheadings}
%
  \@starttoc{toc}
%  \if@restonecol\twocolumn\fi}
% thesis mod
  \doublespace  \topskip \tempp}
%

\def\listoffigures{\tocspace   % \tocspace for \listoffigures, Ken 5-28-90
   \let \tempp \topskip
   \topskip 1em
   \chapter*{LIST OF FIGURES\markright{Figure}}
   {\vskip -1em FIGURE \hfill Page\\}
   \thispagestyle{myheadings}
     \toddhack \twoem
    \@starttoc{lof}\if@restonecol\twocolumn
     \toddhack \zeroem
   \fi\topskip \tempp \doublespace} % the rest of the text is \doublespace
                                    % Ken 5-28-90
%

\def\listoftables{\tocspace
   \let \tempp \topskip
   \topskip 1em
   \chapter*{\vspace*{-1em}LIST OF TABLES\markright{Table}}
   {\vskip -1em TABLE \hfill Page\\}
   \thispagestyle{myheadings}
     \toddhack \twoem
    \@starttoc{lot}\if@restonecol\twocolumn
     \toddhack \zeroem
   \fi\topskip \tempp \doublespace}
%

\def\body{
   \pagenumbering{arabic}\setcounter{page}{1}
   \headheight 12pt
   \extraspace 0pt % recover to \headheight = 12pt
   \pagestyle{myheadings}
   \def\@thefnmark{\char32}
   \@footnotetext{\normalsize Journal model is {\sl IEEE}
   {\sl Transactions on Automatic Control.}}\setcounter{footnote}{0}}

%%% LaTeX's output routine, tweaked for page boxes.

\def\@outputpage{\begingroup\catcode`\ =10 
    \extradim \extraspace
     \let\-\@dischyph \let\'\@acci \let\`\@accii \let\=\@acciii
    \if@specialpage 
     \global\@specialpagefalse\@nameuse{ps@\@specialstyle}\fi
     \if@twoside 
       \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
            \let\@themargin\oddsidemargin
          \else \let\@thehead\@evenhead
          \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
     \fi\fi
     \shipout
     \vbox{\normalsize \baselineskip\z@ \lineskip\z@ 
           \let\par\@@par %% 15 Sep 87
           \vskip \topdist \moveright \rightdist 
           \vbox{\hrule\hbox{\vrule\kern 1.03\marsepsize\vbox{\vskip\topmargin
		\setbox\@tempboxa
                   \vbox to\headheight{\vfil \hbox to\twidth
                                       {\let\label\@gobble \let\index\@gobble
                                         \@thehead}} %% 22 Feb 87
                 \dp\@tempboxa\z@
                 \box\@tempboxa
                 \vskip 0.84\headsep
                 \box\@outputbox
                 \baselineskip \footskip
                 \hbox to\textwidth{\let\label\@gobble 
                           \let\index\@gobble  %% 22 Feb 87
                           \@thefoot}\kern -\botdist \kern-\extradim}
                \kern 1.1\marsepsize\vrule} 
                \hrule}}\global\@colht\theight
           \endgroup\stepcounter{page}\let\firstmark\botmark}
\makeatother
}