-
Notifications
You must be signed in to change notification settings - Fork 0
/
altmsuphddissertation.cls
488 lines (426 loc) · 14 KB
/
altmsuphddissertation.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
% MSU Ph.D Dissertation class file
% Copyright by Clifford E. Weil and MSU Board of Trustees 2015
% This file must not to alter or distributed.
% I'm ignoring this, so use at your own risk - DMA
% New users should download the latest distribution from
% http://www.math.msu.edu/~weil/MSU_Ph.D._Dissertation.zip
% Report bugs to Clifford Weil ([email protected]).
% Latest revision February, 2015
% Includes modifications by Daniel Alt
% Identification
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{altmsuphddissertation}
% Bring in the regular book class
\LoadClass[12pt,oneside]{book}
% Bring in needed packages
\RequirePackage{ifthen}
\RequirePackage{setspace}
\RequirePackage[titles,subfigure]{tocloft}
\RequirePackage{subfig}
\RequirePackage[margin=1in]{geometry}
\RequirePackage{pdflscape}
\RequirePackage{fancyhdr}
\RequirePackage{rotating}
\RequirePackage[bookmarksdepth=3]{hyperref} %Keeps sublevel PDF bookmarks which would otherwise be supressed by
%the action of getting rid of appendix subheadings.
\@ifpackageloaded{hyperref}
%If hyperref is loaded, define tocentry to use alternate form for PDF index. In plain English, this gets rid of
%unwanted formatting commands for the bookmarks in the PDF.
{\newcommand{\tocentry}[2]{\addcontentsline{toc}{chapter}{\texorpdfstring{#1}{#2}}}}
%%If hyperref is NOT loaded, define tocentry to just add the contents line
%%Also define the phantomsection command (included in hyperref) to do nothing
%{\newcommand{\tocentry}[2]{\addcontentsline{toc}{chapter}{#1}}
%\renewcommand{\phantomsection}{\relax}
%}
\newcommand{\chapname}{Chapter}
\newcommand\covername{Appendix}
\renewcommand{\appendixname}{Appendix}
% Change to double spacing as defined by MS Word
% Redefine the \doublspacing command
\renewcommand{\doublespacing}{%
\setstretch {1.9}% default
\ifcase \@ptsize \relax % 10pt
\setstretch {1.9}%
\or % 11pt
\setstretch {1.9}%
\or % 12pt
\setstretch {1.9}%
\fi
}
% Number all levels of document divisions
\setcounter{secnumdepth}{6}
% Set depth of table of contents
\setcounter{tocdepth}{6}
% Set second level of sub(super) scripts to 10 pt.
% Thanks to Lee Larson for this fix.
\DeclareMathSizes{12}{12}{10}{10}
\DeclareMathSizes{10}{10}{10}{10}
% Set footnote font size to 12pt.
% Define the command \unit
\newcommand*{\unit}[1]{\def\fromunit{#1}}
%Define the Title Page
\newcommand\maketitlepage{\begin{titlepage}%
\vspace*{.55in}
\begin{center}%
\MakeUppercase{\@title}% DO NOT REMOVE THE FOLLOWING LINE
\begin{doublespace}% DO NOT REMOVE THE FOLLOWING BLANK LINE
By
\begin{tabular}[t]{c}%
\@author
\end{tabular}%
\end{doublespace}
%\vspace{\fill} - Cliff insists this is right. He is incorrect - everyone who has left this in has been told to change it.
\vspace{2.5in} %Use this one. Seriously. (This is the distance between your name and ``A DISSERTATION'') - DMA
{%
A DISSERTATION
\vspace{\baselineskip}%
Submitted to \\
Michigan State University \\
in partial fulfillment of the requirements \\
for the degree of
\vspace{\baselineskip}%
\fromunit % Inserts unit name and degree type%
\vspace{\baselineskip}%
{\number\year}
}
\vspace{\baselineskip}
\end{center}
\end{titlepage}}%
% Define the command \abstractname
\newcommand{\abstractname}{\textbf{ABSTRACT}}
%Define the abstract environment for the dissertation
\newenvironment{abstract}{%
\thispagestyle{empty}
\pagenumbering{roman}
\begin{center}%
\bfseries \abstractname\vspace{\baselineskip}
\MakeUppercase{\@title}
\vspace{\baselineskip}
By
\vspace{\baselineskip}
\begin{tabular}[t]{c}%
\@author
\end{tabular}
\end{center}
\begin{doublespace}
\addtocounter{page}{1}
}
{\end{doublespace}\pagestyle{empty}\newpage}
% Define the command \pubabstractname
\newcommand{\pubabstractname}{\textbf{PUBLIC ABSTRACT}}
%Define the pubabstract environment for the dissertation
\newcounter{pubabs}
\newenvironment{pubabstract}{%
\setcounter{pubabs}{\value{page}}
\thispagestyle{empty}
%\pagestyle{empty}
\pagenumbering{roman}
\begin{center}%
\bfseries \pubabstractname\vspace{\baselineskip}%\value{page}
\MakeUppercase{\@title}% DO NOT REMOVE THE FOLLOWING BLANK LINE
\vspace{\baselineskip}% DO NOT REMOVE THE FOLLOWING BLANK LINE
By
\vspace{\baselineskip}
\begin{tabular}[t]{c}%
\@author
\end{tabular}
\end{center}
\begin{doublespace}
}
{\end{doublespace}\newpage\setcounter{page}{\value{pubabs}}
}
% Define the Copyright Page
\newenvironment{copyrt}{%
\newpage
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
\begin{tabular}{l}
Copyright by\\
\MakeUppercase{\@author}\\
\number\year
\end{tabular}
\end{center}\vfill}
{\newpage}
% Define the Dedication Page
\newcommand{\dedname}{DEDICATION}
\newenvironment{dedication}{%
\newpage
\thispagestyle{plain}
\pagestyle{plain}
\vspace*{\fill}}
{
\vfill}
% Define the Acknowledgement Page
\newcommand{\ackname}{ACKNOWLEDGMENTS}
\newenvironment{acknowledgment}{%
\newpage
\thispagestyle{plain}
\pagestyle{plain}
\begin{center}
{\bfseries\ackname}
\vspace{\baselineskip}
\end{center}
\begin{doublespace}
}
{\end{doublespace}\thispagestyle{plain}
\pagestyle{plain}}
% Define the Preface Page
\newcommand{\prefname}{PREFACE}
\newenvironment{preface}{%
\newpage
\thispagestyle{plain}
\pagestyle{plain}
\begin{center}
{\bfseries\prefname}
\vspace{\baselineskip}
\end{center}
\begin{doublespace}
}
{\thispagestyle{plain}
\end{doublespace}
\pagestyle{plain}}
% Redefine the \@chapter command to put "Chapter"
% before each chapter entry in the ToC and to put
% "Appendix" before each appendix entry in the ToC.
% Replaced \chaptername by \@chapapp 7-26-12
\def\@chapter[#1]#2{
\ifnum \c@secnumdepth >\m@ne %If section depth is greater than -1??
\if@mainmatter %If we are in the main matter...
\refstepcounter{chapter}%
\vspace*{-4\baselineskip} %Affects display of chapter title in actual chapter
\typeout{\@chapapp\space\thechapter.}%
\ifx\chaptername\chapname %If this is a main chapter...
\tocentry{\protect\numberline{\@chapapp\space\thechapter}#1}
{\@chapapp\space\thechapter\space-\space#1} %Set the TOC entry for top level
%Here and elsewhere, Cliff uses a different approach, but that approach doesn't actually seem to WORK for me.
%The text in the first brackets is the formatted text in the document, and in the second, the unformatted text
%for the PDF bookmarks.
\else
\ifx\covername\appendixname %Appendix cover page?
\else %If this is an appendix chapter...
\addtocontents{toc}{\protect\setlength{\cftbeforechapskip}{0pt}} %Single space appendix titles in TOC
\tocentry{\protect\numberline{\@chapapp\space\thechapter}#1}
{\@chapapp\space\thechapter\space-\space#1} %Set the TOC entry for top level
\fi
\fi%
\else %If this is NOT mainmatter..
\addcontentsline{toc}{chapter}{#1}%
\fi
\else %Not sure when this triggers, honestly - DMA.
%\tocentry{#1}{#1}
\addcontentsline{toc}{chapter}{#1}%
\fi
%Do in all cases?
\chaptermark{#1}%
\if@twocolumn %If this is a two column layout
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}% Chapter headings in the chapters/Apps
\@afterheading
\fi}
% Rededefine the table of contents command
\renewcommand\contentsname{TABLE OF CONTENTS}
\renewcommand\tableofcontents{
\begin{singlespace}%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\vspace{-2.5\baselineskip}\centerline{\large \MakeUppercase\contentsname} %Put the phrase ``TABLE OF CONTENTS''
\@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\vspace{-\baselineskip}
\@starttoc{toc} %Start building the actual contents of the TOC
\if@restonecol\twocolumn\fi
\end{singlespace}
}
\newcommand{\TOC}{
\clearpage
\pagestyle{plain}
\pdfbookmark[0]{Table of Contents}{tocline} %Add a bookmark in the PDF to the TOC
\tableofcontents
\clearpage
\pagestyle{plain}
}
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
\renewcommand{\cftaftertoctitle}{\vspace{\baselineskip}}
\setlength{\cftbeforechapskip}{\baselineskip}
\renewcommand{\cftchapnumwidth}{6.5em}
% Define the \LOT command to augment the \listofftables command
\renewcommand\listoftables{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\vspace{-2.5\baselineskip}\centerline{\large \MakeUppercase
\listtablename}}
\tocentry{\textbf{LIST OF TABLES}}{List of Tables}
\@mkboth{\MakeUppercase\listtablesname}%
{\MakeUppercase\listtablename}%
\begin{singlespace}
\vspace*{-\baselineskip}
\@starttoc{lot}%
\if@restonecol\twocolumn
\fi
\end{singlespace}
}
\newcommand{\LOT}{
\clearpage
\setlength\cftbeforetabskip{\baselineskip}
\listoftables
\clearpage
\pagestyle{plain}}
\renewcommand{\cftafterlottitle}{\vspace{\baselineskip}}
\renewcommand{\cfttabnumwidth}{6em}
\renewcommand{\cfttabpresnum}{Table }
\renewcommand{\cfttabaftersnum}{:}
% Define the \LOF command to augment the \listoffigures command
\renewcommand\listoffigures{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\vspace{-2.5\baselineskip}\centerline{\large \MakeUppercase\listfigurename}}
\tocentry{\textbf{LIST OF FIGURES}}{List of Figures}
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}%
\vspace*{-1\baselineskip}
\@starttoc{lof}%
\if@restonecol\twocolumn
\fi
}
\newcommand{\LOF}{
\clearpage
\setlength\cftbeforefigskip{\baselineskip}
\listoffigures
\clearpage
\pagestyle{plain}}
\renewcommand{\cftafterloftitle}{\vspace{\baselineskip}}
\renewcommand{\cftfignumwidth}{6em}
\renewcommand{\cftfigpresnum}{Figure }
\renewcommand{\cftfigaftersnum}{:}
% Define the KEY TO SYMBOLS
\newenvironment{symbols}{%
\clearpage
\thispagestyle{plain}\pagestyle{plain}
\phantomsection
\begin{center}
\bfseries{\MakeUppercase{\large KEY TO SYMBOLS}}
\end{center}
\tocentry{KEY TO SYMBOLS}{Key To Symbols}%
\vspace*{\baselineskip}}
{\newpage}
% Define the KEY TO ABBREVIATIONS
\newenvironment{abbrev}{%
\clearpage
\thispagestyle{plain}\pagestyle{plain}
\phantomsection
\begin{center}
\bfseries{\MakeUppercase{\large KEY TO ABBREVIATIONS}}
\end{center}
\tocentry{KEY TO ABBREVIATIONS}{Key To Abbreviations}%
\vspace*{\baselineskip}}
{\newpage}
% Single space quotation environments.
\renewenvironment{quotation}
{\begin{singlespace}\list{}{\listparindent 1.5em%
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@}%
\item\relax}
{\endlist\end{singlespace}}
\renewenvironment{quote}
{\begin{singlespace}\list{}{\rightmargin\leftmargin}%
\item\relax}
{\endlist\end{singlespace}}
% Redefine the \appendix command
% to be used for a single appendix.
\renewcommand\appendix{\par
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}} %Supress TOC section headings for the appendix
\clearpage\thispagestyle{plain}
\phantomsection
\vspace*{\fill}
\begin{center}
\Huge{\textbf{APPENDIX}}
\vspace{\baselineskip}%
\end{center}
\tocentry{APPENDIX}{APPENDIX}
\vfill
\newpage
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\renewcommand{\chaptername}{\appendixname}
\gdef\chaptername{\appendixname}%
\gdef\thechapter{\c@chapter\alpha} %
%\gdef\thechapter{\@Alph\c@chapter}
\clearpage
}
% Define the command \appendices to be used
% for 2 or more appendices.
\newcommand\appendices{\par
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}} %Supress TOC section headings for the appendices
\renewcommand{\covername}{Appendices}
\clearpage\thispagestyle{plain}
\phantomsection
\vspace*{\fill}
\begin{center}
\Huge{\textbf{APPENDICES}}
\vspace{\baselineskip}%
\end{center}
\tocentry{APPENDICES}{Appendices}
%\vfill
\vspace*{\fill}
\newpage
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\gdef\chaptername{\appendixname}%
\gdef\thechapter{\@Alph\c@chapter}
\renewcommand*{\theHchapter}{\Alph{chapter}}
\clearpage
}
% Single space the bibliography.
\newcommand{\bibnamecaps}{\typeout\MakeUppercase{\bibname}}
\renewenvironment{thebibliography}[1]
{\clearpage\thispagestyle{plain}
\phantomsection
\vspace*{\fill}
\begin{center}
\Huge \textbf{\MakeUppercase{\bibname}}
\vspace{\baselineskip}%
\end{center}
\vfill
\addtocontents{toc}{\protect\setlength{\cftbeforechapskip}{\baselineskip}} %Double space before bibliography title in TOC
\tocentry{\MakeUppercase{\bibname}}{\bibname}%Must be BEFORE \newpage to make TOC number correct
\newpage
\chapter*{\vspace{-2.2\baselineskip}\centerline{\MakeUppercase{\bibname}}}%
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
\begin{singlespace}
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\setlength{\itemsep}{.2in}
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist
\end{singlespace}}
% Properly locates page number for landscape
\let\LS@makecol=\@makecol
\let\LS@makefcolumn=\@makefcolumn
\def\LS@rot{%
\setbox\@outputbox\vbox{\hbox{\rotatebox{90}%
{\makebox[-4.5in][l]{\raisebox{-.4in}{\the\value{page}}}\box\@outputbox}}}}
% Set the starting page style
\pagestyle{empty}