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
|
%%
%% File : infthesis.cls (LaTeX2e class file)
%% Author : Version 3.8 by Sharon Goldwater <sgwater@inf.ed.ac.uk>
%% Version 3.7 updated by Jennifer Oxley <joxley@inf.ed.ac.uk>
%% Version 3.6 by Charles Sutton <csutton@inf.ed.ac.uk>
%% Version 3.5 by Vasilis Vasaitis <v.vasaitis@sms.ed.ac.uk>
%% Version 3.4.1 updated by Tiejun Ma (t.j.ma@ed.ac.uk)
%% Version 3.0 by Mary Ellen Foster <mef@cogsci.ed.ac.uk>
%% Original version by Martin Reddy (mxr@dcs.ed.ac.uk)
%% Version : 3.8
%% Updates : 1.0 [9/11/95] - initial release.
%% 1.1 [24/4/96] - fixed bibliography bug caused by new report.cls
%% 1.2 [13/5/96] - \dedication & \thesiscaption[]
%% 1.3 [28/5/96] - abbrevs, parskip, minitoc fix, \headfootstyle
%% 1.4 [12/7/96] - appendices okay now, \cleardoublepage's added
%% 1.45 [6/8/96] - added space between chapter & numb on toc
%% 1.5 [13/8/96] - tailmargin was too small by 0.7cm!!
%% 2.0 [20/9/96] - \SetPrinter for margin settings (default=hp24)
%% no header, more abbreviations
%% 3.0 [16/10/2000] - Changed name and some formatting to become
%% "infthesis" instead
%% 3.1 [20/10/2000] - Added sans-serif running heads
%% Added pslatex by default (unless "cmfonts")
%% Added back in the code to create empty pages
%% on cleardoublepage (from titlesec.sty)
%% 3.2 [13/11/2000] - Changed name of font-setting commands
%% - Changed name of shield input file
%% 3.3 [23/11/2000] - Use the new and improved shield graphic
%% 3.4 [23/11/2000] - Political changes... also fixed a problem
%% with the margins on two-sided documents.
%% 3.4.1[09/03/2006] -add [a4paper] parameter for geometry package
%% 3.5 [02/02/2011] - fix double-sided margins with modern
%% versions of the geometry package
%% 3.6 [15/03/2012] - addition to support the MInf degree
%% 3.7 [07/02/2013] - fix MInf definition
%% 3.8 [06/06/2019] - added support for MSc degrees:
%% adi, datasci, di, cyber
%% This file contains a class definition, infthesis, for the LaTeX2e
%% system which defines the layout of theses which are submitted in
%% the School of Informatics at the University of Edinburgh.
%%
%% For information on this class, please refer to "texdoc infthesis"
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesClass{infthesis}[2013/02/07 v3.7 School of Informatics Thesis Class]
%%
%% --- Initial Code ---
%%
%% Required packages:
%% - ifthen for conditionals
%% - geometry for margin-setting
%% - graphics for including the (scaled) logo on the front page
%% - xspace if abbreviations are used
\usepackage[paper=a4paper]{geometry}
\RequirePackage{ifthen,%
graphics,%
xspace,
eushield}
%%%% The following packages are also used but are included further on rather
%%%% than here, either because their options depend on the class options or
%%%% because they only need to be loaded in certain cases.
%% - parskip for alternate formatting of paragraphs
%% - tocbibind to put LOF and LOT into table of contents
%% - sectsty to change format of section headers
%% - caption to change format of captions
%% - pslatex to set default fonts (if they don't specify notimes)
%% Default values for various fields
\newcommand{\@degreetext}{}
\newcommand{\@infschool}{School of Informatics}
\newcommand{\@university}{University of Edinburgh}
\newcommand{\@chapteralignment}{\centering}
\newcommand{\@chapterfont}{}
\newcommand{\@thesisside}{}
\newcommand{\@thesisopen}{}
\newcommand{\@thesispoints}{}
\newcommand{\@draftmessage}{}
%% Lots of boolean things to keep track of options
\newboolean{draftthesis}
\newboolean{usequotemarks}
\newboolean{usesinglespacing}
\newboolean{usedoublespacing}
\newboolean{usefullspacing}
\newboolean{usedeptreport}
\newboolean{useabbrevs}
\newboolean{sansheadings}
\newboolean{ltoc}
\newboolean{romanpre}
\newboolean{logo}
\newboolean{frontabs}
\newboolean{strict}
\newboolean{timesfonts}
%% Choose the monochrome crest for the front page (if crests used)
\shieldtype{0}
%%
%% --- Options ---
%%
%% Current options: phd, mphil, msc, mscres, bsc
%% deptreport
%% draft
%% usequotes
%% singlespacing, doublespacing, fullspacing
%% cent{er,re}chapter, leftchapter, rightchapter,
%% + all report.cls options
%%
%% Commands to set course and project (for 4th year -- too many possibilities
%% to use options).
\let\@course\@empty
\newcommand{\course}[1]{\gdef\@course{#1}}
\newcommand{\@project}{Fourth Year Project Report}
\newcommand{\project}[1]{\gdef\@project{#1}}
%% Options to specify school and/or degree
% MSc degree: default is none specified
\let\@mscdegree\@empty
\DeclareOption{adi}{\gdef\@mscdegree{Advanced Design Informatics}}
\DeclareOption{ai}{\gdef\@mscdegree{Artificial Intelligence}}
\DeclareOption{cogsci}{\gdef\@mscdegree{Cognitive Science}}
\DeclareOption{cs}{\gdef\@mscdegree{Computer Science}}
\DeclareOption{cyber}{\gdef\@mscdegree{Cyber Security, Privacy and Trust}}
\DeclareOption{datasci}{\gdef\@mscdegree{Data Science}}
\DeclareOption{di}{\gdef\@mscdegree{Design Informatics}}
\DeclareOption{dsti}{\gdef\@mscdegree{Data Science, Technology, and Innovation}}
\DeclareOption{inf}{\gdef\@mscdegree{Informatics}}
% Institute
\let\@institute\@empty
\DeclareOption{aiai}{\gdef\@institute{Artificial Intelligence
Applications Institute}}
\DeclareOption{cisa}{\gdef\@institute{Centre for Intelligent Systems
and their Applications}}
\DeclareOption{icsa}{\gdef\@institute{Institute of Computing Systems
Architecture}}
\DeclareOption{ianc}{\gdef\@institute{Institute for Adaptive and
Neural Computation}}
\DeclareOption{ilcc}{\gdef\@institute{Institute for Language, Cognition and
Computation}}
\DeclareOption{ipab}{\gdef\@institute{Institute of Perception, Action
and Behaviour}}
\DeclareOption{lfcs}{\gdef\@institute{Laboratory for Foundations of
Computer Science}}
% Degree
\def\@researchdegree#1{%
\renewcommand{\@degreetext}{#1 \\
\ifx\@empty\@institute
\PackageWarning{infthesis}{No institute specified for research
degree}
\else
\@institute \\
\fi
\@infschool \\ \@university}
\setboolean{strict}{true}}
\DeclareOption{phdproposal}{\@researchdegree{PhD Proposal}}
\DeclareOption{phd}{\@researchdegree{Doctor of Philosophy}}
\DeclareOption{mphil}{\@researchdegree{Master of Philosophy}}
\DeclareOption{mscres}{\@researchdegree{Master of Science by Research}}
\def\@taughtdegree#1#2{%
\renewcommand{\@degreetext}{#1 \\
\ifx\@empty#2
% \PackageWarning{infthesis}{No course/school specified for taught
% degree}
\else
#2 \\
\fi
\@infschool \\ \@university}%
\setboolean{strict}{false}}
\DeclareOption{msc}{\@taughtdegree{Master of Science}{\@mscdegree}}
\DeclareOption{minf}{\@taughtdegree{Master of Informatics}{~}}
\DeclareOption{bsc}{\@taughtdegree{\@project}{\@course}}
%% Chapter header alignment, font of headings
\DeclareOption{centerchapter,centrechapter}
{\renewcommand{\@chapteralignment}{\centering}}
\DeclareOption{leftchapter}
{\renewcommand{\@chapteralignment}{\raggedright}}
\DeclareOption{rightchapter}
{\renewcommand{\@chapteralignment}{\raggedleft}}
\DeclareOption{sansheadings}{%
\setboolean{sansheadings}{true}}
\DeclareOption{normalheadings}{%
\setboolean{sansheadings}{false}}
%% Sidedness, openright-ness, and font size (so that the draft option can
%% override them as needed.
\DeclareOption{twoside}{\renewcommand{\@thesisside}{twoside}}
\DeclareOption{oneside}{\renewcommand{\@thesisside}{oneside}}
\DeclareOption{openany}{\renewcommand{\@thesisopen}{openany}}
\DeclareOption{openright}{\renewcommand{\@thesisopen}{openright}}
\DeclareOption{10pt}{\renewcommand{\@thesispoints}{10pt}}
\DeclareOption{11pt}{\renewcommand{\@thesispoints}{11pt}}
\DeclareOption{12pt}{\renewcommand{\@thesispoints}{12pt}}
%% Font options.
\DeclareOption{notimes}{\setboolean{timesfonts}{false}}
\DeclareOption{timesfonts}{\setboolean{timesfonts}{true}}
%% Whether it's a draft (if so, single space and wider margins to fit more)
\DeclareOption{draft}{
\setboolean{draftthesis}{true}
\ExecuteOptions{10pt,openany,twoside}
\renewcommand{\@draftmessage}{(Draft Copy)}}
%% Use quotation marks in quotation environment?
\DeclareOption{usequotes}{\setboolean{usequotemarks}{true}}
%% Use useful abbrevations?
\DeclareOption{abbrevs}{\setboolean{useabbrevs}{true}}
%% Select spacing (default: fullspacing)
\DeclareOption{singlespacing}{\setboolean{usesinglespacing}{true}}
\DeclareOption{doublespacing}{\setboolean{usedoublespacing}{true}}
\DeclareOption{fullspacing}{\setboolean{usefullspacing}{true}}
%% Options to control the format of the cover page
\DeclareOption{deptreport}{\setboolean{usedeptreport}{true}}
\DeclareOption{logo}{%
\setboolean{logo}{true}}
\DeclareOption{frontabs}{%
\setboolean{frontabs}{true}}
%% Use parskip formatting of paragraphs
\DeclareOption{parskip}{\AtEndOfClass{\RequirePackage{parskip}}}
%% Whether to put list of figures and tables into TOC (default: no)
\DeclareOption{listsintoc}{%
\setboolean{ltoc}{true}}
%% Pre pages can be numbered separately or with the rest of the thesis.
\DeclareOption{romanprepages}{\setboolean{romanpre}{true}}
\DeclareOption{plainprepages}{\setboolean{romanpre}{false}}
%% Pass all other options directly to report class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
%% Set default options and process the ones we were given.
\ExecuteOptions{phd,centerchapter,romanprepages,%
sansheadings,openright,oneside,12pt,timesfonts}
\ProcessOptions
%%
%% --- Class Loading (built ontop of report.cls) ---
%%
\LoadClass[a4paper,\@thesispoints,\@thesisside,\@thesisopen]{report}
\ifthenelse{\boolean{draftthesis}}
{}
{\ifthenelse{\boolean{strict}}
{\if@twoside
\if@openright
\else
\PackageWarning{infthesis}{A two-sided PhD or MPhil thesis must
not use the "openany" option}
\fi
\fi}
{}}
%%
%% --- Main Code ---
%%
\newboolean{isspecialchapter}
\setboolean{isspecialchapter}{false}
%%
%% First we will sort out the page layout. The following is a brief
%% summary of the university typesetting regulations:
%% Printed on A4 paper, entirely on rectos (single-sided) or on both sides
%% but with chapters starting on even pages
%% 4cm binding margin
%% 2cm head margin
%% 2.5cm fore-edge margin
%% 4cm tail margin
%% spacing: not less then 1.5 spacing (18pt leading)
%% quotations & footnotes in single spacing
%% bibliography may be in single spacing
%% character size: not exceed 12pt for body text (at least 10pt)
%% style: a serif font should be used, with a sans-serif for headings
%% hyphenation should be avoided if possible
%% Try to set up the margins according to the specifications in the thesis
%% regulations. I have removed all of the old code (ca. 1996) that attempted
%% to compensate for particular printers in the Department of Computer
%% Science.
\ifthenelse{\boolean{draftthesis}}
{\geometry{a4paper,margin=2cm,twoside}}
{\if@twoside
\geometry{a4paper,left=4cm,top=2cm,right=2.5cm,bottom=4cm,twoside}
\else
\geometry{a4paper,left=4cm,top=2cm,right=2.5cm,bottom=4cm}
\fi}
%% We should make pages created by "cleardoublepage" be
%% really empty. Taken from titlesec.sty
\def\cleardoublepage{%
\clearpage{\ps@empty\if@twoside\ifodd\c@page\else
\hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}}
%%
%% Hack to make minitoc work with csthesis. We declare a new chapter
%% variable called starchapter to be used by \addcontentsline when we
%% add contents lines for List of Figures/Tables. If we don't, then
%% minitoc treats the LOF/LOT sections as chapters of the thesis.
%%
\@ifundefined{chapter}{}{\let\l@starchapter\l@chapter}
%%
%% This bit will set up the header format for the thesis.
%% This currently uses a "headings" style showing the pagenumber
%% and chapter number/title. (in slanted text) If the document is two-sided,
%% the right-hand page will show the section number and title instead.
%%
\newcommand{\headfootstyle}{\normalsize} % font size of headers and footers
% This will have \sffamily added to it if "sansheadings" is specified.
%% Set up different headers for right and left-hand pages. Those \defs are a
%% bit magic, but they seem to do the trick... :-)
%% Adapted from Francois Pitt's ut-thesis class from the University of
%% Toronto.
\if@twoside % if two-sided printing
\renewcommand{\ps@headings}{
\let\@mkboth\markboth
\def\@oddfoot{}
\let\@evenfoot\@oddfoot
\def\@oddhead{{\headfootstyle\itshape \rightmark}\hfil \headfootstyle\thepage}%
\def\@evenhead{\headfootstyle\thepage\hfil
{\headfootstyle\itshape\leftmark}}%
\def\chaptermark##1{\markboth
{\ifnum\c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ \fi ##1}{}}%
\def\sectionmark##1{\markright
{\ifnum\c@secnumdepth >\z@
\thesection. \ \fi ##1}}%
}%ps@headings
\else % if one-sided printing
\renewcommand{\ps@headings}{
\let\@mkboth\markboth
\def\@oddfoot{}
\def\@oddhead{{\headfootstyle\itshape\rightmark}\hfil
\headfootstyle\thepage}%
\def\chaptermark##1{\markright
{\ifnum\c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ \fi ##1}}%
}%ps@headings
\fi%@twoside
\renewcommand{\ps@plain}{
\renewcommand{\@oddfoot}{\hfil\headfootstyle\thepage\hfil}
\renewcommand{\@evenfoot}{\hfil\headfootstyle\thepage\hfil}
\renewcommand{\@evenhead}{}
\renewcommand{\@oddhead}{}
}
%%
%% And now setup that headings style as default
%%
\newcommand{\@textpagenumbering}{arabic}
\newcommand{\@preamblepagenumbering}{roman}
\newcommand{\@textpagestyle}{headings}
\newcommand{\@preamblepagestyle}{plain}
\pagestyle{\@textpagestyle}
\setcounter{secnumdepth}{6}
%%
%% Set up the default names for the various chapter headings
%%
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\listfigurename}{List of Figures}
\renewcommand{\listtablename}{List of Tables}
\renewcommand{\bibname}{Bibliography}
\renewcommand{\indexname}{Index}
\renewcommand{\abstractname}{Abstract}
%%
%% Some sundry commands which are generally useful...
%%
\ifthenelse{\boolean{useabbrevs}}
{\newcommand{\NB}{N.B.\@\xspace}
\newcommand{\eg}{e.g.\@\xspace}
\newcommand{\Eg}{E.g.\@\xspace}
\newcommand{\ie}{i.e.\@\xspace}
\newcommand{\Ie}{I.e.\@\xspace}
\newcommand{\etc}{etc.\@\xspace}
\newcommand{\etal}{{\em et al}.\@\xspace}
\newcommand{\etseq}{{\em et seq}.\@\xspace}
\newcommand{\precis}{pr\'ecis\xspace}
\newcommand{\Precis}{Pr\'ecis\xspace}
\newcommand{\role}{r\^ole\xspace}
\newcommand{\Role}{R\^ole\xspace}
\newcommand{\naive}{na\"\i ve\xspace}
\newcommand{\Naive}{Na\"\i ve\xspace}
\newcommand{\tm}{\raisebox{1ex}{\tiny TM}\xspace}
\newcommand{\cpright}{\raisebox{1ex}{\tiny\copyright}\xspace}
\newcommand{\degrees}{\raisebox{1.2ex}{\tiny\ensuremath{\circ}}\xspace}}
{}
%%
%% Set up the double spacing and provide commands to alter the
%% spacing for the subsequent text. By default, 1.5 spacing will be
%% used. This can be modified through the singlespacing, doublespacing
%% or draft class options.
%%
\newcommand{\doublespace}{%
\renewcommand{\baselinestretch}{1.66}\normalsize}
\newcommand{\oneandahalfspace}{%
\renewcommand{\baselinestretch}{1.33}\normalsize}
\newcommand{\singlespace}{%
\renewcommand{\baselinestretch}{1}\normalsize}
\ifthenelse{\boolean{draftthesis}}
{\AtBeginDocument{\singlespace}}% \SetPrinterDraft}
{\ifthenelse{\boolean{usesinglespacing}}
{\AtBeginDocument{\singlespace}%
\ifthenelse{\boolean{strict}}
{\PackageWarning{infthesis}{Single spacing is not permitted in the
regulations for PhD and MPhil theses}}
{}}
{\ifthenelse{\boolean{usedoublespacing}}
{\AtBeginDocument{\doublespace}}
{\AtBeginDocument{\oneandahalfspace}}
}
}
%%
%% We must ensure that the thesis ends on a lef-hand page. We
%% do the latter by issuing a \cleardoublepage at the end of document.
%% MEF: deleted this, there's no point -- it'll print the other side of that
%% page anyway!
%%
% \AtEndDocument{\cleardoublepage}
%%
%% A couple of commands for figures/captions
%%
\newcommand{\thesiscaption}[3][]{
\ifthenelse{\equal{#1}{}}
{\parbox{5in}{\caption{{\em #2\/}}\label{#3}}}
{\parbox{5in}{\caption[#1]{{\em #2\/}}\label{#3}}}
}
%%
%% Quotations are supposed to be in single-space, so we will
%% explicitly redefine the quotation env. to support this.
%% And introduce a quotetext env. which can add an attribution.
%%
\let\old@quote\quote
\let\old@endquote\endquote
\renewcommand{\quote}{\old@quote\singlespace\ifthenelse{\boolean{usequotemarks}}{``}{}}
\renewcommand{\endquote}{\ifthenelse{\boolean{usequotemarks}}{''}{}\old@endquote}
\let\old@quotation\quotation
\let\old@endquotation\endquotation
\renewcommand{\quotation}{\old@quotation\singlespace}
\renewcommand{\endquotation}{\old@endquotation}
% \renewenvironment{quote}
% {\old@quote\singlespace
% \ifthenelse{\boolean{usequotemarks}}{``}{}}
% {\ifthenelse{\boolean{usequotemarks}}{''}{}\end{quote}}
\newenvironment{iquote}
{\begin{quote}\it}
{\rm\end{quote}}
\newcommand{\quotationname}{}
\newenvironment{quotetext}[1]
{\renewcommand{\quotationname}{#1}\begin{iquote}\singlespace
\ifthenelse{\boolean{usequotemarks}}{``}{}\it}
{\ifthenelse{\boolean{usequotemarks}}{\rm''}{}
\hspace*{\fill}\nolinebreak[1]\hspace*{\fill}
\rm (\quotationname)\end{iquote}}
%%
%% Footnotes should also be single-spaced.
%%
\let\tmp@footnotetext=\@footnotetext
\renewcommand{\@footnotetext}[1]%
{{\singlespace\tmp@footnotetext{#1}}}
%% "preliminary" environment to control numbering of pages between title and
%% first chapter. This will only kick in if romanprepages is specificed (the
%% default).
%% Based on Francois Pitt's ut-thesis.cls from University of Toronto.
\newenvironment{preliminary}
{\ifthenelse{\boolean{romanpre}}%
{\pagestyle{plain}\pagenumbering{roman}}
{\pagestyle{empty}}}%
{\cleardoublepage%
\ifthenelse{\boolean{romanpre}}%
{\pagenumbering{arabic}}%
{}}
%%
%% Let's have a dedication page so I can thank my mummy.
%%
\newcommand{\dedication}[1]
{\vspace*{\fill}
\begin{center}#1\end{center}
\vspace*{\fill}}
%% A generic "frontmatter" environment, for use with abstract, dedication etc.
%% You specify the title of the environment and the font size to use (so that
%% both normal abstracts and those on the front page can be accommodated.)
\newenvironment{frontenv}[2]
{\vspace{1cm}
\begin{center}
\@chapterfont\bfseries \LARGE#1
\end{center}}
{\par\vfil}
%% You specify the abstract with the \abs command; it gets automatically
%% inserted into the document where appropriate (title page or first main
%% page.
\def\@abs{}
\renewcommand{\abstract}[1]{\gdef\@abs{#1}}
\newenvironment{mainabs}
{\begin{frontenv}{\abstractname}{\LARGE}}
{\end{frontenv}\newpage}
\newenvironment{frontabs}
{\begin{frontenv}{\abstractname}{\large}
\begin{quotation}\rm}
{\end{quotation}\end{frontenv}}
%%
%% Based upon the above abstract env., provide wrappers for
%% an acknowledgements and declation env.
%%
\newenvironment{acknowledgements}
{\renewcommand{\abstractname}{Acknowledgements}\begin{mainabs}}
{\end{mainabs}\renewcommand{\abstractname}{Abstract}}
\newenvironment{declaration}
{\renewcommand{\abstractname}{Declaration}\begin{mainabs}}
{\end{mainabs}\renewcommand{\abstractname}{Abstract}}
\newcommand{\standarddeclaration}{
\begin{declaration}
I declare that this thesis was composed by myself,
that the work contained herein is my own
except where explicitly stated otherwise in the text,
and that this work has not been submitted for any other degree or
professional qualification except as specified.\par
\vspace{1in}\raggedleft({\em \@author\/})
\end{declaration}
}
%%
%% Now let's look at the format for the title page of the
%% thesis. This is done by redefining \maketitle, and allowing
%% some extra input options: \submityear and \graduationdate
%%
\def\submityear#1{\gdef\@submityear{#1}}
\gdef\@submityear{\the\year}
\def\graduationdate#1{\gdef\@graduationdate{#1}}
\gdef\@graduationdate{}
%% If usedeptreport is specified, then none of the other funky options kick
%% in. If not, then if frontabs is specified then it is used; otherwise,
%% the logo is inserted if required. If the abstract is not put on the front
%% page, then \maketitle will also create the abstract page as the first page
%% of the actual document.
\ifthenelse{\boolean{usedeptreport}}{
\renewcommand{\maketitle}{
\begin{titlepage}
\addtolength{\oddsidemargin}{-0.75cm}
\begin{center}
\null\vskip 6.1cm
\begin{minipage}[t][7.6cm]{10.5cm}
\begin{center}
{\LARGE\bfseries \@chapterfont \@title \par
\ifthenelse{\boolean{draftthesis}}{\large \@draftmessage}{}
}\vfil
{\Large\itshape \@author \par}
\end{center}
\end{minipage}\\
{\large \@degreetext \par \@submityear \par}
\ifthenelse{\equal{\@graduationdate}{}}{}
{\vskip 1cm {\large \ttfamily (Graduation date: \@graduationdate)}}
\end{center}
\end{titlepage}\cleardoublepage
\begin{mainabs}\@abs\end{mainabs}
}}{\ifthenelse{\boolean{frontabs}}{
\ifthenelse{\boolean{strict}}
{\PackageWarning{infthesis}{The regulations for PhD and MPhil theses
do not permit the abstract on the front page}}
{}
\renewcommand{\maketitle}{
\begin{titlepage}\begin{center}
{\LARGE\bfseries \@chapterfont \@title \par
\ifthenelse{\boolean{draftthesis}}{\large (Draft Copy)}{}
}\vspace{3cm}
{\Large\itshape \@author \par}\vspace{3cm}
{\large \@degreetext \par \@submityear \par}
\vskip 1cm
\ifthenelse{\equal{\@graduationdate}{}}{}
{{\large \ttfamily (Graduation date: \@graduationdate)}}
\end{center}
\begin{frontabs}\@abs\end{frontabs}
\end{titlepage}
}}{
\renewcommand{\maketitle}{
\begin{titlepage}\begin{center}
\null\vfil\vskip 60\p@
{\LARGE\bfseries \@chapterfont \@title \par
\ifthenelse{\boolean{draftthesis}}{\large (Draft Copy)}{}
}\vfill
{\Large\itshape \@author \par}\vskip 1cm\vfill
\ifthenelse{\boolean{logo}}%
{\resizebox{30mm}{!}{\includeshield}\\\vfill}
{}
{\large \@degreetext \par \@submityear \par}
\vskip 1cm
\ifthenelse{\equal{\@graduationdate}{}}{}
{{\large \ttfamily (Graduation date: \@graduationdate)}}
\end{center}
\end{titlepage}\cleardoublepage
\begin{mainabs}\@abs\end{mainabs}
}}}
%% If requested, put the list of figures and list of tables into the table of
%% contents.
\ifthenelse{\boolean{ltoc}}
{\RequirePackage[nottoc,notbib]{tocbibind}}
{}
%% Use the "pslatex" fonts unless they told us not to
\ifthenelse{\boolean{timesfonts}}
{\RequirePackage{pslatex}}
{}
%% ALWAYS put the bibliography into the TOC.
%% Thanks to Peter Wilson <peter.r.wilson@boeing.com> for pointing me in the
%% right direction, and to Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>
%% and Michael J Downes <epsmjd@ams,org> for together coming up with this
%% solution.
%%
%% However the bibliography is defined, this will append the \addcontentsline
%% statement to it. Also, it will put the bibname into the page headers.
\AtBeginDocument{%
\expandafter\def\expandafter\thebibliography\expandafter
#\expandafter1\expandafter{\thebibliography{#1}%
{\addcontentsline{toc}{chapter}{\bibname}}
\markboth{\bibname}{\bibname}}}
%% Do what is requested with headings and captions... can't include these
%% packages above because sectsty won't work except from within report.cls
%% itself. Must save \@chapterfont because the front environments (abstract
%% etc) also need to use it.
\RequirePackage{sectsty,caption}
\ifthenelse{\boolean{sansheadings}}
{\allsectionsfont{\sffamily}
\renewcommand{\@chapterfont}{\sffamily}
\renewcommand{\captionfont}{\sffamily}
\renewcommand{\headfootstyle}{\normalsize\sffamily}}
{}
%% To make sure we get chapters aligned correctly, we set it here instead.
\chapterfont{\@chapterfont\@chapteralignment}
%%
%% EOF: infthesis.cls
%%
|