A document class for theses for the Clayton and Caulfield Schools of Information Technology

Monash University

David Squire and Dean Thompson

Date: 2005/10/18 15:30:00

1 Introduction

This file implements a document class suitable for theses presented in the Clayton and Caulfield Schools of Information Technology and Monash University. It may be suitable for publications at other universities with some modifications.

The cssethesis document class is based on book document class contained in the standard L^{A}TEX2e distribution. The basic functionality of book.cls is retained. A few routines from book have been redefined. Note that the default layout is for two-sided printing. Use the class option oneside if you want margins, headers and footers for single-sided printing.

cssethesis.dtx requires an additional L^{A}TEX2e package, setspace. Packages can be found on CTAN archive sites, and setspace.sty should have been included in this distribution (though you should probably leave it and use the version with your L^{A}TEX2e distribution, which is most likely more recent). setspace defines four new environments: singlespace, doublespace, onehalfspace, and spacing. Please refer to its documentation for more information. cssethesis.dtx also makes use of the standard L^{A}TEX2e packages geometry

and graphicx.

Also included with this distribution are the files for the harvard package, which provides a powerful citation scheme, and some associated bibliography style files. The combination of the harvard package and the dcu bibliography style is recommended (see example.tex). Note that the natbib package supports similar functionality, and is preferred by many.

cssethesis.dtx was originally based on utthesis.cls written by Dinesh Das. It also has origins in the wuthesis.dtx by Kevin S. Ruland of Sever Institute.

2 Docstrip Commands

This section of code is for docstrip. If L^{A}TEX is run with this file, cssethesis.dtx, as input, documented source code will be produced.

1 ⟨∗driver⟩

 2 \documentclass{ltxdoc}
 3 \usepackage{doc}                  % use the doc package
 4 \IndexPrologue{}                  % remove default index prologue

 5 \setcounter{IndexColumns}{2}      % two column index
 6 \EnableCrossrefs                  % make the command index
 7 \CodelineIndex                    %    by code line
 8 \CodelineNumbered                 % number the code lines
 9 % I really want the changelog to be one column.  So
10 % theglossary is redefined.
11 \makeatletter
12 \renewenvironment{theglossary}{%
13 \smallskip
14 \GlossaryParms
15 \let\item\@idxitem
16 \ignorespaces}{}
17 \makeatother
18 \RecordChanges                    % make the changelog
19 \begin{document}
20 \DocInput{cssethesis.dtx}
21 \end{document}

22 ⟨/driver⟩

3 Identification

Identify this package, and its contents to the user and latex.

23 % Actually not much of this code remains, but the copyright
24 % remains.
25 %*************************************************************
26 %** UT Austin Thesis Style File, version 2.0, January 1995
27 %**
28 %** Copyright (c) 1995 Dinesh Das.  All rights reserved.
29 %** This file is free and can be modified or distributed as
30 %**
31 %** (1) This copyright notice is kept intact on all modified
32 %**     copies.
33 %** (2) If this file is modified, the original file name must
34 %**     not be used.
35 %*************************************************************

36

37 \NeedsTeXFormat{LaTeX2e}
38 \ProvidesClass{cssethesis}[2005/10/18 v1.7 Monash Caulfield and Clayton Schools of Information Technology thesis class]

4 Declaration of Options

The pdflatex option allows the user to specify that they wish to compile their document using pdflatex. This means that the Adobe PDF file format must be used for included graphics, rather than Postscript. We need to know this so that we can pass the right option to the graphicx package.

39 \newif\if@pdflatex \@pdflatexfalse % Default is false
40 \DeclareOption{pdflatex}{\@pdflatextrue}

Intercept the openright and openany options. We want to be able to override them in the frontmatter.

41 \newif\if@wasopenright \@wasopenrighttrue % true is the default
42 \DeclareOption{openright}{\@wasopenrighttrue}

43 \DeclareOption{openany}{\@wasopenrightfalse}

The thesisdraft option is useful for printing draft copies of the thesis. It will print a time stamp in the header of every page.

44 \DeclareOption{thesisdraft}{%
45 \AtEndOfClass{% So it will override the definition given below
46 \let\ps@plain\@empty
47  \def\ps@plain{%
48  \let\@oddfoot\@empty\let\@evenfoot\@empty
49  \def\@oddfoot{\hfil\textsl{Draft of \timestamp}}%
50  \def\@evenfoot{\textsl{Draft of \timestamp}\hfil}%

51 }

52 \let\ps@headings\@empty
53  \def\ps@headings{%
54  \let\@oddfoot\@empty\let\@evenfoot\@empty
55  \def\@oddfoot{\hfil\textsl{Draft of \timestamp}}%
56  \def\@evenfoot{\textsl{Draft of \timestamp}\hfil}%

57 } 58 } 59 }

