| 1 |
% \iffalse meta comment |
| 2 |
% File: adfathesis.dtx |
| 3 |
% |
| 4 |
% ADFATHESIS.CLS by Stephen Harker, Dept. of Physics, ADFA: 12-JUN-94 |
| 5 |
% These macros are placed in the public domain. They may be freely |
| 6 |
% transmitted, reproduced, or modified. No rights are reserved. |
| 7 |
% |
| 8 |
% This is based on the Monash University version of SUTHESIS.STY called |
| 9 |
% MONTHESIS.STY by Tony McGrath, Dept. of Physics, Monash Uni: 5-NOV-87 |
| 10 |
% and the ADFATHESIS.STY that is/was on ccadfa.cc.adfa.oz.au |
| 11 |
% |
| 12 |
% PhD thesis style --- modifications to the REPORT class: |
| 13 |
% Style information from the `1993 Handbook' for the University College |
| 14 |
% known as the `Blue Book', see pages 168 to 170. Updated for 1997. |
| 15 |
% |
| 16 |
% This program is distributed in the hope that it will be useful, |
| 17 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 19 |
% |
| 20 |
% \fi |
| 21 |
% \CheckSum{1075} |
| 22 |
%% \CharacterTable |
| 23 |
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 24 |
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 25 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 26 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 27 |
%% Dollar \$ Percent \% Ampersand \& |
| 28 |
%% Acute accent \' Left paren \( Right paren \) |
| 29 |
%% Asterisk \* Plus \+ Comma \, |
| 30 |
%% Minus \- Point \. Solidus \/ |
| 31 |
%% Colon \: Semicolon \; Less than \< |
| 32 |
%% Equals \= Greater than \> Question mark \? |
| 33 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 34 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 35 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 36 |
%% Right brace \} Tilde \~} |
| 37 |
% |
| 38 |
% \iffalse |
| 39 |
%<package>\NeedsTeXFormat{LaTeX2e} |
| 40 |
%<package>\ProvidesClass{adfathesis} |
| 41 |
%<package> [2004/04/16 \space v2.50 \space ADFA thesis class] |
| 42 |
% |
| 43 |
%<*driver> |
| 44 |
\documentclass{ltxdoc} |
| 45 |
\title{The \texttt{adfathesis} class} |
| 46 |
\author{Stephen Harker} |
| 47 |
\date{Printed \today} |
| 48 |
\MakeShortVerb{\=} |
| 49 |
\MakeShortVerb{\"} |
| 50 |
\newcommand{\bs}{\char '134 } % A backslash character for \tt font |
| 51 |
\begin{document} |
| 52 |
\maketitle |
| 53 |
\DeleteShortVerb{\|} |
| 54 |
\DocInput{adfathesis.dtx} |
| 55 |
\end{document} |
| 56 |
%</driver> |
| 57 |
% \fi |
| 58 |
% |
| 59 |
% \begin{abstract} |
| 60 |
% This article describes the \textsf{adfathesis} class, which is designed as |
| 61 |
% the ADFA |
| 62 |
% PhD thesis style --- a modification to the \textsf{report} class: |
| 63 |
% Style information from the `1993 Handbook' for the University College |
| 64 |
% known as the `Blue Book', see pages 168 to 170. Updated for 1997. |
| 65 |
% This version is modified only to use the \textsf{docstrip} mechanism. |
| 66 |
% \end{abstract} |
| 67 |
% |
| 68 |
% \section{Introduction} |
| 69 |
% |
| 70 |
% The adfathesis class is based on the Monash University version of |
| 71 |
% \textsf{suthesis.sty} called |
| 72 |
% \textsf{monthesis.sty} by Tony McGrath, Dept. of Physics, Monash Uni: 5-NOV-87 |
| 73 |
% and the \textsf{adfathesis.sty} that is/was on ccadfa.cc.adfa.oz.au. |
| 74 |
% |
| 75 |
% Some basic information on |
| 76 |
% the use of \textsf{adfathesis} follows. This class file can only be used |
| 77 |
% under \LaTeXe. Firstly an example of use: |
| 78 |
|
| 79 |
% \begin{quote} |
| 80 |
% \small |
| 81 |
% \begin{verbatim} |
| 82 |
% \documentclass[a4paper,12pt,openright,twoside]{adfathesis} |
| 83 |
|
| 84 |
% % Control which chapters are LaTeX'd in this run with |
| 85 |
|
| 86 |
% \includeonly{chapter1,chapter2,chapter3} |
| 87 |
|
| 88 |
% \title{How to Write Theses\\ |
| 89 |
% With Two Line Titles} |
| 90 |
% \authornameonly{John Henry Candidate} |
| 91 |
% \author{\Authornameonly \\ B.Sc.(Hons)} |
| 92 |
% \copyrightfalse % No copyright page |
| 93 |
% \figurespagefalse % No List of Figures |
| 94 |
% \tablespagefalse % No List of Tables |
| 95 |
|
| 96 |
% \begin{document} |
| 97 |
% \beforepreface |
| 98 |
% \prefacesection{Abstract} |
| 99 |
% This thesis tells you all you need to know about... |
| 100 |
% \declaration % Declaration page |
| 101 |
% \prefacesection{Acknowledgements} |
| 102 |
% I would like to thank... |
| 103 |
% \afterpreface |
| 104 |
|
| 105 |
% \include{chapter1} % Introduction |
| 106 |
% ... |
| 107 |
% \include{chapter6} % Conclusions |
| 108 |
% ... |
| 109 |
% \appendix |
| 110 |
% \include{appendix1} % A Long Proof |
| 111 |
% ... |
| 112 |
% \clearpage % Needed to get page |
| 113 |
% \addcontentsline{toc}{chapter}{References} % in TOC correct. |
| 114 |
% \bibliographystyle{adfathesis} |
| 115 |
% \bibliography{mybib} |
| 116 |
% \end{document} |
| 117 |
% \end{verbatim} |
| 118 |
% \end{quote} |
| 119 |
|
| 120 |
% \section{Documentation:} |
| 121 |
% This class modifies the standard report class |
| 122 |
% to meet the \textsc{adfa} requirements given in the `\emph{University |
| 123 |
% College Handbook}'. It sets the margins, interline spacing, the |
| 124 |
% figure and table numbering style, and disallows page breaks at |
| 125 |
% hyphens. |
| 126 |
|
| 127 |
% The `\texttt{\bs{}beforepreface}' command creates the title page, a |
| 128 |
% copyright page (optionally), and the table of contents. Then the user |
| 129 |
% should put preface section(s), using the command |
| 130 |
% `\texttt{\bs{}prefacesection\{}\emph{Section Title}\texttt{\}}', this |
| 131 |
% should include the declaration page. The tables of tables and figures |
| 132 |
% are then produced by the `\texttt{\bs{}afterpreface}' command, which |
| 133 |
% also sets things up to start the main body (on arabic page~1). |
| 134 |
|
| 135 |
% The following commands can control what goes in the front matter |
| 136 |
% material: |
| 137 |
% \begin{description} |
| 138 |
% \small |
| 139 |
% \item{\ttfamily\bs{}title\{\emph{thesis title}\}} Title of the thesis. |
| 140 |
% \item{\ttfamily\bs{}authornameonly\{\emph{name}\}} The author's name |
| 141 |
% without degrees earned, needed for the declaration. |
| 142 |
% \item{\ttfamily\bs{}author\{\emph{name}\}} The author's name with |
| 143 |
% degrees earned, for the titlepage. |
| 144 |
% \item{\ttfamily\bs{}dept\{\emph{department}\}} The default value is |
| 145 |
% School of `\emph{Physics}'. |
| 146 |
% \item{\ttfamily\bs{}thesistype\{\emph{Type of thesis}\}} The default |
| 147 |
% value is `\emph{Doctor of Philosophy}', for an Honours report this should |
| 148 |
% be the faculty (e.g.\ `\emph{Science}'). |
| 149 |
% \item{\ttfamily\bs{}degreetype\{\emph{Faculty for degree}\}} The default |
| 150 |
% value is `\emph{Science}', used for Honours only. |
| 151 |
% \item{\ttfamily\bs{}submitdate\{\emph{date}\}} Month and year in which |
| 152 |
% submitted; date \LaTeX{}'d if omitted. |
| 153 |
% \item{\ttfamily\bs{}copyrightyear\{\emph{year}\}} Year degree |
| 154 |
% conferred, or year \LaTeX{}'d if omitted (next year if in December). |
| 155 |
% \item{\ttfamily\bs{}declaration} Produce the required declaration that |
| 156 |
% the thesis is all the author's own work. |
| 157 |
% \item{\ttfamily\bs{}copyrighttrue} Produce or |
| 158 |
% \texttt{\bs{}copyrightfalse} don't produce a `\emph{copyright}' page |
| 159 |
% (true by default). |
| 160 |
% \item{\ttfamily\bs{}figurespagetrue} Produce or |
| 161 |
% \texttt{\bs{}figurespagefalse} don't produce a `\emph{List of |
| 162 |
% Figures}' page (true by default). |
| 163 |
% \item{\ttfamily\bs{}tablespagetrue} Produce or |
| 164 |
% \texttt{\bs{}tablespagefalse} don't produce a `\emph{List of |
| 165 |
% Tables}' page (true by default). |
| 166 |
% \end{description} |
| 167 |
|
| 168 |
% This class uses space and a half interline spacing, except in |
| 169 |
% footnote, figure and table environments where normal spacing is used. |
| 170 |
% The command: `\texttt{\bs{}linespread\}\-\{1.655\}}' can be used to |
| 171 |
% change this (use whatever you want instead of 1.655). For 12 point |
| 172 |
% Computer Modern fonts 1.241 corresponds to space and a half, and 1.655 |
| 173 |
% to double spacing. This command should be given in the preamble |
| 174 |
% (i.e.\ before the `\texttt{\bs{}begin\{document\}}'). |
| 175 |
|
| 176 |
% The example given shows the \textsf{12pt} option being used. This is |
| 177 |
% required by the 1997 handbook, but may be omitted (at your own risk) |
| 178 |
% to get smaller print. There are three options which may be declared |
| 179 |
% in \texttt{\bs{}documentclass[a4paper,12pt]\{adfathesis\}}: |
| 180 |
% \begin{itemize} |
| 181 |
% \item \texttt{draft} which changes the pagestyle to include the date |
| 182 |
% on the page header. |
| 183 |
% \item \texttt{normalbib} which stops the document using the |
| 184 |
% \textsf{Harvard} style, and hence allows use of either the standard |
| 185 |
% \LaTeX\ bibliography style or an alternative package. The supplied |
| 186 |
% \textsf{adfathesis.bst} may not be appropriate in this case. so you |
| 187 |
% could use an alternative such as \textsf{plain.bst}. |
| 188 |
% \item \textsf{honours} which changes the titlepage to one more |
| 189 |
% appropriate to an Honours report. |
| 190 |
% \end{itemize} |
| 191 |
|
| 192 |
% To get the correct page number for the bibliography in the table of |
| 193 |
% contents you need to put a `\texttt{\bs{}clearpage}' command before |
| 194 |
% the `\texttt{\bs{}addcontentsline}' command. The thickness of the |
| 195 |
% rules used for the chapter headings is controlled by |
| 196 |
% `\texttt{\bs{}chaprule}' and can be set to another value, say 0~pt, by |
| 197 |
% the command `\texttt{\bs{}setlength\{\bs{}chaprule\}\{0pt\}}' in the |
| 198 |
% preamble. There is a maximum value of 6~pt for |
| 199 |
% `\texttt{\bs{}chaprule}'. |
| 200 |
% |
| 201 |
% \StopEventually |
| 202 |
% |
| 203 |
% \section{The code\label{code}} |
| 204 |
% The current version is defined at the top of the file looking |
| 205 |
% something like this |
| 206 |
% \begin{macrocode} |
| 207 |
%<*package> |
| 208 |
%\NeedsTeXFormat{LaTeX2e} |
| 209 |
%\ProvidesPackage{adfathesis} |
| 210 |
% [\filedate\space version\fileversion] |
| 211 |
% \end{macrocode} |
| 212 |
% |
| 213 |
% First we set up some new flags: |
| 214 |
% A new flag for draft printing, |
| 215 |
% at this stage all I do is reset the page style. |
| 216 |
% This is not true by default, must be changed in the thesis BASE file |
| 217 |
% A new flag whether to use the Harvard bib package? |
| 218 |
% This is true by default, must be changed in the thesis BASE file |
| 219 |
% A new flage whether a Honours report rather than PhD or Masters thesis? |
| 220 |
% This is not true by default, must be changed in the thesis BASE file |
| 221 |
% \begin{macrocode} |
| 222 |
\newif\ifATdr@ft |
| 223 |
\ATdr@ftfalse |
| 224 |
\newif\ifAT@harvbib |
| 225 |
\AT@harvbibtrue |
| 226 |
\newif\ifATh@nours |
| 227 |
\ATh@noursfalse |
| 228 |
% \end{macrocode} |
| 229 |
% |
| 230 |
% Now we define the default values for the flags, and |
| 231 |
% make 12 point text the default. |
| 232 |
% |
| 233 |
% \begin{macrocode} |
| 234 |
\newcommand{\ptsize}{} |
| 235 |
\DeclareOption{draft} |
| 236 |
{\ATdr@fttrue |
| 237 |
\PassOptionsToClass{draft}{report}} |
| 238 |
\DeclareOption{normalbib} |
| 239 |
{\AT@harvbibfalse} |
| 240 |
\DeclareOption{harvard} |
| 241 |
{\AT@harvbibtrue} |
| 242 |
\DeclareOption{honours} |
| 243 |
{\ATh@nourstrue} |
| 244 |
\DeclareOption{10pt}{\renewcommand{\ptsize}{10pt}} |
| 245 |
\DeclareOption{11pt}{\renewcommand{\ptsize}{11pt}} |
| 246 |
\DeclareOption{12pt}{\renewcommand{\ptsize}{12pt}} |
| 247 |
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}} |
| 248 |
\ExecuteOptions{12pt} |
| 249 |
% \end{macrocode} |
| 250 |
% Now process the options and load the standard report class. We merely |
| 251 |
% make modifications to the report classs. |
| 252 |
% |
| 253 |
% \begin{macrocode} |
| 254 |
\ProcessOptions\relax |
| 255 |
\LoadClass[a4paper,\ptsize]{report} |
| 256 |
\ifAT@harvbib\IfFileExists{harvard.sty}{\RequirePackage{harvard}}% |
| 257 |
{\ClassError{\filename}{% |
| 258 |
The Harvard package was not found.}{% |
| 259 |
The Harvard package controls the bibliography appearance. \MessageBreak |
| 260 |
\space It is used by default unless you specify the normalbib option. \MessageBreak |
| 261 |
\space The Harvard package can be obtained from, e.g., ctan.unsw.edu.au |
| 262 |
}}\fi |
| 263 |
% \end{macrocode} |
| 264 |
% From the Blue book we find the following regulations: |
| 265 |
% The size of the paper shall approximate A4 (297mm x 210 mm). |
| 266 |
% The margins on each sheet shall be not less than 40mm on the left |
| 267 |
% hand side, 20mm on the right hand side, 30mm at the top and 20mm at |
| 268 |
% the bottom. |
| 269 |
% \TeX\ has default margins of 1 inch (25.4mm) at the top and left. |
| 270 |
% |
| 271 |
% Use the code from \textsf{size12.clo} to set \verb|\textheight| to an integer |
| 272 |
% multiple of \verb|\baselineskip|s. Use \verb|\raggedbottom| and add one |
| 273 |
% \verb|\baselineskip| to \verb|\topskip| to allow pagelength to vary. |
| 274 |
% \begin{macrocode} |
| 275 |
\setlength{\oddsidemargin} {1.5cm} |
| 276 |
\setlength{\evensidemargin} {-0.5cm} |
| 277 |
\setlength{\marginparwidth} {40\p@} |
| 278 |
\setlength{\marginparsep} {10\p@} |
| 279 |
\setlength{\topmargin} {-0.6cm} |
| 280 |
\setlength{\headheight} {15\p@} |
| 281 |
\setlength{\headsep} {0.5cm} |
| 282 |
\setlength{\textwidth} {14.9cm} |
| 283 |
\setlength\@tempdima{\paperheight} |
| 284 |
\addtolength\@tempdima{-30mm} |
| 285 |
\addtolength\@tempdima{-20mm} |
| 286 |
\divide\@tempdima\baselineskip |
| 287 |
\@tempcnta=\@tempdima |
| 288 |
\setlength\textheight{\@tempcnta\baselineskip} |
| 289 |
\addtolength\textheight{\topskip} |
| 290 |
\setlength{\topskip}{1\topskip \@plus 1\baselineskip} |
| 291 |
\setlength{\parskip}{0pt} |
| 292 |
\raggedbottom |
| 293 |
% \end{macrocode} |
| 294 |
% |
| 295 |
% Set spacing for space and a half, using values from setspace.sty. |
| 296 |
% Use the new \verb|\linespread| command rather than |
| 297 |
% \verb|\renewcommand{\baselinestretch}{1.25}| etc. |
| 298 |
% \begin{macrocode} |
| 299 |
\ifcase \@ptsize \relax % 10pt |
| 300 |
\linespread{1.25}% |
| 301 |
\or % 11pt |
| 302 |
\linespread{1.213}% |
| 303 |
\or % 12pt |
| 304 |
\linespread{1.241}% |
| 305 |
\fi |
| 306 |
% \end{macrocode} |
| 307 |
% |
| 308 |
% Next two sections taken from \textsf{setspace}. |
| 309 |
% \begin{macrocode} |
| 310 |
\newcommand{\displayskipstretch}{\baselinestretch} |
| 311 |
\newcommand{\setdisplayskipstretch}[1]{\renewcommand{\displayskipstretch}{#1}} |
| 312 |
% \end{macrocode} |
| 313 |
% |
| 314 |
% Fix up spacing before and after displayed math |
| 315 |
% (\verb|arraystretch| seems to do a fine job for inside LaTeX |
| 316 |
% displayed math, |
| 317 |
% since \verb|array| and \verb|eqnarray| seem to be affected as expected). |
| 318 |
% Changing \verb|\baselinestretch| and doing a font change also works |
| 319 |
% if done here, |
| 320 |
% but then you have to change \verb|@setsize| to remove the call to |
| 321 |
% \verb|@nomath|). |
| 322 |
% |
| 323 |
% \begin{macrocode} |
| 324 |
\everydisplay\expandafter{% |
| 325 |
\the\everydisplay |
| 326 |
\abovedisplayskip \displayskipstretch\abovedisplayskip |
| 327 |
\belowdisplayskip \displayskipstretch\belowdisplayskip |
| 328 |
\abovedisplayshortskip \displayskipstretch\abovedisplayshortskip |
| 329 |
\belowdisplayshortskip \displayskipstretch\belowdisplayshortskip |
| 330 |
} |
| 331 |
% \end{macrocode} |
| 332 |
% |
| 333 |
% The Following changed by Stephen Harker, October 1993 to:% |
| 334 |
% \begin{itemize} |
| 335 |
% \item Make Chapter title centred, and modify size to \verb|\Large| not |
| 336 |
% \verb|\Huge|, use small caps for `chapter' and rules above and |
| 337 |
% below. Rule thickness defined by new length \verb|\chaprule|. |
| 338 |
% To change this use \verb|\setlength|. |
| 339 |
% The value is forced to be less than 6 points below! |
| 340 |
% \item Make corresponding reductions to size of section, |
| 341 |
% subsection and subsubsection headers. |
| 342 |
% \item Rename Bibliography section to References. |
| 343 |
% \end{itemize} |
| 344 |
% \begin{macrocode} |
| 345 |
\newlength{\chaprule} |
| 346 |
\newlength{\ATchapskip} |
| 347 |
\setlength{\chaprule}{0.4\p@} |
| 348 |
\setlength{\ATchapskip}{10\p@} |
| 349 |
\advance \ATchapskip by -1\chaprule |
| 350 |
\renewcommand{\@makechapterhead}[1]{% |
| 351 |
\ifdim\chaprule>6\p@ \setlength{\chaprule}{6\p@}\fi |
| 352 |
\vspace*{\ATchapskip}% |
| 353 |
\noindent\rule{\textwidth}{\chaprule}\par% |
| 354 |
\vskip 10\p@ |
| 355 |
{\parindent \z@ \centering \normalfont |
| 356 |
\ifnum \c@secnumdepth >\m@ne |
| 357 |
{\Large\scshape \@chapapp\space \thechapter} |
| 358 |
\par\nobreak |
| 359 |
\vskip 8\p@ |
| 360 |
\fi |
| 361 |
\interlinepenalty\@M |
| 362 |
\Large #1\par\nobreak |
| 363 |
\vskip 10\p@ |
| 364 |
\noindent\rule{\textwidth}{\chaprule}\par% |
| 365 |
\vskip\ATchapskip |
| 366 |
}} |
| 367 |
\renewcommand{\@makeschapterhead}[1]{% |
| 368 |
\ifdim\chaprule>6\p@ \setlength{\chaprule}{6\p@}\fi |
| 369 |
\vspace*{\ATchapskip}% |
| 370 |
\noindent\rule{\textwidth}{\chaprule}\par% |
| 371 |
\vskip 10\p@ |
| 372 |
{\parindent \z@ \centering |
| 373 |
\normalfont |
| 374 |
\interlinepenalty\@M |
| 375 |
\Large #1\par\nobreak |
| 376 |
\vskip 10\p@ |
| 377 |
\noindent\rule{\textwidth}{\chaprule}\par% |
| 378 |
\vskip\ATchapskip |
| 379 |
}} |
| 380 |
|
| 381 |
\renewcommand{\section}{\@startsection{section}{1}{\z@}% |
| 382 |
{-1.5ex \@plus-1ex \@minus -.2ex}{0.8ex \@plus.2ex}% |
| 383 |
{\normalfont\large\raggedright}} |
| 384 |
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}% |
| 385 |
{-1.2ex \@plus -.5ex \@minus-.2ex}{0.5ex \@plus.1ex}% |
| 386 |
{\normalfont\normalsize\itshape\raggedright}} |
| 387 |
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}% |
| 388 |
{-1.0ex\@plus -.5ex \@minus -.2ex}{0.3ex \@plus .1ex}% |
| 389 |
{\normalfont\normalsize\itshape\raggedright}} |
| 390 |
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% |
| 391 |
{1.0ex \@plus.5ex \@minus.2ex}{-1em}% |
| 392 |
{\normalfont\normalsize\itshape\raggedright}} |
| 393 |
\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\parindent}% |
| 394 |
{1.0ex \@plus.5ex \@minus .2ex}{-1em}% |
| 395 |
{\normalfont\normalsize\itshape\raggedright}} |
| 396 |
|
| 397 |
\renewcommand{\bibname}{References} |
| 398 |
% \end{macrocode} |
| 399 |
% |
| 400 |
% The following is taken from \textsf{sober.sty}, Nico Poppelier and |
| 401 |
% \textsf{rapport1.cls} (NTG classes). |
| 402 |
% Makes list (\texttt{enumerate} and \texttt{itemize}) more reasonable |
| 403 |
% in vertical space, |
| 404 |
% by adjusting the spacing between items. |
| 405 |
% Unfortunately in the \verb|size*.clo| files \verb|\small| etc also |
| 406 |
% redefine these |
| 407 |
% values. We could redefine \verb|\small| etc, but they are size dependent! |
| 408 |
% Leave alone, since \verb|\small| is not usually used as an environment, at |
| 409 |
% least not for large sections of a document. |
| 410 |
% \begin{macrocode} |
| 411 |
\def\@listi{\leftmargin\leftmargini |
| 412 |
\labelsep .5em% |
| 413 |
\labelwidth\leftmargini |
| 414 |
\advance\labelwidth-\labelsep |
| 415 |
\parsep \z@ |
| 416 |
\topsep 0.4ex \@plus\p@ |
| 417 |
\itemsep 0\p@ \@plus1\p@} |
| 418 |
\let\@listI\@listi |
| 419 |
\@listi |
| 420 |
\def\@listii{\leftmargin\leftmarginii |
| 421 |
\labelsep .5em% |
| 422 |
\labelwidth\leftmarginii |
| 423 |
\advance\labelwidth-\labelsep |
| 424 |
\topsep 0\p@ \@plus\p@ |
| 425 |
\parsep \z@ \@plus\p@ |
| 426 |
\itemsep \parsep} |
| 427 |
\def\@listiii{\leftmargin\leftmarginiii |
| 428 |
\labelsep .5em% |
| 429 |
\labelwidth\leftmarginiii |
| 430 |
\advance\labelwidth-\labelsep |
| 431 |
\topsep 0\p@ \@plus\p@ |
| 432 |
\parsep \z@ |
| 433 |
\partopsep \z@ \@plus\p@ |
| 434 |
\itemsep \topsep} |
| 435 |
\def\@listiv{\leftmargin\leftmarginiv |
| 436 |
\labelsep .5em% |
| 437 |
\labelwidth\leftmarginiv |
| 438 |
\advance\labelwidth-\labelsep |
| 439 |
\topsep 0\p@ \@plus\p@ |
| 440 |
\parsep \z@ |
| 441 |
\partopsep \z@ \@plus\p@ |
| 442 |
\itemsep \topsep} |
| 443 |
\def\@listv{\leftmargin\leftmarginv |
| 444 |
\labelsep .5em% |
| 445 |
\labelwidth\leftmarginv |
| 446 |
\advance\labelwidth-\labelsep% |
| 447 |
\topsep 0\p@ \@plus\p@ |
| 448 |
\parsep \z@ |
| 449 |
\itemsep \z@ \@plus\p@} |
| 450 |
\def\@listvi{\leftmargin\leftmarginvi |
| 451 |
\labelsep .5em |
| 452 |
\labelwidth\leftmarginvi |
| 453 |
\advance\labelwidth{-\labelsep}% |
| 454 |
\topsep 0\p@ \@plus\p@ |
| 455 |
\parsep \z@ |
| 456 |
\itemsep \z@ \@plus\p@} |
| 457 |
% \end{macrocode} |
| 458 |
% |
| 459 |
% Next re-define \verb|\cleardoublepage| as recommended by Piet van |
| 460 |
% Oostrum in the |
| 461 |
% documentation for \textsf{fancyhdr.sty} page 15. This is to avoid |
| 462 |
% blank pages having headers or footers. |
| 463 |
% \begin{macrocode} |
| 464 |
\renewcommand{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else |
| 465 |
\thispagestyle{empty} |
| 466 |
\hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi} |
| 467 |
% \end{macrocode} |
| 468 |
% |
| 469 |
% Reduce widow/orphan problems, mainly from a posting from Donald |
| 470 |
% Arsenau on \texttt{comp.text.tex}, 24 Sep 1995. |
| 471 |
% Updated to follow comments from Michael Downes on \texttt{comp.text.tex}, |
| 472 |
% 31 Aug 1998. |
| 473 |
% \begin{macrocode} |
| 474 |
\doublehyphendemerits=10000 % No consecutive line hyphens. |
| 475 |
\brokenpenalty=4991 % Reduce broken words across columns/pages. |
| 476 |
\widowpenalty=9999 % Almost no widows at bottom of page. |
| 477 |
\clubpenalty=9996 % Almost no orphans at top of page. |
| 478 |
\interfootnotelinepenalty=9999 % Almost never break footnotes. |
| 479 |
\predisplaypenalty=10000 % Default value |
| 480 |
\postdisplaypenalty=1549 % Few breaks between display and widows |
| 481 |
\displaywidowpenalty=1602 % At least as high as \postdisplaypenalty |
| 482 |
% \end{macrocode} |
| 483 |
% |
| 484 |
% Change float placement parameters to reduce problems. Based on |
| 485 |
% values posted by Donald Arsenau on \texttt{comp.text.tex} at various times. |
| 486 |
% See in particular 17th Nov 1997. |
| 487 |
% \begin{macrocode} |
| 488 |
\renewcommand{\topfraction}{.85} |
| 489 |
\renewcommand{\bottomfraction}{.7} |
| 490 |
\renewcommand{\textfraction}{.15} |
| 491 |
\renewcommand{\floatpagefraction}{.66} |
| 492 |
\renewcommand{\dbltopfraction}{.66} |
| 493 |
\renewcommand{\dblfloatpagefraction}{.66} |
| 494 |
\setcounter{topnumber}{9} |
| 495 |
\setcounter{bottomnumber}{9} |
| 496 |
\setcounter{totalnumber}{20} |
| 497 |
\setcounter{dbltopnumber}{9} |
| 498 |
% \end{macrocode} |
| 499 |
% |
| 500 |
% Make tables and figures default to small text and be single spaced, |
| 501 |
% and modify caption macro to allow this to take effect in the caption. |
| 502 |
% Use this version rather than previous redefinition of |
| 503 |
% \verb|\@xfloat|, see |
| 504 |
% \textsf{setspace.sty} for an improved example of the latter. |
| 505 |
% From \texttt{comp.text.tex}, Donald Arsenau 25 July 1996. |
| 506 |
% Also reverse \verb|\abovecaptionskip| and \verb|\belowcaptionskip| |
| 507 |
% for tables. |
| 508 |
% \begin{macrocode} |
| 509 |
\renewenvironment{table} |
| 510 |
{\setlength{\abovecaptionskip}{0\p@} |
| 511 |
\setlength{\belowcaptionskip}{10\p@} |
| 512 |
\linespread{1}\normalfont\small\@float{table}} |
| 513 |
{\end@float} |
| 514 |
\renewenvironment{table*} |
| 515 |
{\setlength{\abovecaptionskip}{0\p@} |
| 516 |
\setlength{\belowcaptionskip}{10\p@} |
| 517 |
\linespread{1}\normalfont\small\@dblfloat{table}} |
| 518 |
{\end@dblfloat} |
| 519 |
\renewenvironment{figure} |
| 520 |
{\linespread{1}\normalfont\small\@float{figure}} |
| 521 |
{\end@float} |
| 522 |
\renewenvironment{figure*} |
| 523 |
{\linespread{1}\normalfont\small\@dblfloat{figure}} |
| 524 |
{\end@dblfloat} |
| 525 |
\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname |
| 526 |
ext@#1\endcsname}{#1}{\protect\numberline{\csname |
| 527 |
the#1\endcsname}{\ignorespaces #2}}\begingroup |
| 528 |
\@parboxrestore |
| 529 |
\if@minipage |
| 530 |
\@setminipage |
| 531 |
\fi |
| 532 |
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par |
| 533 |
\endgroup} |
| 534 |
% \end{macrocode} |
| 535 |
% |
| 536 |
% Also use Donald Arsenau's modified \verb|\@makecaption| which fixes problems |
| 537 |
% with spacing of captions before tables. Taken from \texttt{comp.text.tex} |
| 538 |
% 21 May 1997. Regular version (acts like regular caption, but with |
| 539 |
% Donald Arsenau's improvements). |
| 540 |
% \begin{macrocode} |
| 541 |
\def\onecaptflag{268 } |
| 542 |
\renewcommand{\@makecaption}[2]{\let\@tempa\relax |
| 543 |
\ifdim\prevdepth>-99\p@ \vskip\abovecaptionskip \relax |
| 544 |
\else \def\@tempa{\vbox to\topskip{}}\fi |
| 545 |
{#1: }\@tempa \vadjust{\penalty \onecaptflag}% |
| 546 |
#2\@finalstrut\strutbox\par |
| 547 |
\ifnum\lastpenalty=\onecaptflag % single line; centre it |
| 548 |
\unpenalty \setbox\@tempboxa\lastbox |
| 549 |
\nointerlineskip |
| 550 |
\hbox to\hsize{\hskip\parfillskip\unhbox\@tempboxa}% |
| 551 |
\fi \vskip\belowcaptionskip} |
| 552 |
% \end{macrocode} |
| 553 |
% |
| 554 |
% Number figures, tables and equations by chapter. Re-define footnotes |
| 555 |
% and minipage footnotes to be single spaced. Make new macros needed |
| 556 |
% for thesis definitions. |
| 557 |
% \begin{macrocode} |
| 558 |
\renewcommand{\thefigure}{\thechapter.\@arabic\c@figure} |
| 559 |
\renewcommand{\thetable}{\thechapter.\@arabic\c@table} |
| 560 |
\renewcommand{\theequation}{\thechapter.\@arabic\c@equation} |
| 561 |
% \end{macrocode} |
| 562 |
% |
| 563 |
% Re-define \verb|\@footnotetext| and \verb|\@mpfootnotetext| to use |
| 564 |
% single spacing |
| 565 |
% rather than the space-and-a-half that is the default elsewhere. |
| 566 |
% |
| 567 |
% \begin{macrocode} |
| 568 |
\renewcommand{\@footnotetext}[1]{\insert\footins{% |
| 569 |
\linespread{1}\normalfont\footnotesize% |
| 570 |
\interlinepenalty\interfootnotelinepenalty |
| 571 |
\splittopskip\footnotesep |
| 572 |
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM |
| 573 |
\hsize\columnwidth \@parboxrestore |
| 574 |
\protected@edef\@currentlabel{% |
| 575 |
\csname p@footnote\endcsname\@thefnmark}% |
| 576 |
\color@begingroup |
| 577 |
\@makefntext{% |
| 578 |
\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% |
| 579 |
\color@endgroup}} |
| 580 |
|
| 581 |
\renewcommand{\@mpfootnotetext}[1]{% |
| 582 |
\global\setbox\@mpfootins\vbox{% |
| 583 |
\unvbox \@mpfootins |
| 584 |
\linespread{1}\normalfont\footnotesize% |
| 585 |
\hsize\columnwidth |
| 586 |
\@parboxrestore |
| 587 |
\protected@edef\@currentlabel{% |
| 588 |
\csname p@mpfootnote\endcsname\@thefnmark}% |
| 589 |
\color@begingroup |
| 590 |
\@makefntext{% |
| 591 |
\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% |
| 592 |
\color@endgroup}} |
| 593 |
% \end{macrocode} |
| 594 |
% |
| 595 |
% Now Define thesis related commands. |
| 596 |
% Another change is to add \verb|\thesistype| which can be defined |
| 597 |
% as appropriate for Masters or Doctoral thesis (default Doctoral). |
| 598 |
% \begin{macrocode} |
| 599 |
\newcommand{\dept}[1]{\gdef\@dept{#1}} |
| 600 |
\newcommand{\thesistype}[1]{\gdef\@thesistype{#1}} |
| 601 |
\newcommand{\degreetype}[1]{\gdef\@degreetype{#1}} |
| 602 |
\newcommand{\principaladviser}[1]{\gdef\@principaladviser{#1}} |
| 603 |
\newcommand{\advis@r}{Adviser} |
| 604 |
\newcommand{\principaladvisor}[1]{\gdef\@principaladviser{#1}% |
| 605 |
\gdef\advis@r{Advisor}} |
| 606 |
\newcommand{\firstreader}[1]{\gdef\@firstreader{#1}} |
| 607 |
\newcommand{\secondreader}[1]{\gdef\@secondreader{#1}} |
| 608 |
\newcommand{\submitdate}[1]{\gdef\@submitdate{#1}} |
| 609 |
\newcommand{\copyrightyear}[1]{\gdef\@copyrightyear{#1}} % \author, \title |
| 610 |
% in report |
| 611 |
|
| 612 |
\renewcommand{\@title}{} |
| 613 |
\renewcommand{\@author}{} |
| 614 |
\newcommand{\@dept}{Physics} |
| 615 |
\newcommand{\@thesistype}{Doctor of Philosophy} |
| 616 |
\newcommand{\@degreetype}{Science} |
| 617 |
\newcommand{\@principaladviser}{} |
| 618 |
\newcommand{\@firstreader}{} |
| 619 |
\newcommand{\@secondreader}{} |
| 620 |
\newcommand{\@submitdate}{\ifcase\the\month\or |
| 621 |
January\or February\or March\or April\or May\or June\or |
| 622 |
July\or August\or September\or October\or November\or December\fi |
| 623 |
\space \number\the\year} |
| 624 |
\ifnum\month=12 |
| 625 |
\@tempcnta=\year \advance\@tempcnta by 1 |
| 626 |
\edef\@copyrightyear{\number\the\@tempcnta} |
| 627 |
\else |
| 628 |
\newcommand{\@copyrightyear}{\number\the\year} |
| 629 |
\fi |
| 630 |
|
| 631 |
\newif\ifcopyright |
| 632 |
\newif\iffigurespage |
| 633 |
\newif\iftablespage |
| 634 |
\copyrighttrue |
| 635 |
\figurespagetrue |
| 636 |
\tablespagetrue |
| 637 |
% \end{macrocode} |
| 638 |
% |
| 639 |
% A new definition, mainly for the declaration. |
| 640 |
% |
| 641 |
% \begin{macrocode} |
| 642 |
\newcommand{\authornameonly}[1]{\gdef\Authornameonly{#1}} |
| 643 |
% \end{macrocode} |
| 644 |
% |
| 645 |
% Title page, copyrightpage and declaration page definitions. |
| 646 |
% Add re-definition for Honours reports rather than Higher Degree |
| 647 |
% theses. |
| 648 |
% \begin{macrocode} |
| 649 |
\newcommand{\titlep}{% |
| 650 |
\pagestyle{empty}% |
| 651 |
\null\vskip2.5cm% |
| 652 |
\begin{center} |
| 653 |
{\rmfamily\Large\uppercase\expandafter{\@title}} |
| 654 |
\end{center} |
| 655 |
\vfill |
| 656 |
\begin{center} |
| 657 |
\textsc{A thesis submitted for the degree of \\ |
| 658 |
\expandafter{\@thesistype}} |
| 659 |
\end{center} |
| 660 |
\vfill |
| 661 |
\begin{center} |
| 662 |
{\rmfamily\normalsize By\\ |
| 663 |
\@author}\\ |
| 664 |
\end{center} |
| 665 |
\vfill |
| 666 |
\begin{center} % Department changed to School July 1995 |
| 667 |
{\rmfamily\normalsize School of \expandafter{\@dept},\\ |
| 668 |
University College, \\ |
| 669 |
The University of New South Wales, \\ |
| 670 |
Australian Defence Force Academy.} \\ |
| 671 |
\vskip1cm |
| 672 |
{\rmfamily\normalsize \@submitdate}\\ |
| 673 |
\end{center} |
| 674 |
\vskip1cm |
| 675 |
\newpage} |
| 676 |
\ifATh@nours\renewcommand{\titlep}{% |
| 677 |
\pagestyle{empty}% |
| 678 |
\null\vskip2.5cm% |
| 679 |
\begin{center} |
| 680 |
{\rmfamily\Large\uppercase\expandafter{\@title}} |
| 681 |
\end{center} |
| 682 |
\vfill |
| 683 |
\begin{center} |
| 684 |
{\rmfamily\normalsize \@author}\\ |
| 685 |
\end{center} |
| 686 |
\vskip1cm |
| 687 |
\begin{center} % Department changed to School July 1995 |
| 688 |
{\rmfamily\normalsize School of \expandafter{\@dept},\\ |
| 689 |
University College, \\ |
| 690 |
The University of New South Wales, \\ |
| 691 |
Australian Defence Force Academy.} \\ |
| 692 |
\vskip1cm |
| 693 |
{\rmfamily\normalsize \@submitdate}\\ |
| 694 |
\end{center} |
| 695 |
\vfill |
| 696 |
\begin{center} |
| 697 |
\small\textsc{Submitted in partial fulfillment of the |
| 698 |
requirements of the degree of \\ |
| 699 |
Bachelor of \expandafter{\@degreetype} with Honours} |
| 700 |
\end{center} |
| 701 |
\newpage}\fi |
| 702 |
|
| 703 |
\newcommand{\copyrightpage}{% |
| 704 |
\null\vfill |
| 705 |
\begin{center} |
| 706 |
{\Large\copyright\ Copyright \@copyrightyear\\ |
| 707 |
by\\ |
| 708 |
\@author}\\ |
| 709 |
\end{center} |
| 710 |
\vfill\newpage} |
| 711 |
|
| 712 |
\newcommand{\declaration}{% |
| 713 |
\newpage |
| 714 |
\null\vfill |
| 715 |
\begin{center} |
| 716 |
\begin{minipage}{11cm} |
| 717 |
\setlength{\parindent}{0\p@} |
| 718 |
\setlength{\parskip}{2ex \@plus0.5ex} |
| 719 |
{\rmfamily\normalsize |
| 720 |
|
| 721 |
I hereby declare that this submission is my own work and to the best |
| 722 |
of my knowledge it contains no material previously published or |
| 723 |
written by another person, nor material which to a substantial extent |
| 724 |
has been accepted for the award of any other degree or diploma at UNSW |
| 725 |
or any other educational institution, except where due acknowledgement |
| 726 |
is made in the thesis. Any contribution made to the research by |
| 727 |
colleagues, with whom I have worked at UNSW or elsewhere, during my |
| 728 |
candidature, is fully acknowledged. |
| 729 |
|
| 730 |
I also declare that the intellectual content of this thesis is the |
| 731 |
product of my own work, except to the extent that assistance from |
| 732 |
others in the project's design and conception or in style, |
| 733 |
presentation and linguistic expression is acknowledged.} |
| 734 |
\par |
| 735 |
\vspace{2.5cm} |
| 736 |
\mbox{}\hfill\Authornameonly |
| 737 |
\end{minipage} |
| 738 |
\end{center} |
| 739 |
\vfill\null |
| 740 |
\addcontentsline{toc}{chapter}{Declaration}} |
| 741 |
% \end{macrocode} |
| 742 |
% |
| 743 |
% Add definitions for \verb|\beforepreface|, \verb|\prefacesection| |
| 744 |
% and \verb|\afterpreface| |
| 745 |
% to allow page numbering and headerstyle to be changed. |
| 746 |
% |
| 747 |
% \begin{macrocode} |
| 748 |
\newcommand{\beforepreface}{% |
| 749 |
\pagestyle{empty} |
| 750 |
\titlep |
| 751 |
\if@twoside\cleardoublepage\fi |
| 752 |
\pagenumbering{roman} |
| 753 |
\ifATdr@ft\pagestyle{draft}\else\pagestyle{plain}\fi |
| 754 |
\setcounter{page}\@ne% Reset the page number to 1, i.e. titlepage is page 0 |
| 755 |
\ifcopyright\copyrightpage\fi |
| 756 |
} |
| 757 |
|
| 758 |
\newcommand{\prefacesection}[1]{% |
| 759 |
\chapter*{#1} |
| 760 |
\addcontentsline{toc}{chapter}{#1}} |
| 761 |
|
| 762 |
\newcommand{\afterpreface}{% |
| 763 |
\if@twoside |
| 764 |
\cleardoublepage |
| 765 |
\else\newpage |
| 766 |
\fi |
| 767 |
\tableofcontents |
| 768 |
\if@twoside |
| 769 |
\cleardoublepage |
| 770 |
\else\newpage |
| 771 |
\fi |
| 772 |
\iftablespage |
| 773 |
{\addvspace{10\p@} |
| 774 |
\let\saveaddvspace=\addvspace |
| 775 |
\def\addvspace##1{} |
| 776 |
\listoftables |
| 777 |
\let\addvspace=\saveaddvspace} |
| 778 |
\if@twoside |
| 779 |
\cleardoublepage |
| 780 |
\else\newpage |
| 781 |
\fi |
| 782 |
\fi |
| 783 |
\iffigurespage |
| 784 |
{\addvspace{10\p@} |
| 785 |
\let\saveaddvspace=\addvspace |
| 786 |
\def\addvspace##1{} |
| 787 |
\listoffigures |
| 788 |
\let\addvspace=\saveaddvspace} |
| 789 |
\if@twoside |
| 790 |
\cleardoublepage |
| 791 |
\else\newpage |
| 792 |
\fi |
| 793 |
\fi |
| 794 |
\pagenumbering{arabic} |
| 795 |
\ifATdr@ft\pagestyle{draft}\else\pagestyle{plain}\fi} |
| 796 |
% \end{macrocode} |
| 797 |
% |
| 798 |
% Create a brand new page style to include the date in the page header. |
| 799 |
% \begin{macrocode} |
| 800 |
\newcommand{\ps@draft}{%\let\@mkboth\@gobbletwo |
| 801 |
\renewcommand{\@oddfoot}{\@empty}% |
| 802 |
\renewcommand{\@oddhead}{\rmfamily\slshape\today\hfil\thepage}% |
| 803 |
\renewcommand{\@evenhead}{\rmfamily\slshape\thepage\hfil\today}% |
| 804 |
\renewcommand{\@evenfoot}{\@oddfoot}} |
| 805 |
% \end{macrocode} |
| 806 |
% |
| 807 |
% Start with \verb|\pagestyle{plain}| in case front matter isn't processed. |
| 808 |
% |
| 809 |
% \begin{macrocode} |
| 810 |
\pagestyle{plain} |
| 811 |
% \end{macrocode} |
| 812 |
% |
| 813 |
% Modify Table of contents entry for chapter to normal font not bold. |
| 814 |
% Second use word Chapter/Appendix before number. Use \verb|\appendixname| |
| 815 |
% rather than \verb|\@chapapp| to set width for this element as it is longer! |
| 816 |
% |
| 817 |
% \begin{macrocode} |
| 818 |
\newlength{\@chapwidth}% |
| 819 |
\renewcommand*\l@chapter[2]{% |
| 820 |
\ifnum \c@tocdepth >\m@ne |
| 821 |
\addpenalty{-\@highpenalty}% |
| 822 |
\vskip 1.0em \@plus\p@ |
| 823 |
\settowidth{\@chapwidth}{\appendixname}% not \@chapapp |
| 824 |
\addtolength{\@chapwidth}{\@pnumwidth} |
| 825 |
\setlength\@tempdima{\@chapwidth}% |
| 826 |
\begingroup |
| 827 |
\parindent \z@ \rightskip \@pnumwidth |
| 828 |
\parfillskip -\@pnumwidth |
| 829 |
\leavevmode \normalfont |
| 830 |
\advance\leftskip\@tempdima |
| 831 |
\hskip -\leftskip |
| 832 |
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par |
| 833 |
\penalty\@highpenalty |
| 834 |
\endgroup |
| 835 |
\fi} |
| 836 |
\def\@chapter[#1]#2{% |
| 837 |
\ifnum \c@secnumdepth >\m@ne |
| 838 |
\refstepcounter{chapter}% |
| 839 |
\typeout{\@chapapp\space\thechapter.}% |
| 840 |
\addcontentsline{toc}{chapter}% |
| 841 |
{\protect\numberline{\expandafter\@chapapp\space\thechapter}#1}% |
| 842 |
\else |
| 843 |
\addcontentsline{toc}{chapter}{#1}% |
| 844 |
\fi |
| 845 |
\chaptermark{#1}% |
| 846 |
\addtocontents{lof}{\protect\addvspace{10\p@}}% |
| 847 |
\addtocontents{lot}{\protect\addvspace{10\p@}}% |
| 848 |
\if@twocolumn |
| 849 |
\@topnewpage[\@makechapterhead{#2}]% |
| 850 |
\else |
| 851 |
\@makechapterhead{#2}% |
| 852 |
\@afterheading |
| 853 |
\fi} |
| 854 |
% \end{macrocode} |
| 855 |
% |
| 856 |
% \begin{macrocode} |
| 857 |
%</package> |
| 858 |
% \end{macrocode} |
| 859 |
% |
| 860 |
% \Finale |
| 861 |
% |