summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/york-thesis/york-thesis.cls
blob: 6abd5d33aca06f285448649b22269879185b123b (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
% york-thesis.cls
%
%% This is a class (.cls) file for LaTeX2e.
%% This is a replacement for the dissertation.sty file used with
%% LaTeX209.  Basically we want the report class with a 
%% few modifications.
%%
%% Current Maintainer:  Norman Gall
%%                      Department of Philosophy
%%                      The University of Calgary
%%                      Calgary, Alberta, Canada
%%
%%                      ngall@ucalgary.ca
%%
%% Next to last Author: Thomas J. Stone
%%
%% Feel free to copy, modify, and distribute.
%% I am interested in any changes you make.
%% Send changes to ngall@ucalgary.ca
%%
%% This file has been changed so much from the original that I almost feel
%% justified in claiming it as my own. Of course, so many people have
%% contributed code (i.e., I have shamelessly stolen it) that I feel
%% compelled to mention them; so their names still appear.
%%
%% Please note that I have made a number of stylistic choices in how the 
%% text appears. If you feel stongly about any particular choice, give me 
%% a shout and I will see what I can do about implementing a switch. But 
%% I make no promises. Some of these choices are not negotiable. :)
%%
%% The original is based on the dissertation.sty file by Pablo A. Straub.
%% (Actually it is based on a modified version that contains 
%% modifications by Aaron E. Naiman.)
%
% Version History
% ---------------
%
% v1.8 2004-05-05       Removed code for the copyright page; York theses
%                        have pre-printed copyright and certificate pages
%                        that are un-numbered and inserted after printing
%                        pagination for the abstract page starts at iv
%
% v1.7 2004-03-27       Added code to single space the verse environment
%
% v1.6 2003-11-21       Added code to remove chapter resets of footnote
%                        numbering.
%
% v1.5 2003-09-20       Changed appearance of chapter titles:
%                        removed \chaptername and placed the
%                        section number on the same line as the 
%                        label (suggested by Dave Makalsky)
%
% v1.4 2003-09-07       Made subsection and subsubsection sizes more
%                        sane
%
% v1.3 2003-03-30       Corrected some typos and added an epigraph 
%                        command
%
% v1.2 2002-02-15       Corrected error with bibliography toc line
%
% v1.1 2002-02-13       Modifications by Norm Gall <gall@spookyhill.net>
%                        for York University, Toronto, ON, Canada; 
%                        a) name changed to york-thesis
%                        b) added a TOC entry for the Table of Contents
%                        c) added {final | draft} option in 
%                           \documentclass command
%                        d) made footnote spacing single spaced in 
%                           final
%                        e) changed quoting environments for single 
%                           spacing in final
%                        f) various housekeeping functions
%
% v1.0  1995-04-25      Set up for distribution to others.
%
%   9/1997  changes by Stefan Kehrbaum (sk) to accomodate new guidelines 
%   implemented by the graduate school in summer 1997
%
% v0.3  1995-01-15      Got rid of a bunch of stuff that I don't think
%                       is needed.  I.e.,  some of the cross referencing
%                       stuff.  I think that most people either won't
%                       use this or they have their own macros.
%
% v0.2  1995-01-15      Modified slightly to conform to LaTeX2e 
%                        suggested standards
%
% v0.1  1995-01-15      Test of Class file
%                       Included (Aaron Naiman's modified version) of 
%                       dissertation.sty
%
%-- Notes -------------------------------------------------------------
%
%       a) both letterpaper and 12pt options are forced. The document  
%               cannot change them.
%
%-- Identification ----------------------------------------------------
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{york-thesis}[2004/05/05 v1.8]
%
%-- Initial Code ------------------------------------------------------
%
\RequirePackage{ifthen}
%
%-- Declaration of Options -----------------------------
% saving taken from dissertation.sty with modification
%
\newboolean{saving}

\DeclareOption{draft}{\setboolean{saving}{true}}
\DeclareOption{final}{\setboolean{saving}{false}}

\PassOptionsToClass{12pt}{report}
\PassOptionsToClass{letterpaper}{report}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}