If printing on a PostScript printer thesispsdraft can be used to add a PostScript special draft message across the page. dr

60 \DeclareOption{thesispsdraft}{%
61 \AtEndOfClass{% So it will override the definition given below
62 \let\ps@plain\@empty
63  \def\ps@plain{%
64 \special{!userdict begin /bop-hook{gsave 70 270 translate
65  90 rotate /Times-Roman findfont 80 scalefont setfont
66  0 0 moveto 0.9 setgray (DRAFT) show grestore}def end}
67 % note: what follows here is, and should be identical to that for
68 % the thesis draft option above. There must be some way of making
69 % this happen automatically...
70  \let\@oddfoot\@empty\let\@evenfoot\@empty
71  \def\@oddfoot{\hfil\textsl{Draft of \timestamp}}%
72  \def\@evenfoot{\textsl{Draft of \timestamp}\hfil}%

73 }

74 \let\ps@headings\@empty
75  \def\ps@headings{%
76  \let\@oddfoot\@empty\let\@evenfoot\@empty
77  \def\@oddfoot{\hfil\textsl{Draft of \timestamp}}%
78  \def\@evenfoot{\textsl{Draft of \timestamp}\hfil}%

79 } 80 } 81 }

Either a phd thesis, masters, masters (minor) or honours thesis. Default is phd thesis. Note the different options for honours and degrees in Computing, Computer Science, Digital Systems, Software Engineering and Science. There are also options for different kinds of Masters theses.

82 \DeclareOption{phdthesis}{%
83 \ifx\undefined\thesistype
84 \newcommand{\thesisfulfillment}{for fulfillment}
85 \newcommand{\thesistype}{Thesis}
86 \newcommand{\thesisdegree}{Doctor of Philosophy}

 87 \newcommand{\thesisdegreeabbreviation}{PhD}
 88 \newcommand{\thesiscoursecode}{0190}
 89 \else
 90 \ClassError{cssethesis}{only one thesis type option may be
 91 specified}{}
 92 \fi

93 }

 94 \DeclareOption{mitthesis}{%
 95 \ifx\undefined\thesistype
 96 \newcommand{\thesisfulfillment}{for fulfillment}
 97 \newcommand{\thesistype}{Thesis}
 98 \newcommand{\thesisdegree}{Master of Information Technology (Research)}
 99 \newcommand{\thesisdegreeabbreviation}{MIT}
100 \newcommand{\thesiscoursecode}{1895}
101 \else
102 \ClassError{cssethesis}{only one thesis type option may be
103 specified}{}
104 \fi

105 }

106 \DeclareOption{mitminorthesis}{%
107 \ifx\undefined\thesistype
108 \newcommand{\thesisfulfillment}{in partial fulfillment}
109 \newcommand{\thesistype}{Minor Thesis}
110 \newcommand{\thesisdegree}{Master of Information Technology (Minor Thesis)}
111 \newcommand{\thesisdegreeabbreviation}{MIT}
112 \newcommand{\thesiscoursecode}{3316}
113 \else
114 \ClassError{cssethesis}{only one thesis type option may be
115 specified}{}
116 \fi

117 }

118 % This one is for people doing an MIT (Coursework) with a minor thesis
119 \DeclareOption{mitcourseworkthesis}{%
120 \ifx\undefined\thesistype
121 \newcommand{\thesisfulfillment}{in partial fulfillment}
122 \newcommand{\thesistype}{Minor Thesis}
123 \newcommand{\thesisdegree}{Master of Information Technology (Coursework)}
124 \newcommand{\thesisdegreeabbreviation}{MIT}
125 \newcommand{\thesiscoursecode}{2402}
126 \else
127 \ClassError{cssethesis}{only one thesis type option may be
128 specified}{}
129 \fi

130 }

131 \DeclareOption{mcsminorthesis}{%
132 \ifx\undefined\thesistype
133 \newcommand{\thesisfulfillment}{in partial fulfillment}
134 \newcommand{\thesistype}{Minor Thesis}
135 \newcommand{\thesisdegree}{Master of Computer Science (Minor Thesis)}
136 \newcommand{\thesisdegreeabbreviation}{MCS}
137 \newcommand{\thesiscoursecode}{3328}
138 \else
139 \ClassError{cssethesis}{only one thesis type option may be
140 specified}{}

141 \fi

142 }

