-
Notifications
You must be signed in to change notification settings - Fork 0
/
ur_thesis.sty
326 lines (321 loc) · 9.62 KB
/
ur_thesis.sty
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
%
% ur_thesis
%
% adapted from urcsthesis 2021
% Dan Gildea
%
\typeout{Document Style `ur_thesis' <19 April 2022>.}
%
% margin settings
%
\oddsidemargin 0.5in % Left margin on right-hand pages.
\evensidemargin 0in % Left margin on left-hand pages.
\textwidth 6in
\textheight 8.5in
\footskip 30pt
%
% paragraph settings
%
\parskip 4pt plus 1.5pt minus 1.5pt
\clubpenalty 500
\widowpenalty 500
\displaywidowpenalty=500
%
% more spacing between text and footnote
%
\def\footnoterule{\kern 2pt% extra space
\kern-3\p@\hrule width .4\columnwidth\kern 2.6\p@}
\footnotesep 10pt % more space between footnotes
\textwidth 5.75in
\topmargin -.5in
\headheight 12pt
\headsep 42pt
%
% get UR macros
%
\newlength{\chaptitlewidth}
\newlength{\chapnowidth}
%
% Space and a half. Required because the committee designing the
% standards was confused. Cannot be changed because it is a rule.
% (NGM)
%
\renewcommand{\baselinestretch}{1.5}
\newcommand{\singlespacethesis}{\def\baselinestretch{1}}
%
% year date format. Required by new manual 1992 (NGM)
%
\def\today{\number\year}
%
% thesisby
%
\def\thesisby#1{\gdef\@thesisby{#1}}
\def\@thesisby{\vskip 2ex by\vskip 2ex}
%
% thesissubmit
%
\def\thesissubmit#1{\gdef\@thesissubmit{#1}}
\def\@thesissubmit{\vskip 6ex Submitted in Partial Fulfillment of the\\~\\
Requirements for the Degree\vskip 2ex}
%
% thesisproposal
%
\def\thesisproposal{\thesissubmit{\vskip 6ex
Thesis Proposal\\~\\for the Degree\vskip 2ex}}
%
% thesisdegree
%
\def\thesisdegree#1{\gdef\@thesisdegree{#1}}
% Changed from small caps in accord with new requirement from Dean
% Beach May 1994 (NGM)
\def\@thesisdegree{{Doctor of Philosophy}}
%
% thesissupervisor. Changed 1992 (NGM)
%
\def\thesissupervisor#1{\gdef\@thesissupervisor{#1}}
\def\@thesissupervisor{UNKNOWN}
%
% thesissupervise
%
\def\thesissupervise#1{\gdef\@thesissupervise{#1}}
\def\@thesissupervise{\vskip 6ex Supervised by\\~\\
\@thesissupervisor\vskip 2ex}
%
% thesisdepartment Changed 1992 (NGM)
%
% Changed Fall 2009 - CS is now in engineering
%
\def\thesisdepartment#1{\gdef\@thesisdepartment{#1}}
\def\@thesisdepartment{Department of Computer Science\\Arts, Sciences and Engineering\\
Edmund A. Hajim School of Engineering and Applied Sciences}
%
% thesisuniversity Changed 1992 (NGM)
%
\def\thesisuniversity#1{\gdef\@thesisuniversity{#1}}
\def\@thesisuniversity{\vskip 3ex
University of Rochester\\Rochester, New York}
%
% redefine maketitle to use the empty page style
%
\def\maketitle{\par
\begingroup
\def\thefootnote{\fnsymbol{footnote}}
\def\@makefnmark{\hbox
to 0pt{$^{\@thefnmark}$\hss}}
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle\thispagestyle{empty}\@thanks
\endgroup
\setcounter{footnote}{0}
\let\maketitle\relax
\let\@maketitle\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
%
% redefine @maketitle to box the information appropriately
% added parbox and hskip before it
% added techrepdept and techrepnum
% changed vertical space after date
%
\def\@maketitle{
%
% Turn off space and a half for title page (NGM)
%
\renewcommand{\baselinestretch}{1}
\newpage
\thispagestyle{empty} % So we get no page number on the title page
\null
\vspace{0.25in} % Vertical space above title.
\begin{center}
{\huge \@title \par} % Title set in \huge size.
{\large \@thesisby % Author set in \large size
\@author \par}
{\large \@thesissubmit \@thesisdegree}
{\large \@thesissupervise}
{\large \@thesisdepartment}
{\large \@thesisuniversity \vskip 1.5em \@date}
\end{center}
\pagenumbering{roman}
\clearpage
}
%
% curriculumvitaehead
%
\def\curriculumvitaehead#1{\gdef\@curriculumvitaehead{#1}}
\def\@curriculumvitaehead{\thispagestyle{plain}
\chapter*{Biographical Sketch\@mkboth{CURRICULUM VITAE}{CURRICULUM VITAE}}
\addcontentsline{toc}{chapter}{Biographical Sketch}}
%
% curriculumvitae
%
\newenvironment{curriculumvitae}{\@curriculumvitaehead}{\clearpage}
%
% contributors and funding sources head
%
\def\contributorshead#1{\gdef\@contributorshead{#1}}
\def\@contributorshead{\thispagestyle{plain}
\chapter*{Contributors and Funding Sources\@mkboth{CONTRIBUTORS AND FUNDING SOURCES}{CONTRIBUTORS AND FUNDING SOURCES}}
\addcontentsline{toc}{chapter}{Contributors and Funding Sources}}
%
% contributors and funding sources
%
\newenvironment{contributors}{\@contributorshead}{\clearpage}
%
% acknowledgmentshead
%
\def\acknowledgmentshead#1{\gdef\@acknowledgmentshead{#1}}
\def\@acknowledgmentshead{\thispagestyle{plain}
\chapter*{Acknowledgments\@mkboth{ACKNOWLEDGEMENTS}{ACKNOWLEDGEMENTS}}
\addcontentsline{toc}{chapter}{Acknowledgments}}
%
% acknowledgments
%
\newenvironment{acknowledgments}{\@acknowledgmentshead}{\clearpage}
%
% abstracthead
%
\def\abstracthead#1{\gdef\@abstracthead{#1}}
\def\@abstracthead{\thispagestyle{plain}
\chapter*{Abstract\@mkboth{ABSTRACT}{ABSTRACT}}
\addcontentsline{toc}{chapter}{Abstract}}
%
% use narrow text width for abstract to center under window
% vfil before abstract
%
\renewenvironment{abstract}{\@abstracthead}{\clearpage}
%
% forewordhead
%
\gdef\firstchapter{0}% Used to control when Arabic-style page number starts
\def\forewordhead{\@forewordhead}
\def\@forewordhead{\thispagestyle{plain}
\clearpage % if you don't do this, the previous page will get roman numbers too
\ifcase\firstchapter % only start Arabic numbers once (checked in \chapter, too)
\pagenumbering{arabic}
\gdef\firstchapter{1} % need to do \gdef or it won't be visible later
\fi
\chapter*{Foreword\@mkboth{FOREWORD}{FOREWORD}}
\addcontentsline{toc}{chapter}{Foreword}}
\newenvironment{foreword}{\@forewordhead}{\clearpage}
%
% count chapters and sections two levels deep
%
\setcounter{secnumdepth}{2}
%
% enter only chapters and top sections are in the table of contents
%
\setcounter{tocdepth}{1}
%
% redefine plain page to put page numbers towards outside.
% Changed 1992 to put numbers at top of page. (NGM)
%
\def\ps@plain{\let\@mkboth\@gobbletwo
\def\@oddhead{\rm\hfil\thepage}\def\@oddfoot{}%
\def\@evenhead{\rm\thepage\hfil}\def\@evenfoot{}}
\pagestyle{plain}
%
% chapter redefinitions
%
\def\@chapapp{Chapter}
\def\thechapter{\arabic{chapter}}
%
% \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
%
\def\@makechapterhead#1{ % Heading for \chapter command
\cleardoublepage
\ifcase\firstchapter
\pagenumbering{arabic}
\def\firstchapter{1} % do not do this again
\fi
\vspace*{50pt} % Space at top of text page.
{ \parindent 0pt \raggedright
\par
% Print chapter number and title.
\huge\bf\thechapter\hspace{1em}%
\settowidth{\chapnowidth}{\huge\bf\thechapter\hspace{1em}}%
\setlength{\chaptitlewidth}{\textwidth}%
\addtolength{\chaptitlewidth}{-\chapnowidth}%
\parbox[t]{\chaptitlewidth}{\raggedright#1}
\nobreak % TeX penalty to prevent page break.
\vskip 40pt % Space between title and text.
}
}
%
% \tableofcontents gets the title changed
%
\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
\fi\chapter*{Table of Contents\@mkboth{TABLE OF CONTENTS}{TABLE OF CONTENTS}}
\@starttoc{toc}\if@restonecol\twocolumn\fi}
%
% \listoffigures gets table of contents entry
%
\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
\fi\chapter*{List of Figures\@mkboth
{LIST OF FIGURES}{LIST OF FIGURES}}
\addcontentsline{toc}{chapter}{List of Figures}\@starttoc{lof}\if@restonecol
\twocolumn\fi}
%
% \listoffigures gets table of contents entry
%
\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
\fi\chapter*{List of Tables\@mkboth
{LIST OF TABLES}{LIST OF TABLES}}
\addcontentsline{toc}{chapter}{List of Tables}\@starttoc{lot}\if@restonecol
\twocolumn\fi}
%
% \mylistofalgorithms allows you to have add a list of algorithms to
% the TOC, too
\def\mylistofalgorithms{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi
%% \chapter*{List of Algorithms\@mkboth{LIST OF ALGORITHMS}{LIST OF ALGORITHMS}}
\addtocontents{loa}{\vskip 10pt } %\addvspace {10\p@ }}
\listofalgorithms
\addcontentsline{toc}{chapter}{List of Algorithms}
\@starttoc{loa}\if@restonecol\twocolumn\fi
}
%
%
% \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
%
\def\@makeschapterhead#1{ % Heading for \chapter* command
\vspace*{50pt} % Space at top of page.
\begin{center}
{\huge #1} % Print title.
\end{center}
\nobreak % TeX penalty to prevent page break.
\vskip 40pt % Space between title and text.
}
%
% place bibliography in table of contents
%
\def\thebibliography#1{\cleardoublepage\chapter*{Bibliography\@mkboth
{BIBLIOGRAPHY}{BIBLIOGRAPHY}}\addcontentsline{toc}{chapter}{Bibliography}
%% HERE IS THE NATBIB style inserted, instead of the
%% article.cls default
%% \bibfont\bibsection\parindent \z@
\list{\@biblabel{\arabic{NAT@ctr}}}{\@bibsetup{#1}%
\setcounter{NAT@ctr}{0}}%
\ifNAT@openbib
\renewcommand\newblock{\par}
\else
\renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
\fi
\sloppy\clubpenalty4000\widowpenalty4000
\sfcode`\.=1000\relax
\let\citeN\cite \let\shortcite\cite
\let\citeasnoun\cite
}
%\list
% {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
% \advance\leftmargin\labelsep
% \usecounter{enumi}}
% \def\newblock{\hskip .11em plus .33em minus .07em}
% \sloppy\clubpenalty4000\widowpenalty4000
% \sfcode`\.=1000\relax}
%
% \clearpage added to start of appendicies
%
\def\appendix{\par
\setcounter{chapter}{0}
\setcounter{section}{0}
\setcounter{subsection}{0}
\def\@chapapp{Appendix}
\def\thechapter{\Alph{chapter}}}