\ExecuteOptions{draft}
%-- Execution of Options -------------------------------
\ProcessOptions
%-- Package Loading ------------------------------------
\LoadClass{report}
%-- Main Code ------------------------------------------
%
% 1. Preliminary Matter
%
%     some redefinitions I need later
%
\let\oldquote\quote
\let\oldendquote\endquote
\let\oldquotation\quotation
\let\oldendquotation\endquotation
\let\oldverse\verse
\let\oldendverse\endverse
\let\oldbibliography\bibliography
\let\oldendbibliography\endbibliography
%
% masters taken from dissertation.sty with modification
%
\newboolean{masters}\setboolean{masters}{false}
\newcommand{\@thesis}{\ifthenelse{\boolean{masters}}{Thesis}{Dissertation}}
%
%
%
% 2. Margins and spacing
%
% Rules taken from York FGS Guidelines for Theses and Dissertations
%
% The style guide requires a 1.5in left and top margin.  We use 1.65in.
% The style guide requires a 1.0in right and bottom margin. 
% We use 1.15in.
%
%
% \spacing - redefine \baselinestretch and recompute \baselineskip
%            lateral effect: set typeface to normalize roman
%
\newcommand{\spacing}[1]{\renewcommand{\baselinestretch}{#1}%
                        \large\normalsize}
%
\ifthenelse{\boolean{saving}}
{       % settings for draft
        \setlength {\topmargin}{0.0in}          % top margin    1.0 inch
        \setlength {\textheight}{8.5in}         % bottom margin 1.0 inch
        \setlength {\oddsidemargin}{0.0in}      % left margin   1.0 inch
        \setlength {\evensidemargin}{0.0in}     % right margin (ds)  1.0 inch
        \setlength {\textwidth}{6.5in}          % right margin  1.0 inch
        \spacing{1}                             % single for drafts
}
{       % settings for final
        \setlength {\topmargin}{0.65in}         % top margin    1.65 inch
        \setlength {\textheight}{7.6in}         % bottom margin 1.00 inch
        \setlength {\oddsidemargin}{0.65in}     % left margin   1.65 inch
        \setlength {\evensidemargin}{0.15in}    % right margin (ds)  1.15 inch
        \setlength {\textwidth}{5.7in}          % right margin  1.15 inch
        \setlength {\footskip}{0.7in}           % space above pg num
        \spacing{2}                             % double for final
        \renewenvironment{quote}                % redefine quote 
                        {\oldquote\spacing{1}}
                        {\oldendquote\spacing{2}}
        \renewenvironment{quotation}            % redefine quotation
                        {\oldquotation\spacing{1}}
                        {\oldendquotation\spacing{2}} 
        \renewenvironment{verse}                % redefine verse
                        {\oldverse\spacing{1}}
                        {\oldendverse\spacing{2}} 
}
\setlength {\footnotesep}{14pt}         
\setlength {\headheight}{0in}                   % no header
\setlength {\headsep}{0in}                      % no header separation
\renewenvironment{bibliography}[1]              % automatically enter toc line
        {\addcontentsline{toc}{chapter}{Bibliography}\oldbibliography {#1}}
                        {\oldendbibliography}
%
% define command that can undo footnote reset between chapters
% (shamelessly lifted from removefr.sty by Donald Arseneau) 
%
\def\@removefromreset#1#2{\let\@tempb\@elt
   \expandafter\let\expandafter\@tempa\csname c@#1\endcsname
   \def\@elt##1{\expandafter\ifx\csname c@##1\endcsname\@tempa\else
         \noexpand\@elt{##1}\fi}%
   \expandafter\edef\csname cl@#2\endcsname{\csname cl@#2\endcsname}%
   \let\@elt\@tempb}
%
% undo the hideous \@addtoreset in report.cls:
\@removefromreset{footnote}{chapter}
\def\resetfootnote{\setcounter{footnote}{0}}  % definition to reset footnote       
%
% Make footnotes single spaced
%
%       code shamelessly stolen from setspace.sty 
%        written by Geoffrey Tobin <G.Tobin@latrobe.edu.au>
%
\long\def\@footnotetext#1{%
  \insert\footins{%
    \def\baselinestretch {1}%
    \reset@font\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth
    \@parboxrestore
    \protected@edef\@currentlabel{%
      \csname p@footnote\endcsname\@thefnmark
    }%
    \color@begingroup
      \@makefntext{%
        \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
    \color@endgroup}}
%
% 3. Commands to define parameters for the front matter
% 
% There are two kinds of commands that define parametters for the  front
% matter:  those  that  provide info (like \author or \abstractfile) and
% those that set flags (like \hascopyright).
% 
% The following are the definitions of the commands  that  provide  info
% (standard  LaTeX  commands  like  \author are omitted because they are
% already defined).
%
\def\department#1{\gdef\@department{#1}}
\def\abstractfile#1{\gdef\@abstractfile{#1}}
\def\masterof#1{\gdef\@masterof{#1}}
\def\acknowledgementsfile#1{\gdef\@acknowledgementsfile{#1}}
%
% The following are the initial values for some commands that 
% provide info.
%
\gdef\@author{{\it Your Full Name}}
\gdef\@title{{\it The Title of the Work}}
\gdef\@date{\number\year}
\gdef\@department{Department of Ancient Studies}
\def\@abstractfile{abstract}
\def\@acknowldgementsfile{acknowledgements}
\gdef\@masterof{Arts}
%
%
% The following are all switch setting commands along 
% with their initial values 
%
%
\newboolean{hascopyright}\setboolean{hascopyright}{true}
\newboolean{hasfigures}\setboolean{hasfigures}{false}
\newboolean{hastables}\setboolean{hastables}{false}
%
%
% 4. Command \makefrontmatter
%        
% The \makefrontmatter command creates the front matter by conditionally
% invoking other commands:
%  
%       \makeabstract, \maketitlepage, \makepreface,
%       \makededication, \makeacknowledgements, \tableofcontents,
%       \makelistoftables, \makelistoffigures, \makecommentpage.
%
% \makefrontmatter takes care of numbering in lowercase roman, arabic or
% none.
%
\def\makefrontmatter{
 \pagestyle {empty}
 \maketitlepage
 \pagestyle {plain}
 \pagenumbering {roman}
 \setcounter {page}{4}
 \@ifdefined {@abstractfile}{\makeabstract}
 \@ifdefined {@acknowledgementsfile}{\makeacknowledgements}
 \addcontentsline {toc}{chapter}{Table of Contents}
 \tableofcontents\newpage
 \ifthenelse{\boolean{hastables}}{\makelistoftables}{}
 \ifthenelse{\boolean{hasfigures}}{\makelistoffigures}{}
 \pagenumbering {arabic}
 \setcounter {page}{1}
 }
%
%
% 5. Commands to create different parts of the front matter
%
%
% \maketitlepage - create the title page according to a complex format
%
\def\maketitlepage{
 \newpage
 \vspace*{.85in}
 \begin{center}
 \spacing{1}
 {\begin{tabular}[t]{c}\@title\end{tabular}}
 \\ \hugeskip 
 \hugeskip
 \hugeskip
 \hugeskip
 {\bigskip \@author}
 \end{center}
 \hugeskip \hugeskip \hugeskip \hugeskip \hugeskip \hugeskip
 {\spacing{1}
 \begin{center}
 \ifmasters A thesis \else A dissertation \fi
          submitted to the Faculty of Graduate Studies \\
          in partial fulfilment of the requirements \\
          for the degree of \\
 \hugeskip \hugeskip \hugeskip
 \ifmasters Master of \@masterof \else Doctor of Philosophy \fi \\
 \hugeskip \hugeskip % \hugeskip
 Graduate Programme in \@department \\
 York University \\
 Toronto, Ontario \\
 \@date
 \end{center}
 \newpage}}
%
% \makeabstract - create the abstract page(s)
%
\def\makeabstract{
 \newpage
 \addcontentsline {toc}{chapter}{Abstract}
 \chapter*{Abstract}
 \noindent
 \@input{\@abstractfile}
 \newpage}
%
% \makeacknowledgements - create the acknowledgements page(s)
%
\def\makeacknowledgements{
 \newpage
 \addcontentsline {toc}{chapter}{Acknowledgements}
 \chapter*{Acknowledgements}
 \noindent
 \@input{\@acknowledgementsfile}
 \newpage}
%
% \makelistoftables - create the list of tables
%
\def\makelistoftables{
 \newpage
 \addcontentsline {toc}{chapter}{List of Tables}
 \listoftables
 \newpage}
%
% \makelistoffigures  - create the list of figures
%
\def\makelistoffigures{
 \newpage
 \addcontentsline {toc}{chapter}{List of Figures}
 \listoffigures
 \newpage}
%
% \hugeskip - skip twice as much as the TeX command \bigskip
%
\def\hugeskip{\vskip 24pt plus 8pt minus 8pt}
%
% \@ifdefined - expand #2 if command #1 is not defined
%
\def\@ifdefined#1#2{\@ifundefined{#1}{}{#2}}
%
% \@makechapterhead \@makeschapterhead - create a chapter head
%
% These standard LaTeX commands are redefined here to use not-so-huge type
% and to provide chapters of form: N chaptername

%
\def\@makechapterhead#1{ \vspace*{50pt} { \parindent 0pt \raggedright%
         \ifnum \c@secnumdepth >\m@ne \Large\bf 
         \thechapter \hskip 1em \fi \Large \bf #1\par
         \nobreak \vskip 40pt } }
%
\def\@makeschapterhead#1{ \vspace*{50pt} { \parindent 0pt \raggedright
 \Large \bf #1\par
 \nobreak \vskip 40pt } }