143 \DeclareOption{mdcthesis}{%
144 \ifx\undefined\thesistype
145 \newcommand{\thesisfulfillment}{for fulfillment}
146 \newcommand{\thesistype}{Thesis}
147 \newcommand{\thesisdegree}{Master of Digital Communications}
148 \newcommand{\thesisdegreeabbreviation}{MDC}
149 \newcommand{\thesiscoursecode}{2406}
150 \else
151 \ClassError{cssethesis}{only one thesis type option may be
152 specified}{}
153 \fi

154 }

155 \DeclareOption{bcomphonoursthesis}{%
156 \ifx\undefined\thesistype
157 \newcommand{\thesisfulfillment}{in partial fulfillment}
158 \newcommand{\thesistype}{Thesis}
159 \newcommand{\thesisdegree}{Bachelor of Computing with Honours}
160 \newcommand{\thesisdegreeabbreviation}{BComp(Hons)}
161 \newcommand{\thesiscoursecode}{0194}
162 \else
163 \ClassError{cssethesis}{only one thesis type option may be
164 specified}{}
165 \fi

166 }

167 \DeclareOption{bcshonoursthesis}{%
168 \ifx\undefined\thesistype
169 \newcommand{\thesisfulfillment}{in partial fulfillment}
170 \newcommand{\thesistype}{Thesis}
171 \newcommand{\thesisdegree}{Bachelor of Computer Science with Honours}
172 \newcommand{\thesisdegreeabbreviation}{BCompSc(Hons)}
173 \newcommand{\thesiscoursecode}{1608}
174 \else
175 \ClassError{cssethesis}{only one thesis type option may be
176 specified}{}
177 \fi

178 }

179 \DeclareOption{bdshonoursthesis}{%
180 \ifx\undefined\thesistype
181 \newcommand{\thesisfulfillment}{in partial fulfillment}
182 \newcommand{\thesistype}{Thesis}
183 \newcommand{\thesisdegree}{Bachelor of Digital Systems with Honours}
184 \newcommand{\thesisdegreeabbreviation}{BDigSys(Hons)}
185 \newcommand{\thesiscoursecode}{1200}
186 \else
187 \ClassError{cssethesis}{only one thesis type option may be
188 specified}{}
189 \fi

190 }

191 \DeclareOption{bshonoursthesis}{%
192 \ifx\undefined\thesistype
193 \newcommand{\thesisfulfillment}{in partial fulfillment}
194 \newcommand{\thesistype}{Thesis}

195 \newcommand{\thesisdegree}{Bachelor of Science (Computer Science) with
196 Honours}
197 \newcommand{\thesisdegreeabbreviation}{BSc(Hons)}
198 \newcommand{\thesiscoursecode}{0051}
199 \else
200 \ClassError{cssethesis}{only one thesis type option may be
201 specified}{}
202 \fi

203 }

204 \DeclareOption{bsehonoursthesis}{%
205 \ifx\undefined\thesistype
206 \newcommand{\thesisfulfillment}{in partial fulfillment}
207 \newcommand{\thesistype}{Thesis}
208 \newcommand{\thesisdegree}{Bachelor of Software Engineering with
209 Honours}
210 \newcommand{\thesisdegreeabbreviation}{BSE(Hons)}
211 \newcommand{\thesiscoursecode}{2770}
212 \else
213 \ClassError{cssethesis}{only one thesis type option may be
214 specified}{}
215 \fi

216 } 217 %

The following two Masters degree types are being phased out. They are retained for historical accuracy.

218 %

219 \DeclareOption{mcompthesis}{%
220 \ifx\undefined\thesistype
221 \newcommand{\thesisfulfillment}{for fulfillment}
222 \newcommand{\thesistype}{Thesis}
223 \newcommand{\thesisdegree}{Master of Computing}
224 \newcommand{\thesisdegreeabbreviation}{MComp}
225 \newcommand{\thesiscoursecode}{}
226 \else
227 \ClassError{cssethesis}{only one thesis type option may be
228 specified}{}
229 \fi

230 }

231 \DeclareOption{mcompminorthesis}{%
232 \ifx\undefined\thesistype
233 \newcommand{\thesisfulfillment}{in partial fulfillment}
234 \newcommand{\thesistype}{Thesis}
235 \newcommand{\thesisdegree}{Master of Computing (Minor)}
236 \newcommand{\thesisdegreeabbreviation}{MComp}
237 \newcommand{\thesiscoursecode}{}
238 \else
239 \ClassError{cssethesis}{only one thesis type option may be
240 specified}{}
241 \fi

242 }

