forked from umasscs/umassthesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
umthesis.cls
806 lines (716 loc) · 25.3 KB
/
umthesis.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% UMass Thesis Class
%%
%% Based on merging a version from Jamie Callan/Carla Brodley
%% with the Utah version that has also been floating around.
%%
%% Makes adjustments to the basic REPORT document style
%% Size selected in documentstyle must be 12pt
%% (see thesis.tex in this directory for usage example)
%%
%% Author: Tony Hosking, 1995
%% Turned into a class file and rewritten by John Ridgway, 1997
%%
%% umthesis.cls,v 1.25 2003/10/16 20:20:51 ridgway Exp
%% umthesis.cls,v
%% Revision 1.25 2003/10/16 20:20:51 ridgway
%% Make umthesis work with the natbib package, and clean up some miscellaneous
%% formatting things.
%%
%% Revision 1.24 2002/01/21 16:32:47 ridgway
%% Modified umthesis.cls and umthsmpl.tex to (better) support Master's theses.
%% A new class option "thesis" has been added to the umthesis class. This
%% will generate a Master's thesis instead of a Doctoral dissertation. (The
%% differences are mostly in a few words.) The umthsmpl.tex file was updated
%% to show how to make a thesis, and to include (commented out) all of the
%% possible degrees.
%%
%% Revision 1.23 2002/01/14 19:01:42 ridgway
%% Two fixes:
%% 1) fix overfull hbox problem in Table of Contents and List of Figures
%% and Tables. Formerly if the page numbers were too wide they would
%% jut out into the margin. As a side-effect of this the leaders extend
%% as close to the page number as they can (OK by the Grad School).
%% 2) Make Table of Contents (etc.) entries ragged-right (as per Grad
%% School). This only affects multi-line headings.
%%
%% Revision 1.22 2001/12/12 16:57:31 ridgway
%% Fixed titles and chapter titles so that they are single-spaced everywhere
%% and removed the underlining from "Page" in the table of contents.
%%
%% Revision 1.21 2001/10/15 14:45:43 ridgway
%% Block quotations were (erroneously) double-spaced. They are now
%% single-spaced as required.
%%
%% Revision 1.20 2001/09/24 16:10:09 ridgway
%% Fixed heading problem with single appendices.
%%
%% Revision 1.19 2000/09/01 19:54:45 ridgway
%% Added the nicerdraft and nonicerdraft options -- see umthsmpl.tex for their
%% (brief) explanations.
%%
%% Revision 1.18 1999/10/06 21:14:16 ridgway
%% Changed table of contents to include the word CHAPTER instead of
%% Chapter at the beginning of the chapters. Also ensured that there are
%% at least two leaders at the end of every entry in the TOC, LOF, and
%% LOT. -- Required by the Grad School.
%%
%% Fixed problem with numbering of sole appendix. (Section numbers must
%% begin with A. even though the appendix is NOT Appendix A... The Grad
%% School strikes again.)
%%
%% Changes to allow someone to have no prior bachelor's degree or no
%% prior master's degree. (As per Eric McCall.)
%%
%% Fixed typo in comments in umthsmpl.tex.
%%
%% Revision 1.17 1999/06/24 20:38:24 ridgway
%% Added support for multiple bachelors and masters degrees, and for a prior
%% doctoral degree. Improved spacing in singlespace mode.
%%
%% Added allowlisthyphenation and nolisthyphenation options to umthesis class.
%% Also allowed a little more space for page numbers in the table of contents
%% and the list of figures and tables.
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Identification part
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{umthesis}[2014/04/16 v1.26
U.Mass. dissertation class]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Initial code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifdouble@space
\newif\ifcondensed@frontmatter
\newif\ifnicer@draft
\newif\if@proposal\@proposalfalse
\newcommand{\@degree}{Doctor of Philosophy}
\newcommand{\@degreeabbrv}{Ph.D.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Declaration of options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareOption{10pt}{\def\@mysize{10pt}}
\DeclareOption{11pt}{\def\@mysize{11pt}}
\DeclareOption{12pt}{\def\@mysize{12pt}}
\DeclareOption{singlespace}{\double@spacefalse}
\DeclareOption{doublespace}{\double@spacetrue}
\DeclareOption{condensed}{\condensed@frontmattertrue\double@spacefalse}
\DeclareOption{uncondensed}{\condensed@frontmatterfalse}
\DeclareOption{proposal}{\def\umthesis@typename{A Dissertation Outline}\@proposaltrue}
\DeclareOption{dissertation}{\def\umthesis@typename{A Dissertation}}
\DeclareOption{thesis}{\def\umthesis@typename{A Thesis}%
\renewcommand{\@degree}{Master of Science}%
\renewcommand{\@degreeabbrv}{M.S.}}
\DeclareOption{nolisthyphenation}{\def\umthesis@listhyphenpenalty{10000}}
\DeclareOption{allowlisthyphenation}{\def\umthesis@listhyphenpenalty{50}}
\DeclareOption{nicerdraft}{\nicer@drafttrue}
\DeclareOption{nonicerdraft}{\nicer@draftfalse}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Execution of options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ExecuteOptions{12pt,doublespace,uncondensed,dissertation,%
nolisthyphenation,nonicerdraft}
\ProcessOptions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Package loading
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\LoadClass[\@mysize]{report}[1996/01/02]
\RequirePackage{textcase}
\RequirePackage{etoolbox}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Post-package-loading fixups.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{umth\@mysize.clo}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Main code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\toc@section}{Chapter}
\newcounter{count@FrontMatter}
\newcounter{count@Chapter}
\newcounter{count@Appendix}
\newcounter{count@BackMatter}
\AtEndDocument{%
\immediate\write\@mainaux{\string\setcounter{count@FrontMatter}%
{\arabic{count@FrontMatter}}}%
\immediate\write\@mainaux{\string\setcounter{count@Chapter}%
{\arabic{count@Chapter}}}%
\immediate\write\@mainaux{\string\setcounter{count@Appendix}%
{\arabic{count@Appendix}}}%
\immediate\write\@mainaux{\string\setcounter{count@BackMatter}%
{\arabic{count@BackMatter}}}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Major document structure, \frontmatter, \mainmatter, \appendix, \backmatter
\newcommand{\frontmatter}{
\setcounter{secnumdepth}{-1}
\renewcommand{\toc@section}{FrontMatter}
\setcounter{count@FrontMatter}{0}
\ifdouble@space\doublespacenormalsize\fi
}
\newcommand{\mainmatter}{
\setcounter{secnumdepth}{5}
\clearpage
\pagenumbering{arabic} % Arabic numbers from here on
\raggedbottom
\ifdouble@space\doublespacenormalsize\fi
\renewcommand{\toc@section}{Chapter}
\setcounter{count@Chapter}{0}
}
\renewcommand{\appendix}{
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\renewcommand\@chapapp{\appendixname}%
\renewcommand\thechapter{\@Alph\c@chapter}
\renewcommand{\toc@section}{Appendix}
\ifnum\value{count@Appendix}<2
\let\@chapter\@onlyappendix
\fi
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}%
\setcounter{count@Appendix}{0}
}
\newcommand{\backmatter}{
\setcounter{secnumdepth}{5}
\renewcommand{\@chapapp}{\chaptername}
\renewcommand{\toc@section}{BackMatter}
\let\@chapter\normal@chapter
\setcounter{count@BackMatter}{0}
\normalsize
}
\def\@onlyappendix[#1]#2{%
\refstepcounter{chapter}%
\typeout{\@chapapp.}%
\addcontentsline{toc}{OnlyAppendix}{\MakeTextUppercase{#1}}%
\chaptermark{#1}%
\if@twocolumn%
\@topnewpage[\@makeonlyappendixhead{#2}]%
\else%
\@makeonlyappendixhead{#2}%
\@afterheading%
\fi%
\renewcommand{\thesection}{A.\@arabic\c@section}
\stepcounter{count@\toc@section}
}
\def\@makeonlyappendixhead#1{%
{ \def\thechapter{} \@makechapterhead{#1} } }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Part related stuff
%% redefine @part to change toc entries
\renewcommand*\l@part[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty{-\@highpenalty}%
\addvspace{2.25em \@plus\p@}%
\setlength\@tempdima{3em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \hspace*{\fill}\par
\centering {\large\bfseries #1}\par
\leavevmode \hspace*{\fill} \par
\nobreak
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{{\MakeUppercase{\partname\nobreakspace\thepart {:}}}\hspace{1em}{\MakeUppercase{#1}}}%
\else
\centering{part}{#1}%
\fi
\markboth{}{}%
{\thispagestyle{empty}
\centering
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
\huge\bfseries {\MakeUppercase{\partname}}\nobreakspace\thepart : \nobreakspace{\MakeUppercase{#2}}
\par
\vskip 20\p@
\fi
}
%\Huge \bfseries {\MakeUppercase{#2}}\par}%
\@endpart}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Chapter/Appendix related stuff
\newcommand{\unnumberedchapter}[2][]{
\def\@tempa{#1}
\def\@tempb{}
\ifx\@tempa\@tempb
\def\@tempc{#2}
\else
\def\@tempc{#1}
\fi
\chapter*{#2}
\addcontentsline{toc}{\toc@section}{\MakeTextUppercase{\@tempc}}
}
% Patch \@chapter to change TOC entries. The original code appears to:
% (1) replace '\numberline{\thechapter}#1' with
% '\numberline{\thechapter.}\MakeTextUppercase{#1}'
% (2) replace '{toc}{chapter}{#1}' with
% '{toc}{\toc@section}{\MakeTextUppercase{#1}}'
% (3) replace '{toc}{chapter}' with '{toc}{\toc@section}'
% (4) append '\stepcounter{count@\toc@section}'
% Disable uppercase when making PDF strings...this breaks hyperref
\AtEndPreamble{%
\@ifpackageloaded{hyperref}%
{\pdfstringdefDisableCommands{%
\let\MakeTextUppercase\relax%
\let\uppercase\relax}%
\typeout{Disabled uppercase in PDF strings}}%
{\typeout{Did not detect hyperref package}}%
}
% For debugging:
%\tracingpatches
%\ifpatchable*{\@chapter}{\typeout{Chapter can be patched}}%
% {\typeout{Chapter cannot be patched}}
\patchcmd{\@chapter}%
{\numberline{\thechapter}#1}%
{\numberline{\thechapter.}\MakeTextUppercase{#1}}%
{\typeout{Patching chapter command 1 succeeded}}%
{\typeout{Patching chapter command 1 failed}}
\patchcmd{\@chapter}%
{\addcontentsline{toc}{chapter}{#1}}%
{\addcontentsline{toc}{\toc@section}{\MakeTextUppercase{#1}}}%
{\typeout{Patching chapter command 2 succeeded}}%
{\typeout{Patching chapter command 2 failed}}
\patchcmd{\@chapter}%
{\addcontentsline{toc}{chapter}}%
{\addcontentsline{toc}{\toc@section}}%
{\typeout{Patching chapter command 3 succeeded}}%
{\typeout{Patching chapter command 3 failed}}
\apptocmd{\@chapter}%
{\stepcounter{count@\toc@section}}%
{\typeout{Appending to chapter command succeeded}}%
{\typeout{Appending to chapter command failed}}
\newif\ifrenew@chapter
\ifdouble@space%
\renew@chaptertrue%
\else%
\ifnicer@draft%
\renew@chapterfalse%
\else%
\renew@chaptertrue%
\fi%
\fi
\ifrenew@chapter%
\renewcommand\chapter{%
\if@openright\cleardoublepage\else\clearpage\fi%
\thispagestyle{plain}%
\@afterindenttrue%
\global\@topnum\z@%
\secdef\@chapter\@schapter%
}%
\fi
\renewcommand{\@makechapterhead}[1]{ % Heading for \chapter command
\vspace*{30\p@} % Space at top of text page.
\begin{center}\large\bfseries
\ifnum \c@secnumdepth >\m@ne
\MakeTextUppercase\@chapapp\ \thechapter % 'CHAPTER' and number.
\par\nobreak
\fi
\addvspace{\topskip}
\MakeTextUppercase{#1}
\end{center}
\par\nobreak % TeX penalty to prevent page break.
\vskip 24\p@ % Space between title and text.
}
\let\base@schapter\@schapter
\def\@schapter#1{
\base@schapter{#1}
\stepcounter{count@\toc@section}
}
\renewcommand{\@makeschapterhead}[1]{ % Heading for \chapter* command
\vspace*{30\p@} % Space at top of page.
\begin{center}
\large\bfseries % Title.
\MakeTextUppercase{#1}\par
\end{center}
\nobreak % TeX penalty to prevent page break.
\vskip 24\p@ % Space between title and text.
}
\let\normal@chapter\@chapter %% save the chapter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Tweak penalties
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\hyphenpenalty=400
%%\exhyphenpenalty=400
\clubpenalty=10000 % 'Club line' at bottom of page.
\widowpenalty=10000 % 'Widow line' at top of page.
\displaywidowpenalty=3000 % Math display widow line.
\predisplaypenalty=3000 % Breaking before a math display.
\postdisplaypenalty=2000 % Breaking after a math display.
%% Do these need tweaking too?
%%\interlinepenalty % Breaking at a line within a paragraph.
%%\brokenpenalty % Breaking after a hyphenated line.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Tweak table of contents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\tableofcontents}{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\normalsize
\chapter*{\contentsname
\@mkboth{%
\MakeTextUppercase\contentsname}{\MakeTextUppercase\contentsname}}%
{\hfill \textbf{Page}\par}%
{\hyphenpenalty=\umthesis@listhyphenpenalty\@starttoc{toc}}%
\if@restonecol\twocolumn\fi
}
\renewcommand{\contentsname}{Table of Contents}
\def\thetocindent{-1}
\newif\if@seenChapter
\newif\if@seenAppendix
\newif\if@seenBackMatter
\@seenChapterfalse
\@seenAppendixfalse
\@seenBackMatterfalse
\renewcommand{\@dotsep}{2}
\newlength{\umthesis@contentshangindent}
\setlength{\umthesis@contentshangindent}{1.55em}
\renewcommand{\@dottedtocline}[5]{%
\ifnum #1>\c@tocdepth \else
\ifnum \thetocindent = #1 \else
\def\thetocindent{#1}
\ifdouble@space\addvspace{\topskip}\fi
\fi
\vskip \z@ \@plus.2\p@
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\advance\rightskip by 0pt plus 1fil\relax% ragged-right contents...
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima #3\relax
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
\hangindent\umthesis@contentshangindent
{#4}\nobreak%
\leaders\hbox{$\m@th\mkern \@dotsep mu \hbox{.}\mkern \@dotsep mu$}%
\hskip3em plus1fill\relax%
\normalfont \normalcolor #5%
\par}%
\fi}
\newcommand{\l@FrontMatter}[2]{
\addpenalty{-\@highpenalty}
\addvspace{\baselineskip}
\@dottedtocline{0}{0.0em}{1.5em}{\bfseries #1}{\bfseries #2}
}
\newcommand{\l@Chapter}[2]{
\addpenalty{-\@highpenalty}
\addvspace{\baselineskip}
\if@seenChapter\else
\addvspace{2\baselineskip}
\parindent\z@ {\bfseries \MakeTextUppercase{\chaptername}} \par
\addvspace{\baselineskip}
\@seenChaptertrue
\fi
\@dottedtocline{0}{0.0em}{1.5em}{\bfseries#1}{\bfseries#2}
}
\newcommand{\appendicesname}{APPENDICES}
\newcommand{\l@Appendix}[2]{
\addpenalty{-\@highpenalty}
\if@seenAppendix\else
\addvspace{2\baselineskip}
\parindent\z@ {\bfseries \appendicesname} \par
\addvspace{\baselineskip}
\@seenAppendixtrue
\fi
\@dottedtocline{0}{0.0em}{1.5em}{\bfseries #1}{\bfseries #2}
}
\newcommand{\l@OnlyAppendix}[2]{
\addpenalty{-\@highpenalty}
\addvspace{2\baselineskip}
\parindent\z@
\@dottedtocline{0}{0.0em}{1.5em}{\bfseries
\MakeTextUppercase{\appendixname}: #1}{\bfseries #2}
}
\newcommand{\l@BackMatter}[2]{
\addpenalty{-\@highpenalty}
\addvspace{\baselineskip}
\if@seenBackMatter\else
\addvspace{2\baselineskip}
\@seenBackMattertrue
\fi
\@dottedtocline{0}{0.0em}{1.5em}{\bfseries #1}{\bfseries #2}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Tweak lists of tables and figures
%%
\newlength{\tablenumberwidth}
\setlength{\tablenumberwidth}{2.3em}
\ifcondensed@frontmatter
\renewcommand{\listoffigures}{}
\else
\renewcommand{\listoffigures}{%
\setcounter{tocdepth}{3}
\normalsize
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter{\listfigurename
\@mkboth{\MakeTextUppercase\listfigurename}%
{\MakeTextUppercase\listfigurename}}%
{\normalsize\parindent\z@\textbf{Figure \hfill Page}\par}%
{\hyphenpenalty=\umthesis@listhyphenpenalty\@starttoc{lof}}%
\if@restonecol\twocolumn\fi
}
\fi
\renewcommand{\l@figure}[2]{
\addvspace{\baselineskip}
\@dottedtocline{1}{1.5em}{\tablenumberwidth}{#1}{#2}
}
\ifcondensed@frontmatter
\renewcommand{\listoftables}{}
\else
\renewcommand{\listoftables}{%
\setcounter{tocdepth}{3}
\normalsize
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter{\listtablename
\@mkboth{%
\MakeTextUppercase\listtablename}{\MakeTextUppercase\listtablename}}%
{\normalsize\parindent\z@\textbf{Table \hfill Page}\par}%
{\hyphenpenalty=\umthesis@listhyphenpenalty\@starttoc{lot}}%
\if@restonecol\twocolumn\fi
}
\fi
\let\l@table\l@figure
\let\umthesis@base@starttoc\@starttoc
\renewcommand{\@starttoc}{\tolerance10000\umthesis@base@starttoc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Page layout -- as required
%%
\setlength{\oddsidemargin}{0.5truein} % binding margin at least 1.5in
\setlength{\evensidemargin}{0.5truein} % same as odd side
\setlength{\textwidth}{6.0truein} % 6in wide typing area
\setlength{\topmargin}{-0.5truein} % page numbers at top of page 0.5in from top
\setlength{\headheight}{0.2truein} % room for header
\setlength{\headsep}{0.3truein} % header 0.3in from body, body 1in from top
\setlength{\textheight}{9.0truein} % 9in high typing area
\setlength{\footskip}{0.5truein} % footer 0.5in from body, 0.5in from bottom
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Added commands and environments for front matter
%%
\newcommand{\degree}[2]{\gdef\@degree{#1} \gdef\@degreeabbrv{#2}}
\def\copyrightyear#1{\gdef\@copyrightyear{#1}}
%
% Bachelor's degrees
\newif\ifbachelorsone
\bachelorsonefalse
\def\bachelors#1#2{\gdef\@bachelors{#1, \MakeTextUppercase{#2}}\bachelorsonetrue}
\newif\ifbachelorstwo
\bachelorstwofalse
\def\secondbachelors#1#2{\gdef\@secondbachelors{#1, \MakeTextUppercase{#2}}\bachelorstwotrue}
\newif\ifbachelorsthree
\bachelorsthreefalse
\def\thirdbachelors#1#2{\gdef\@thirdbachelors{#1, \MakeTextUppercase{#2}}\bachelorsthreetrue}
%
% Master's degrees
\newif\ifmastersone
\mastersonefalse
\def\masters#1#2{\gdef\@masters{#1, \MakeTextUppercase{#2}}\mastersonetrue}
\newif\ifmasterstwo
\masterstwofalse
\def\secondmasters#1#2{\gdef\@secondmasters{#1, \MakeTextUppercase{#2}}\masterstwotrue}
\newif\ifmastersthree
\mastersthreefalse
\def\thirdmasters#1#2{\gdef\@thirdmasters{#1, \MakeTextUppercase{#2}}\mastersthreetrue}
%
% Doctorates
\newif\ifpriordoctorate
\priordoctoratefalse
\def\priordoctorate#1#2{\gdef\@priordoctorate{#1, \MakeTextUppercase{#2}}\priordoctoratetrue}
%
% Chair(s)
\newif\ifcochairs
\cochairsfalse
\def\committeechair#1{\gdef\@committeechair{#1}\cochairsfalse}
\def\cochairs#1#2{\gdef\@firstchair{#1}\gdef\@secondchair{#2}\cochairstrue}
\def\firstreader#1{\gdef\@firstreader{#1}}
\newif\ifsecond
\secondfalse
\def\secondreader#1{\gdef\@secondreader{#1}\secondtrue}
\newif\ifthird
\thirdfalse
\def\thirdreader#1{\gdef\@thirdreader{#1}\thirdtrue}
\newif\iffourth
\fourthfalse
\def\fourthreader#1{\gdef\@fourthreader{#1}\fourthtrue}
\newif\iffifth
\fifthfalse
\def\fifthreader#1{\gdef\@fifthreader{#1}\fifthtrue}
\newif\ifsixth
\sixthfalse
\def\sixthreader#1{\gdef\@sixthreader{#1}\sixthtrue}
% To change Department Chair to Chair, call like this:
% \departmentchair[Chair]{Jane Doe}.
\newcommand{\departmentchair}[2][Department Chair]{
\gdef\umthesis@chairtitle{#1}
\gdef\@departmentchair{#2}
}
\def\departmentname#1{\gdef\@departmentname{#1}}
\ifcondensed@frontmatter
\input{umthcfm.clo}
\else
\input{umthstd.clo}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Tweak chapter headings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Text heading tweaks
%%
\setcounter{secnumdepth}{5}
\ifcondensed@frontmatter
\setcounter{tocdepth}{0}
\else
\setcounter{tocdepth}{3}
\fi
\ifdouble@space
\renewcommand{\section}{
\@startsection{section}{1}{\z@}
{4.5ex \@plus 1ex \@minus .2ex}
{0.001ex \@plus .2ex}
{\normalfont\doublespacelarge\bfseries}}
\renewcommand{\subsection}{
\@startsection{subsection}{2}{\z@}%
{3.25ex \@plus 1ex \@minus .2ex}%
{0.001ex \@plus .2ex}%
{\normalfont\doublespacenormalsize\bfseries}}
\renewcommand{\subsubsection}{
\@startsection{subsubsection}{3}{\z@}%
{3.25ex \@plus 1ex \@minus .2ex}%
{0.001ex \@plus .2ex}%
{\normalfont\doublespacenormalsize\bfseries}}
\renewcommand{\paragraph}{
\@startsection{paragraph}{4}{\z@}%
{2.5ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand{\subparagraph}{
\@startsection{subparagraph}{5}{\parindent}%
{0.0ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\else\ifnicer@draft\else
\renewcommand{\section}{
\@startsection{section}{1}{\z@}
{3.5ex \@plus 1ex \@minus .2ex}
{2.3ex \@plus .2ex}
{\normalfont\large\bfseries}}
\renewcommand{\subsection}{
\@startsection{subsection}{2}{\z@}%
{3.25ex \@plus 1ex \@minus .2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
\renewcommand{\subsubsection}{
\@startsection{subsubsection}{3}{\z@}%
{3.25ex \@plus 1ex \@minus .2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
\renewcommand{\paragraph}{
\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand{\subparagraph}{
\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\fi\fi
%%
%% Fix captions
%%
\setlength\abovecaptionskip{\topskip}
\setlength\belowcaptionskip{\topskip}
\long\def\@makecaption#1#2{%
\addvspace{\abovecaptionskip}
\sbox\@tempboxa{\textbf{#1.} #2}%
\ifdim \wd\@tempboxa >\hsize
\textbf{#1.} #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\par
\vskip\belowcaptionskip
\par
}
%%
%% Default spacing of tabular environment to single
%%
\let\base@tabular\tabular
\renewcommand{\tabular}[2][]{\base@tabular[#1]{#2}}
%%
%% Fix quote and quotation environments
%%
\renewenvironment{quotation}{%
\list{}{%
\listparindent 1.5em%
\itemindent \listparindent%
\rightmargin \leftmargin%
\parsep \z@ \@plus\p@%
}%
\normalsize%
\item[]%
}%
{\endlist}
% alias quote to quotation
\renewenvironment{quote}{\begin{quotation}}{\end{quotation}}
%%
%% Fix footnotes -- double spacing between footnotes, single spacing within
%% footnotes is what is required.
\newlength{\umthesis@basefootnotesep}
\newlength{\umthesis@baseskipfootins}
\setlength{\umthesis@basefootnotesep}{\footnotesep}
\setlength{\umthesis@baseskipfootins}{\skip\footins}
\ifdouble@space
\setlength{\footnotesep}{2\umthesis@basefootnotesep}
\setlength{\skip\footins}{2\umthesis@baseskipfootins}
\fi
\pretocmd{\@footnotetext}{\linespread{1}\selectfont}%
{\typeout{Patching footnotetext succeeded}}%
{\typeout{Patching footnotetext failed}}
%%
%% Fix the bibliography
\AtBeginDocument{%
\let\base@thebibliography\thebibliography%
\let\endbase@thebibliography\endthebibliography%
%
\@ifpackageloaded{biblatex}{%
% Double-space the bibliography entries, according to an interpretation
% of the discussion at
% http://tex.stackexchange.com/questions/13742/what-does-double-spacing-mean
\setlength{\bibitemsep}{\baselineskip}%
% Add entry to TOC
\AtBeginBibliography{%
\addcontentsline{toc}{\toc@section}{\MakeTextUppercase{\bibname}}%
}%
}{%
% Add entry to TOC
\renewenvironment{thebibliography}[1]{%
\begin{base@thebibliography}{#1}%
\addcontentsline{toc}{\toc@section}{\MakeTextUppercase{\bibname}}%
}{\end{base@thebibliography}}%
}%
}
\newcommand{\doublespace}{\doublespacenormalsize}
% silence hyperref warning about bookmark level and set these elements
% to their proper bookmark level
\providecommand*{\toclevel@FrontMatter}{0}
\providecommand*{\toclevel@Chapter}{0}
\providecommand*{\toclevel@BackMatter}{0}