%
% redefine section size to the same size as subsection, etc.
%
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\large\bfseries}}
                                   
\renewcommand\subsection{\@startsection {subsection}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\normalsize\bfseries}}

\renewcommand\subsubsection{\@startsection {subsubsection}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\normalsize\bfseries}}
%
% First we rename the headings for the toc, lof, and the references.
%
\renewcommand\contentsname{Table of Contents}                                 
\renewcommand\listfigurename{List of Figures}
\renewcommand\listtablename{List of Tables}
\renewcommand\bibname{Bibliography}
%
% next we modify the definitions of \tableofcontents, \listoffigures,
% and \listoftables.  We need to have \underline{Section}   
% \underline{Page} and so forth....  basically we add the contentsheader 
% line to each of the standard definitions 
%
\newcommand{\contentsheader}[2]
{       \addtocontents{#1}
        {       \centerline{\underline{#2}\protect\hfill%
                           \underline{Page}}%
        }%
}
%
\renewcommand\tableofcontents
{       \if@twocolumn
                \@restonecoltrue\onecolumn
        \else
                \@restonecolfalse
        \fi
        \chapter*{\contentsname \@mkboth        {\uppercase{\contentsname}}%
                                                {\uppercase{\contentsname}}}%
        \@starttoc{toc}%
        \if@restonecol\twocolumn\fi
}
%
\renewcommand\listoffigures
{       \if@twocolumn
                \@restonecoltrue\onecolumn
        \else
                \@restonecolfalse
        \fi
        \chapter*{\listfigurename \@mkboth      {\uppercase{\listfigurename}}%
                                                {\uppercase{\listfigurename}}}%
        \@starttoc{lof}%
        \if@restonecol\twocolumn\fi
}
%
\renewcommand\listoftables
{       \if@twocolumn
                \@restonecoltrue\onecolumn
        \else
                \@restonecolfalse
        \fi
        \chapter*{\listtablename \@mkboth       {\uppercase{\listtablename}}%
                                                {\uppercase{\listtablename}}}%
        \@starttoc{lot}%
        \if@restonecol\twocolumn\fi
}
%
%       \epigraph{text}{byline}
%
\newcommand{\epigraph}[2]{\begin{flushright}\begin{minipage}{4in}%
                        \spacing{1}#1
                    \begin{flushright}#2\end{flushright}\hrule%
                    \end{minipage}\vskip 12pt\end{flushright}}
%
%% End of file `york-thesis.cls'.