The nocoursecode option is used to suppress the printing of the course code after the name of the course.

244 \DeclareOption{nocoursecode}{%
245  \let\thesiscoursecode\@undefined

246 } 247 %

The litreview option is used to indicate that this is a literature review for the thesis, rather than the thesis itself. This changes the title, and also causes information such as the student ID, supervisors and email addresses to be shown. This is not yet fully supported.

248 %

249 \newif\if@litreview \@litreviewfalse
250 \DeclareOption{litreview}{%
251 \@litreviewtrue
252 \renewcommand{\thesistype}{Literature Review}

253 } 254 %

These do the obvious, that is switch spacing in the main body of text. Monash

 University requires either oneandhalfspace or doublespace. singlespace is

useful for drafts and doesn’t kill as many trees. If none is selected, the body will be set with singlespace spacing.

Each option executes the corresponding command from setspace at the \begin{document} command. Their execution must be delayed because setspace requires the macro \@normalsize to be defined. But the definition of \@normalsize (in book) is delayed until after the entire class is loaded.

255 \DeclareOption{singlespace}{\AtBeginDocument{\singlespacing}}
256 \DeclareOption{oneandhalfspace}{\AtBeginDocument{\onehalfspacing}}
257 \DeclareOption{doublespace}{\AtBeginDocument{\doublespacing}}

This option forces the first paragraph after section headings to be indented.

258 \DeclareOption{indentfirst}{\let\@afterindentfalse\@afterindenttrue
259  \@afterindenttrue}

Pass all other options to book.cls

260 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}

The default options are

261 \ExecuteOptions{oneandhalfspace}
262 \ProcessOptions

We need to load the base class book

263 \LoadClass{book}[1994/12/01]

Make sure that one of phdthesis, mitthesis, etc. is selected.

264 \ifx\undefined\thesistype
265 \ClassError{cssethesis}
266 {thesis type not specified. Please give a class option to specify the
267 thesis type}%
268 {Use, for example, \protect\documentclass[phdthesis]{cssethesis}.
269 Possibilities are: phdthesis, mitthesis, mitminorthesis,
270 mitcourseworkthesis, mcsminorthesis, mdcthesis, bcomphonoursthesis,
271 bcshonoursthesis, bdshonoursthesis, bshonoursthesis,bsehonoursthesis}
272 \fi

Load in the geometry package, setting up the page layout. This simplifies things greatly compared to trying to set all the lengths manually.

273 \RequirePackage[paper=a4paper,left=30mm,width=150mm,top=25mm,bottom=25mm]{geometry}

Load in the graphicx package. This package is used to load the image for the Monash Crest. Note that the default is to pass the dvips option—the user must give the pdflatex option to \documentclass if they want to use PDF figures.

274 \if@pdflatex
275 \RequirePackage[pdftex]{graphicx}
276 \else
277 \RequirePackage[dvips]{graphicx}
278 \fi

Load in setspace to control baseline spacing

279 \RequirePackage{setspace}

5 User Customization

This section shows the default settings for a mutitude of user changeable commands. These are used in setting the various pages of the thesis.

5.1 Should be set by the author

Each of the following should be customized by the author using commands of the form \thesisauthor{Ima B. Student}. The default values may be O.K. for some things.

