forked from jolohaga/uclathes
-
Notifications
You must be signed in to change notification settings - Fork 10
/
uclathes.cls
924 lines (805 loc) · 33.7 KB
/
uclathes.cls
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
%
% UCLA THESIS/DISSERTATION CLASS -- for LaTeX version 2e
% (C) Copyright 2017 by Louis Yang.
% Taken from jolohaga/uclathes
% (C) Copyright 2012 by Jose Hales-Garcia.
% Taken from UCLATHES
% (C) Copyright 1995 by John Heidemann.
% Taken from UCLA THESIS/DISSERTATION CLASS (version 0.94 BETA, 5/23/91)
% (C) Copyright 1988 Richard B. Wales. All Rights Reserved.
% by Richard B. Wales.
% Taken from DISSERTATION style (1/10/86)
% by Dorab Patel and Eduardo Krell
% Taken from REPORT style
% [Copyright (C) 1985 by Leslie Lamport]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% User-visible options and commands special in this style:
%
% Optional arguments to "\documentstyle" command:
%
% MA, MS, PhD, EdD
% Type of degree being awarded. Default is "PhD". If "EdD"
% is specified, a "\nodepartment" command is assumed (but
% can be overridden with a "\department{...}" command).
%
% single, double
% Line spacing. Default is "double".
% NOTE: Single spacing is NON-CONFORMING to the RFTADP.
%
% twoside
% Two-sided printing (for a duplex printer).
% NOTE: two-sided printing is NON-CONFORMING to the RFTADP.
%
% nohyphenatetitles, hyphenatetitles
% Don't hyphenate section (and subsection...) titles.
% Default is hyphenatetitles.
%
% Commands (to specify preliminary page info):
%
% \title{X}
% Set the document title to "X". Must always be specified.
%
% \author{X}
% Set the author to "X". Must always be specified.
%
% \department{X}
% Set the department name (in the degree title) to "X".
% Must always be specified, unless a "\nodepartment" command
% is given, or unless the "EdD" argument is supplied in the
% "\documentstyle" command.
%
% \thesis{X}
% Set the document type to "thesis", and the degree name to
% "X". This command is normally not needed, since an "MA"
% or "MS" option to "\documentstyle" will do the same thing
% in all standard situations.
%
% \dissertation{X}
% Set the document type to "dissertation", and the degree
% name to "X". This command is normally not needed, since
% a "PhD" or "EdD" option to "\documentstyle" will do the
% same thing in all standard situations.
%
% \nodepartment
% Omit the department name from the degree title. This
% command should be used only in situations where the
% department name is officially unnecessary (such as when an
% "EdD" or customized degree title is specified).
%
% \degreeyear{X}
% Set the year in which the degree will be awarded to "X".
% Default is the current year.
%
% \copyrightyear{X}
% Set the year which appears in the copyright notice to "X".
% Default is the degree year (see above). If the copyright
% and degree years are different, both will be included in
% the copyright notice (with the copyright year first).
%
% \nocopyright
% Don't include a copyright notice at all. A completely
% blank "copyright" page will be produced instead.
%
% \chair{X}
% The committee chair's name is "X". There may be up to
% three chairs (co-chairs); co-chairs are printed in the
% order given on the "abstract" page, and in reverse order
% on the "signature" page (after the other members speci-
% fied in "\member" commands; see below).
%
% \member{X}
% The name of one committee member (other than the chair or
% a co-chair) is "X". There may be up to six of these; they
% are printed in reverse order on the "signature" page,
% before the chair(s).
%
% \dedication{X}
% The text "X" is used as the dedication (in a "center"
% environment). Default is not to have a dedication.
%
% \acknowledgments{X}
% The text "X" is used for the "ACKNOWLEDGMENTS" page.
% Default is not to have an "ACKNOWLEDGMENTS" page.
%
% \vitaitem{X}{Y}
% An entry is added to the "VITA" page, with year "X" and
% text "Y".
%
% \publication{X}
% A "publication" entry is added to the "VITA" page, with
% text "X".
%
% \presentation{X}
% A "presentation" entry is added to the "VITA" page, with
% text "X".
%
% \abstract{X}
% The text "X" is used as the abstract.
%
% \makeintropages
% Generate the introductory pages in the proper sequence.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Notes on the LaTeX2e port:
%
% I have done a quick port of Rich Wales' "thesis" LaTeX 2.09
% document style to LaTeX2e. The major changes were in option
% handling and font selection. Additionally, I renamed the files
% to fit within MS-DOS 8.3 constraints (even though I neither use
% nor advocate MS-DOS).
% -johnh
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
% Version checking.
%%%
\NeedsTeXFormat{LaTeX2e}
\def\uclathesversion{2.0}
\def\uclathesdate{2012/05/02}
\ProvidesClass{uclathes}[\uclathesdate, \uclathesversion]
\typeout{UCLA 2.0 port copyright (C) 2012 by Jose Hales-Garcia.}
\typeout{LaTeX2e port copyright (C) 1995 by John Heidemann.}
\typeout{Copyright (C) 1988 by Richard B. Wales, copyright (C) 1985 by Leslie Lamport.}
%
% First load critical packages (needed for option processing).
%
\RequirePackage{ifthen}
% Internally, this forces all headers checked by the University to meet the formatting
% guidelines.
\def\header#1{\MakeUppercase{#1}}
% Get the title page macros.
\input{uclathma.clo}
\DeclareOption{PhD}{} % default -- nothing more to do
\DeclareOption{MA}{\thesis{Master of Arts}}
\DeclareOption{MS}{\thesis{Master of Science}}
\DeclareOption{EdD}{\dissertation{Doctor of Education}\@departmentfalse}
% The following commands will process the "single" or "double" option.
% (The default is "double".) This controls inter-line spacing. Note
% that the \@doublespacing value is computed by dividing the inter-line
% spacing for 3 lines/inch (1/3 inch, or 24.09 points) by the spacing
% specified for "normalsize" type (15.6 points).
\def\@singlespacing{1.0}
\def\@doublespacing{1.544} % see above for explanation of value
\let\@spacing=\@doublespacing
% \DeclareOption{single}{\typeout{*** Sorry, single spacing disabled ***}}
\DeclareOption{single}{\let\@spacing=\@singlespacing}
\DeclareOption{double}{\let\@spacing=\@doublespacing}
\DeclareOption{draft}{\overfullrule 5pt} % Causes overfull hboxes to be marked.
%
% Optional title hyphenation added 14-Jun-95 by johnh.
%
\newboolean{hyphenatetitles}
\setboolean{hyphenatetitles}{true}
\DeclareOption{nohyphenatetitles}{\setboolean{hyphenatetitles}{false}}
\DeclareOption{hyphenatetitles}{\setboolean{hyphenatetitles}{true}}
%
% Option to turn off "List of Figures", or "List of Tables"
% added 2017 by Louis
\newif\ifLOF % Control if showing List of Figures
\newif\ifLOT % Control if showing List of Tables
\LOFtrue % Default is showing List of Figures
\LOTtrue % Default is showing List of Tables
\DeclareOption{nolistoffigures}{\LOFfalse}
\DeclareOption{nolistoftables}{\LOTfalse}
% \makeintropages will response to these settings
%
% Option for change the style of chapter* titles
% This affects acknowledgment, CV, table of contents, LOT, LOF, references but
% not the title page and abstract page.
\DeclareOption{scheader}{\def\header#1{\large \scshape #1}}
% The \ProcessOptions command does the options.
\ProcessOptions
% The "uclath12.clo" file defines things that depend on the type size.
% In order to meet the UCLA requirements for minimum size of print in a
% thesis or dissertation, only one size (12-point) is supported.
\input{uclath12.clo}\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{\bfseries --}
\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 \bfseries #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{\bfseries #1\ #2}]}
% \def\@opargbegintheorem#1#2#3{\it \trivlist
% \item[\hskip \labelsep{\bfseries #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]
% 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{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.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{2}
% TABLE OF CONTENTS
%
\newcommand\contentsname{Table of Contents} % Allows user to change later
\newcommand\tableofcontents{%
\chapter*{%
\ifdefined\pdfbookmark\pdfbookmark{\contentsname}{contents}\fi%
\contentsname%
}%
\markboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
\renewcommand\baselinestretch{\@spacing}%
\@normalsize%
\@starttoc{toc}%
}
% \def\tableofcontents{
% \chapter*{Table of Contents\markboth{CONTENTS}{CONTENTS}}
% \renewcommand\baselinestretch{\@spacing}\@normalsize\@starttoc{toc}}
\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 \bfseries % 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}
\def\l@chapter#1#2{\pagebreak[3]
\vskip 1.0em plus 1pt % space above chapter line
\@tempdima 1.5em % width of box holding chapter number
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\bfseries % Boldface.
\leavevmode % TeX command to enter horizontal mode.
#1\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill
\hbox to\@pnumwidth{\hfil #2}\par
\endgroup}
\def\l@section{\@dottedtocline{1}{1.5em}{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
%
% Modified from the standard "article.cls" class by Louis 2017
\newcommand\listfigurename{List of Figures} % Allows user to change the name later
\newcommand\listoffigures{%
\chapter*{\listfigurename}% Appears as a chapter*
\markboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}%
\addcontentsline{toc}{chapter}{\listfigurename}
\@starttoc{lof}%
}
\newcommand*\l@figure{\@dottedtocline{1}{0em}{2.3em}} % remove indent for lof and lot
%\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
%\newif\if@figures
%\def\listoffigures{%
% \if@figures
% \chapter*{List of Figures\markboth{LIST OF FIGURES}{LIST OF FIGURES}}%
% \@starttoc{lof}%
% \fi}
%\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
% LIST OF TABLES
%
% Modified from the standard "article.cls" class by Louis 2017
\newcommand\listtablename{List of Tables} % Allows user to change the name later
\newcommand\listoftables{%
\chapter*{\listtablename}%
\markboth{\MakeUppercase\listtablename}{\MakeUppercase\listtablename}%
\addcontentsline{toc}{chapter}{\listtablename}
\@starttoc{lot}%
}
\let\l@table\l@figure
%\def\listoftables{
% \iftables\chapter*{List of Tables\markboth
% {LIST OF TABLES}{LIST OF TABLES}}\@starttoc{lot}\fi}
% ****************************************
% * 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 to produce an end-of-sentence space.
\newcommand\refname{References} % Allows user to change it later
\newenvironment{thebibliography}[1]{%
\chapter*{\refname}%
\markboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\addcontentsline{toc}{chapter}{\refname}
\renewcommand\baselinestretch{1}
\@normalsize
\list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumi}}
%\def\newblock{\hskip .11em plus .33em minus -.07em}
\sloppy
\sfcode`\.=1000\relax}
{\endlist\renewcommand\baselinestretch{\@spacing}\@normalsize}
\def\newblock{\hskip .11em\@plus.33em\@minus.07em}
% Louis: I moved \newblock outside of thebibliography environment so that
% this class can be compatible with the 'Natbib' package.
% Natbib: If you are using 'natbib' package, the above 'thebibliography'
% environment will be overwritten by the 'Natbib' package. You will
% need to add the following commands:
%
% \renewcommand{\bibname}{References}
% \renewcommand{\bibpreamble}{
% \addcontentsline{toc}{chapter}{References}
% \vskip 12pt
% \renewcommand\baselinestretch{1}
% }
% \renewcommand{\bibfont}{\normalsize}
%
% after you load the 'natbib' package so that the format and spacing
% is consistent with this template.
%
% \def\@biblabel#1{[#1]\hfill} % Produces the label for a \bibitem[...]
% command.
% \def\@cite#1{[#1]} % Produces the output of the \cite command.
% ****************************************
% * PUBLICATIONS *
% ****************************************
%
% This provides the publications environment in Vita page. It is modified from
% the thebibliography environment.
% Note: the name 'thepublications' has already been used by the
% \newcounter{publications} so here we name the new environment as
% 'mypublications'.
\newcommand{\pubstretch}{\@spacing} % default stretch for publications environment
\newenvironment{mypublications}[1]{%
\vskip 30pt
{\centering
\header{Publications}\par%
}%
\renewcommand\baselinestretch{\pubstretch}%
\@normalsize%
\list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumi}}
%\def\newblock{\hskip .11em plus .33em minus -.07em}
\sloppy
\sfcode`\.=1000\relax}
{\endlist\renewcommand\baselinestretch{\@spacing}\@normalsize}
% ****************************************
% * 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.)
\def\footnoterule{\kern-3\p@
\hrule width .4\columnwidth
\kern 2.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}
% \@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}
% \@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 10pt
\setbox\@tempboxa\hbox{#1: #2}
\ifdim \wd\@tempboxa >\hsize % IF longer than one line:
\unhbox\@tempboxa\par % THEN set as ordinary paragraph.
\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
%
% Modified from the standard "article.cls" class by Louis 2017
\newcommand\figurename{Figure} % Allows user to modify the name later
\newcounter{figure}[chapter]
\def\thefigure{\thechapter.\@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename\nobreakspace\thefigure}
\newenvironment{figure}
{\@float{figure}}
{\end@float}
\newenvironment{figure*}
{\@dblfloat{figure}}
{\end@dblfloat}
% \def\fnum@figure{Figure \thefigure}
% \def\figure{\@figurestrue\@float{figure}} % \@figurestrue do nothing since it will always run after the list of figure has been made
% \let\endfigure\end@float
% \@namedef{figure*}{\@figurestrue\@dblfloat{figure}}
% \@namedef{endfigure*}{\end@dblfloat}
% TABLE
%
% Modified from the standard "article.cls" class by Louis 2017
\newcommand\tablename{Table} % Allows user to modify the name later
\newcounter{table}[chapter]
\def\thetable{\thechapter.\@arabic\c@table}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename\nobreakspace\thetable}
\newenvironment{table}
{\@float{table}}
{\end@float}
\newenvironment{table*}
{\@dblfloat{table}}
{\end@dblfloat}
% \def\fnum@table{Table \thetable}
% \def\table{\@tablestrue\@float{table}}
% \let\endtable\end@float
% \@namedef{table*}{\@tablestrue\@dblfloat{table}}
% \@namedef{endtable*}{\end@dblfloat}
% ****************************************
% * 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.
%
% 2017 Louis: We are not using header in the UCLA thesis class, so \markboth{}{}
% are not relevant to us.
\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\ps@headings{\def\@oddfoot{}\def\@evenfoot{}% No feet.
\def\@oddhead{\hbox {}\slshape \rightmark \hfil \rm\thepage}% Heading.
\def\chaptermark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ \fi ##1}}}}
% Definition of 'myheadings' page style.
%
\def\ps@myheadings{\def\@oddhead{\hbox{}\slshape\rightmark \hfil \rm\thepage}%
\def\@oddfoot{}\def\@evenhead{\rm \thepage\hfil\slshape\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
%
% \newcounter{equation}
%
\@addtoreset{equation}{chapter} % Makes \chapter reset 'equation' counter.
\def\theequation{\thechapter.\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)}
%
% CODE ENVIRONMENT
%
% same as verbatim except it is always in single spacing
% and double spacing is restores at the end
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |gdef|@xcode#1\end{code}[#1|end[code]]
|endgroup
\def\code{\par\renewcommand\baselinestretch{1}\@normalsize\@verbatim
\frenchspacing\@vobeyspaces \@xcode}
\def\endcode{\renewcommand\baselinestretch{\@spacing}\@normalsize\endtrivlist}
% FOOTNOTES
% change it so that footnotes are printed in single spacing
%
\long\def\@footnotetext#1{\insert\footins{\renewcommand\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}\renewcommand\baselinestretch{\@spacing}}}
% ****************************************
% * INITIALIZATION *
% ****************************************
%
% Default initializations
\ps@plain % 'plain' page style
\pagenumbering{arabic} % Arabic page numbers
\onecolumn % Single-column.
\if@twoside\else\raggedbottom\fi % Ragged bottom unless twoside option.
% Generate thesis preliminary pages
\input{uclathti.clo}