280 \newcommand*{\thesisauthor}[1]{\gdef\@thesisauthor{#1}}
281 \newcommand*{\thesisauthorlastname}[1]{\gdef\@thesisauthorlastname{#1}}
282 \newcommand*{\thesisauthorpreviousdegrees}[1]{\gdef\@thesisauthorpreviousdegrees{#1}}
283 \newcommand*{\thesisauthorstudentid}[1]{\gdef\@thesisauthorstudentid{#1}}
284 \newcommand*{\thesisauthoremail}[1]{\gdef\@thesisauthoremail{#1}}
285 \newcommand*{\thesismonth}[1]{\gdef\@thesismonth{#1}}
286 \def\@thesismonth{\ifcase%
287 \month\or January%
288 \or February%
289 \or March%
290 \or April%
291 \or May%
292 \or June%
293 \or July%
294 \or August%
295 \or September%
296 \or October%
297 \or November%
298 \or December\fi} % use current month as default
299 \newcommand*{\thesisyear}[1]{\gdef\@thesisyear{#1}}
300 \def\@thesisyear{\number\year} % use current year as default
301 \newcommand*{\thesistitle}[1]{\gdef\@thesistitle{#1}}
302 \newcommand*{\thesissupervisor}[1]{\gdef\@thesissupervisor{#1}}
303 \newcommand*{\thesissupervisoremail}[1]{\gdef\@thesissupervisoremail{#1}}
304 \newcommand*{\thesisassocsupervisor}[1]{\gdef\@thesisassocsupervisor{#1}}
305 \newcommand*{\thesisassocsupervisoremail}[1]{\gdef\@thesisassocsupervisoremail{#1}}

306 %% Set up these ones with default values
307 \gdef\@thesisdepartment{Clayton School of Information Technology}
308 \newcommand*{\thesisdepartment}[1]{\gdef\@thesisdepartment{#1}}
309 \newcommand*{\thesisuniversity}[1]{\gdef\@thesisuniversity{#1}}
310 \def\@thesisuniversity{Monash University}
311 \newcommand*{\thesistypist}[1]{\gdef\@thesistypist{#1}}
312 \def\@thesistypist{the author}
313 \newcommand*{\thesisdedication}[1]{\gdef\@thesisdedication{#1}}

5.2 Need not be redefined

These commands are usually fine as is. They may be changed using \renewcommand if desired.

314 \newcommand{\thesisdefaultbaselinestretch}{1.5}
315 \newcommand{\thesistypetypesize}{\large}
316 \newcommand{\thesistitletypesize}{\Large}
317 \newcommand{\thesistitlebold}{\textbf{\thesistitletypesize\@thesistitle}}
318 \newcommand{\thesisstudenttypesize}{\large}
319 \newcommand{\thesisstudentbold}{\textbf{\thesisstudenttypesize \thesisstudent}}
320 \newcommand{\thesisdegreetypesize}{\large}
321 \newcommand{\thesistitlepagefont}{\fontsize{14}{14}\selectfont}
322 \newcommand{\thesiscopyrightholder}{\@thesisauthor}
323 \newcommand{\thesiscommittee}{Supervising Committee:}
324 \newcommand{\thesiscommitteesize}{5}
325 \newcommand{\thesisvitahead}{Vita}
326 \newcommand{\thesisvitaheadtypesize}{\huge\bfseries}
327 \newcommand{\thesisacknowledgmenthead}{Acknowledgments}
328 \newcommand{\thesisacknowledgmentsigname}{\@thesisauthor}
329 \newcommand{\thesisacknowledgmentsignametype}{\large}
330 \newcommand{\thesisacknowledgmentsigplace}%
331  {{\slshape
332  \@thesisuniversity \\
333  \@thesismonth\ \@thesisyear}}
334 \newcommand{\thesisstudent}{%
335 \ifx\undefined\@thesisauthorpreviousdegrees
336 \@thesisauthor
337 \else
338 \@thesisauthor, \@thesisauthorpreviousdegrees
339 \fi

340 }

These penalties eliminate widows, orphans (clubs), and pages ending in hyphens.

341 \widowpenalty =10000
342 \clubpenalty  =10000
343 \brokenpenalty=10000

6 Page styles and chapter openings

We like to use different page styles for the front matter and main text of the document. For the front matter, the page numbers should be at the bottom so we use the plain page style. For the main matter, we use the default headings style from book.cls. We also want “chapters” to be able to start on any page in the front matter, but only on righthand pages in the main matter (unless the user specifies the option openany).

\frontmatter
344 \renewcommand{\frontmatter}{%
345 \cleardoublepage
346 \@mainmatterfalse
347 \pagenumbering{roman}
348 % These line added (not in book.cls):
349 \@openrightfalse
350 \pagestyle{plain}}
\mainmatter
351 \renewcommand{\mainmatter}{%
352 \cleardoublepage
353 \@mainmattertrue
354 \pagenumbering{arabic}
355 % These lines added:
356 \if@wasopenright
357 \@openrighttrue % restore previous setting
358 \else
359 \@openrightfalse
360 \fi
361 \pagestyle{headings}}

7 Frontmatter

These commands typeset various pages in the front matter. Their order in this file is not the order in which they should appear in a thesis. Please refer to the sample document for proper order.

\thesisdedicationpage This is a simple command.
362 \newcommand{\thesisdedicationpage}{%
363  \strut \vfill
364  \begin{spacing}{1.5}
365  \begin{center}
366  \@thesisdedication
367  \end{center}
368  \end{spacing}
369  \vfill \strut
370  \newpage}

thesisacknowledgments Currently it sets the contents in single spacing, but in the future may be changeable.

371 \newenvironment{thesisacknowledgments}

372 {%

373  \chapter*{\thesisacknowledgmenthead
374  \@mkboth{\thesisacknowledgmenthead}
375  {\thesisacknowledgmenthead}}
376  \addcontentsline{toc}{chapter}{\thesisacknowledgmenthead}
377  \begin{spacing}{1.1}}
378  {\nopagebreak\end{spacing} \par\nopagebreak

379  \raggedleft
380  {\thesisacknowledgmentsignametype\thesisacknowledgmentsigname}
381  \\*[10mm]
382  \raggedright
383  \thesisacknowledgmentsigplace
384  \newpage}

\thesistitlepage Sets the title page.

385 \newcommand{\thesistitlepage}{%
386 \thispagestyle{empty}
387 \begin{spacing}{1.5}
388 \begin{center}
389 \thesistitlebold \\[4mm]
390 by \\[4mm]
391 \thesisstudentbold \\
392 \ifx\undefined\@thesisauthoremail
393 \relax
394 \else
395 \if@litreview
396 \vspace{-8pt}
397 \texttt{\@thesisauthoremail}\\
398 \fi
399 \fi
400 \vspace{8mm}
401 \begin{center}
402 \includegraphics[width=5cm]{MonashCrest}
403 \end{center}
404 \textbf{\thesistypetypesize \thesistype} \\
405 \if@litreview
406 \relax
407 \else
408 Submitted by \@thesisauthor \\
409 \thesisfulfillment\ of the Requirements %\\
410 for the Degree of \\
411 \fi
412 \ifx\undefined\thesiscoursecode
413 \textbf{\thesisdegreetypesize \thesisdegree} \\
414 \else
415 \textbf{\thesisdegreetypesize \thesisdegree\ (\thesiscoursecode)} \\
416 \fi
417 \vspace{12mm}
418 \ifx\undefined\@thesissupervisor
419 \ClassError{cssethesis}{a thesissupervisor must be defined when
420 the litreview option is used}{}
421 \else
422 Supervisor: \@thesissupervisor\\
423 \fi
424 \ifx\undefined\@thesisassocsupervisor
425 \relax
426 \else
427 Associate Supervisor: \@thesisassocsupervisor\\
428 \fi
429 \strut \vfill
430 \textbf{\Large \@thesisdepartment} \\

431 \textbf{\Large \@thesisuniversity} \\%[4mm]
432 \@thesismonth, \@thesisyear
433 \end{center}
434 \end{spacing}
435  \newpage}

\thesiscopyrightpage Creates the copyright page.

436 \newcommand{\thesiscopyrightpage}{%
437  \thispagestyle{empty}
438  \strut \vfill
439  \begin{center}
440  \begin{spacing}{2}
441  \copyright\ Copyright \\ by \\ \thesiscopyrightholder \\ \@thesisyear
442  \end{spacing}
443  \end{center}
444  \vfill \strut
445  \newpage}

thesisabstract The abstract environment. Will only typeset the abstract using 1.5 spacing.

446 \newenvironment{thesisabstract}{%
447  \newpage
448  \addcontentsline{toc}{chapter}{Abstract}
449  \setlength{\unitlength}{1mm}
450  \begin{center}
451  \begin{spacing}{1.5}
452  \thesistitlebold \\[7mm]
453  \end{spacing}
454  \begin{spacing}{1}
455  \@thesisauthor
456 \ifx\undefined\@thesisauthorpreviousdegrees

457 \\

458 \else
459 , \@thesisauthorpreviousdegrees \\
460 \fi
461 \ifx\undefined\@thesisauthoremail
462 \relax
463 \else
464 \texttt{\@thesisauthoremail}\\
465 \fi
466  \@thesisuniversity, \@thesisyear \\[7mm]
467  Supervisor: \@thesissupervisor \\
468 \ifx\undefined\@thesissupervisoremail
469 \relax
470 \else
471 \texttt{\@thesissupervisoremail}\\
472 \fi
473 \ifx\undefined\@thesisassocsupervisor
474 \relax
475 \else
476 Associate Supervisor: \@thesisassocsupervisor\\
477 \ifx\undefined\@thesisassocsupervisoremail
478 \relax
479 \else
480 \texttt{\@thesisassocsupervisoremail}\\

481 \fi
482 \fi
483 \vspace*{7mm}
484  \textbf{Abstract} \\
485  \end{spacing}
486  \end{center}
487  \vspace{5mm}
488  \noindent}
489  \newpage

\thesisdeclarationpage Sets the declaration page.

490 \newcommand{\thesisdeclarationpage}{%
491  \begin{center}
492  \begin{spacing}{1.5}
493  \thesistitlebold
494  \end{spacing}
495  \end{center}
496  \vspace{20mm}
497  \begin{center}
498  {\bf Declaration}
499  \end{center}
500  \begin{spacing}{1}
501  I declare that this thesis is my own work and has not been
502  submitted in any form for another degree or diploma at any university
503  or other institute of tertiary education.  Information derived from
504  the published and unpublished work of others has been acknowledged in
505  the text and a list of references is given.
506  \end{spacing}
507  \vspace{15mm}
508  \hfill \begin{minipage}{67mm}
509  \begin{spacing}{1}
510  \vspace{10mm}
511  \setlength{\unitlength}{1mm}
512  \begin{picture}(67,1)(0,0)
513  \line(1,0){67}
514  \end{picture} \\
515  \@thesisauthor \\
516  \today
517  \end{spacing}
518  \end{minipage}
519  \newpage}

\thesissignaturepage Sets the signature page.

520 \newcommand{\thesissignaturepage}{%
521  \begin{center}
522  \begin{spacing}{1.5}
523  \thesistitlebold
524  \end{spacing}
525  \end{center}
526  \vspace{20mm}
527  \begin{center}
528  {\bf \thesistype\ Acceptance}
529  \end{center}
530  \begin{spacing}{1}

531  This student's \thesistype, entitled
532  \textbf{\@thesistitle}
533  has been examined by the undersigned committee of
534  examiners and has received full approval for acceptance \thesisfulfillment\
535  of the requirements for the degree of \thesisdegree.
536  \end{spacing}

537

538  \vspace{15mm}
539  \hbox to \hsize{\hfill APPROVAL: \begin{minipage}[b]{67mm}
540  \setlength{\unitlength}{1mm}
541  \begin{picture}(67,-70)
542  \multiput(0,-2)(0,-10)
543  {\thesiscommitteesize}{\line(1,0){67}}
544  \end{picture}
545  \end{minipage} Chief Examiner}
546  \newpage}
\thesisshorttitlepage Sets the short title page
547 \newcommand{\thesisshorttitlepage}{%
548  \vbox to 4.1in{\vfil
549  \hbox to \hsize {Short Title: \thesisshorttitle \hfill
550  \@thesisauthorlastname, \thesisdegreeabbreviation\ \@thesisyear
551 % This little hack is to make it centered on the page.
552  \hspace{0.5in}}}
553  \newpage}

These are modified from L^{A}TEX2e book.cls so they make table of contents entries. They are also simplified by removing the two column and heading settings.

\listoffigures
554 \renewcommand{\listoffigures}{%
555 \chapter*{\listfigurename}%
556 \addcontentsline{toc}{chapter}{\listfigurename}%
557 \@starttoc{lof}

558 }

\listoftables
559 \renewcommand{\listoftables}{%
560 \chapter*{\listtablename}%
561 \addcontentsline{toc}{chapter}{\listtablename}%
562 \@starttoc{lot}

563 }

8 Mainmatter

We need to modify the listing of appendices in the toc. This does require a new conditional and changes to \appendix and \@chapter.

\if@appendix
564 \newif\if@appendix\@appendixfalse

\appendix
565 \renewcommand{\appendix}{\par
566 \setcounter{chapter}{0}%
567 \setcounter{section}{0}%
568 \renewcommand{\@chapapp}{\appendixname}%
569 \renewcommand{\thechapter}{\Alph{chapter}}
570 \@appendixtrue}
\@chapter
571 \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
572  \if@mainmatter
573  \refstepcounter{chapter}%
574  \typeout{\@chapapp\space\thechapter.}%
575  \if@appendix
576  \addcontentsline{toc}{chapter}%
577  {\appendixname\ \thechapter\ #1}%
578  \else
579  \addcontentsline{toc}{chapter}%
580  {\protect\numberline{\thechapter}#1}%
581  \fi
582  \else
583  \addcontentsline{toc}{chapter}{#1}%
584  \fi
585  \else
586  \addcontentsline{toc}{chapter}{#1}%
587  \fi
588  \chaptermark{#1}%
589  \addtocontents{lof}{\protect\addvspace{10\p@}}%
590  \addtocontents{lot}{\protect\addvspace{10\p@}}%
591  \if@twocolumn
592  \@topnewpage[\@makechapterhead{#2}]%
593  \else
594  \@makechapterhead{#2}%
595  \@afterheading
596  \fi}

\l@chapter Some changes to the toc entries are required. Every entry should be followed by a dot leader. In the book.cls, chapter entries are not followed by a dot leader. This code corrects that.

597 \renewcommand{\l@chapter}[2]{%
598 % Some older versions of LaTeX2e (older than Dec. 1994) define \l@chapter
599 % using \newcommand instead of \newcommand*.  If you have an error
600 % at this line, try removing the *.
601 \ifnum \c@tocdepth >\m@ne
602  \addpenalty{-\@highpenalty}%
603  \vskip 1.0em \@plus\p@
604  \setlength\@tempdima{1.5em}%
605  \begingroup
606  \parindent \z@ \rightskip \@pnumwidth
607  \parfillskip -\@pnumwidth
608  \leavevmode \bfseries
609  \advance\leftskip\@tempdima
610  \hskip -\leftskip
611  #1\nobreak%

612 % This line changed from \hfil
613  \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill
614  \nobreak\hbox to\@pnumwidth{\hss #2}\par
615  \penalty\@highpenalty
616  \endgroup
617 \fi}

9 Backmatter

thesisauthorvita This is really a stupid environment. All it does is enter a contents line, place the heading, and enter single spacing. The author must do all formatting for the page.

618 \newenvironment{thesisauthorvita}{%
619  \clearpage
620  \chapter*{\thesisvitahead
621  \@mkboth{\uppercase{\thesisvitahead}}
622  {\uppercase{\thesisvitahead}}}
623  \addcontentsline{toc}{chapter}{\thesisvitahead}
624  \begin{spacing}{\thesisdefaultbaselinestretch}}
625  {\end{spacing} \par \vspace{20mm}
626  \noindent Permanent Address:
627  \begin{minipage}[t]{90mm}
628 {\@thesisdepartment\\Monash University\\Australia}
629  \end{minipage}
630  \par \vspace{15mm}
631  \noindent This \lowercase\expandafter{\thesistype} was
632  typeset with \LaTeXe\footnote{\LaTeXe{} is an extension of \LaTeX.
633  \LaTeX{} is a collection of macros for \TeX.  \TeX{} is a
634  trademark of the American Mathematical Society.  The macros used in
635  formatting this \lowercase\expandafter{\thesistype} were written
636  by Glenn Maughan and modified by Dean Thompson and David Squire of Monash University.
637  } by \@thesistypist.}

thebibliography This hasn’t been changed much from book.cls. Only the addition of the \addcontentsline. In addition, the \bibname is changed to “References”.

638 \renewcommand{\bibname}{References}
639 % Updated in v1.5 using more recent code from book.cls, 2000/05/19 v1.4b.
640 \renewenvironment{thebibliography}[1]
641  {\chapter*{\bibname%
642 % This line added.
643  \addcontentsline{toc}{chapter}{\bibname}
644  \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}%
645  \list{\@biblabel{\@arabic\c@enumiv}}%
646  {\settowidth\labelwidth{\@biblabel{#1}}%
647  \leftmargin\labelwidth
648  \advance\leftmargin\labelsep
649  \@openbib@code
650  \usecounter{enumiv}%
651  \let\p@enumiv\@empty
652  \renewcommand\theenumiv{\@arabic\c@enumiv}}%
653  \sloppy
654  \clubpenalty4000
655  \@clubpenalty \clubpenalty

656  \widowpenalty4000%
657  \sfcode`\.\@m}
658  {\def\@noitemerr
659  {\@latex@warning{Empty `thebibliography' environment}}%
660  \endlist}

10 Utility Functions

\thesistime This one computes the current time for the thesisdraft option.

661 \newcount\hour \newcount\minute
662 \hour=\time  \divide \hour by 60
663 \minute=\time
664 \loop \ifnum \minute > 59 \advance \minute by -60 \repeat
665 \def\thesistime{\ifnum \hour<13 \number\hour:%
666  \ifnum \minute<10 0\fi
667  \number\minute
668  \ifnum \hour<12 \ am\else \ pm\fi
669  \else \advance \hour by -12 \number\hour:%
670  \ifnum \minute<10 0\fi
671  \number\minute \ pm\fi}
\timestamp
672 \def\timestamp{\thesistime, \today}

\@uppercase \@uppercase is simply short hand to convert the contents of a macro to uppercase. It may not work under all circumstances, but does it’s job for this style

673 \newcommand{\@uppercase}[1]{{\expandafter\uppercase\expandafter{#1}}}

\@separator \@separator will draw the rule used on both the title and abstract pages.

674 \newcommand\@separator{\vrule height.4pt depth0pt width3.5in}
\@numberword
675 \newcommand\@numberword[1]{\ifcase#1 zero\or one\or two\or three\or four\or five\or six\or seven\or eight\else nine\fi\relax}