%%% =================================================================== %%% @LaTeX-file{ %%% filename = "upthesis.dtx", %%% version = "1.0a", %%% date = "1998/3/29", %%% time = "03:27:42 WST", %%% checksum = "21290 1050 3958 42148" %%% author = "Greg Gamble", %%% address = "Department of Mathematics, %%% University of Western Australia, %%% Nedlands, W.A. 6907, %%% Australia", %%% telephone = "+61 8 9380 3340," %%% FAX = "+61 8 9380 1028", %%% copyright = "Copyright (C) 1996 Greg Gamble, %%% all rights reserved. Copying of this file is %%% authorised only if either: %%% (1) you make absolutely no changes to your copy, %%% including name; OR %%% (2) if you do make changes, you first rename it %%% to some other name.", %%% email = "gregg@maths.uwa.edu.au (Internet)", %%% codetable = "ISO/ASCII", %%% keywords = "latex, amslatex, ams-latex, installation", %%% supported = "yes", %%% abstract = "This is class \cls{upthesis}. It is built on the %%% standard \latex/ \cls{book} class %%% with option \opt{letterpaper}. %%% It provides a document class for typesetting %%% theses that complies with specifications of %%% the University of the Philippines." %%% docstring = "The checksum field above contains a CRC-16 %%% checksum as the first value, followed by the %%% equivalent of the standard UNIX wc (word %%% count) utility output of lines, words, and %%% characters. This is produced by Robert %%% Solovay's checksum utility.", %%% } %%% =================================================================== % % \iffalse %<*driver> \documentclass{amsdtx} \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} \title{The \cls{upthesis} class} \author{Greg Gamble} \date{Version \fileversion, \filedate} \hDocInput{upthesis.dtx} \end{document} % % \fi % % \maketitle % \tableofcontents % \markboth{THE \cls{UPTHESIS} CLASS}{} % % \changes{v1.0}{97/12/10}{First release based on \cls{upthesis} class} % \changes{v1.0a}{98/03/29}{Created macro \cn{@baselinestretch} and % set it to 0.9. Used only for \cn{defense} % so that it will squeeze onto a single page} % % \makeatletter % \DoNotIndex{\@Alph,\@addpunct,\@addtoreset,\@afterindentfalse} % \DoNotIndex{\@afterindenttrue,\@arabic,\@author,\@biblabel} % \DoNotIndex{\@bsphack,\@chapapp,\@chapter,\@date,\@dblarg} % \DoNotIndex{\@empty,\@esphack,\@fnsymbol,\@gobbletwo,\@idxitem} % \DoNotIndex{\@ifstar,\@index,\@input,\@latex@warning,\@m} % \DoNotIndex{\@mainmatterfalse,\@mainmattertrue,\@makechapterhead} % \DoNotIndex{\@makefnmark,\@makefntext,\@makeschapterhead} % \DoNotIndex{\@maketitle,\@mkboth,\@noitemerr,\@nx,\@onlypreamble} % \DoNotIndex{\@openbib@code,\@plus,\@restonecolfalse,\@restonecoltrue} % \DoNotIndex{\@sanitize,\@schapter,\@secpenalty,\@sect,\@setthanks} % \DoNotIndex{\@ssect,\@startsection,\@starttoc,\@symbolsfile} % \DoNotIndex{\@tempskipa,\@textsuperscript,\@thanks,\@thefnmark} % \DoNotIndex{\@title,\@topnum,\@wrsymbols,\@xivpt,\@xp,\c@chapter} % \DoNotIndex{\c@enumiv,\c@footnote,\c@secnumdepth,\c@section} % \DoNotIndex{\g@addto@macro,\hb@xt@,\if@mainmatter,\if@nobreak} % \DoNotIndex{\if@noskipsec,\if@openright,\if@restonecol,\if@twocolumn} % \DoNotIndex{\m@ne,\p@,\p@enumiv,\protected@write,\skip@,\tw@,\z@,\z@skip} % \DoNotIndex{\@adviser,\@amp,\@approvedate,\@authorizedby,\@chair} % \DoNotIndex{\@dean,\@defensetime,\@defensevenue,\@endorsedby} % \DoNotIndex{\adv@longtab,\adv@tab,\@baselinestretch} % \makeatother % % \newcommand{\sltt}[1]{{\slshape\texttt{#1}}} % \section{Introduction} % The file \fn{upthesis.dtx} is the master file for the \latex/ % class, \cls{upthesis}, which provides a class for writing theses % for \latex/ users in the Department of Mathematics at the % University of the Philippines. It is built on the % standard \latex/ \cls{book} class with option \opt{letterpaper}. % It provides a document class for typesetting % theses that complies with specifications of % the University of the Philippines. The \cls{upthesis} class % is based on the \cls{uwathes} class v1.0c\cite{uwathes}. % % \StopEventually{ % \begin{thebibliography}{9} % \addcontentsline{toc}{section}{\numberline{}Bibliography} % \bibitem{AmSLaTeX} American Mathematical Society, % \emph{\amslatex/ Version 1.2 User's Guide} (Nov.\ 1996). % Filename: \fn{amsldoc.dvi}. % \bibitem{source2e} J.~Braams, D.~Carlisle, A.~Jeffrey, L.~Lamport, % F.~Mittelbach, C.~Rowley, and R.~Sch\"opf, % \emph{The \LaTeXe\ Sources} (Jun.\ 1996). % Filename: \fn{source2e.dvi}. % \bibitem{amsthm} M.~Downes, % \emph{The \pkg{amsthm} package} (Version 1.2a, Feb.\ 1995). % Filename: \fn{amsthm.dvi}. % \bibitem{uwamaths} G.~Gamble, % \emph{The \pkg{uwamaths} package}, % (Version 2.1, Nov.\ 1997). % Filename: \fn{uwamaths.dvi}. % Describes a general purpose package of macros for the % Mathematics Department of the % University of Western Australia. % \bibitem{uwathes} G.~Gamble, % \emph{The \cls{uwathes} class}, % (Version 1.0c, Mar.\ 1998). % Filename: \fn{uwathes.dvi}. % Describes a document class for typesetting PhD theses % that complies with specifications of the % University of Western Australia. % \bibitem{Companion} M.~Goossens, F.~Mittelbach, and A.~Samarin, % \emph{The \latex/ Companion} (Addison-Wesley, 1994). % \bibitem{TeX} D.~E.~Knuth, % \emph{The \tex/book} % (Addison-Wesley, 1984). Describes \tex/ in detail. % \bibitem{LaTeX} L.~Lamport, % \emph{\latex/ -- A Document Preparation System} % (Addison-Wesley, first ed., 1985). Describes \latex/ 2.09. % \bibitem{LaTeXe} L.~Lamport, % \emph{\latex/ -- A Document Preparation System} % (Addison-Wesley, second ed., 1994). Updated for \LaTeXe. % \bibitem{clsguide} The \latex/3 Project, % \emph{\LaTeXe\ for class and package writers} (Nov.\ 1996). % Filename: \fn{clsguide.dvi}. % \end{thebibliography} % \addcontentsline{toc}{section}{\numberline{}Index} % \DisableCrossrefs % \PrintIndex % \addcontentsline{toc}{section}{\numberline{}Change History} % \PrintChanges % } % % \section{Implementation} % The usual name, date, and version information. % \begin{macrocode} \typeout{upthesis 1.0a} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{upthesis}[1998/03/28 v1.0a] % \end{macrocode} % We build the class \cls{upthesis} on top of \latex/'s % \cls{book} class with options \opt{letterpaper} and \opt{oneside}. % \begin{macrocode} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} \ProcessOptions\relax \LoadClass[letterpaper,oneside]{book} % \end{macrocode} % The following code was taken straight from the \cls{amsbook} % class. % \begin{macrocode} \def\calclayout{\advance\textheight -\headheight \advance\textheight -\headsep % \end{macrocode} % \pagebreak % \begin{macrocode} \oddsidemargin\paperwidth \advance\oddsidemargin -\textwidth \divide\oddsidemargin\tw@ \ifdim\oddsidemargin<.5truein \oddsidemargin.5truein \fi \advance\oddsidemargin -1truein \evensidemargin\oddsidemargin \topmargin\paperheight \advance\topmargin -\textheight \advance\topmargin -\headheight \advance\topmargin -\headsep \divide\topmargin\tw@ \ifdim\topmargin<.5truein \topmargin.5truein \fi \advance\topmargin -1truein\relax } % \end{macrocode} % Now we set the page parameters. If a user wishes to reset % these, it is recommended that they do so in the following % way and in the following order. In particular, take note % of what parameters are set \emph{before} and \emph{after} % the \cn{calclayout} command. We set % the margin near the binding to be slightly more than $4\,$cm % and other margins slightly more than $2\,$cm. % Since, by default we use the \opt{oneside} option, % \cn{evensidemargin} is normally ignored, and all lefthand % margins are slightly more than $4\,$cm. We set % \cn{evensidemargin} in case the user chooses the % \opt{twoside} option. % \begin{macrocode} \setlength{\textheight}{\paperheight} \addtolength{\textheight}{-5.4cm} \setlength{\textwidth}{\paperwidth} \addtolength{\textwidth}{-6.4cm} \normalsize \setlength{\headheight}{2\baselineskip} \calclayout \addtolength{\evensidemargin}{-1.2cm} \addtolength{\oddsidemargin}{0.8cm} \setlength{\marginparsep}{4mm} \setlength{\marginparwidth}{12mm} % \end{macrocode} % We ensure that the \amslatex/ packages % \pkg{amsmath} \cite{AmSLaTeX}, % \pkg{amssymb} and \pkg{amsthm} \cite{amsthm} are loaded. % The latter of these provides more developed theorem environments % than standard \latex/. % You get still more if you use % the \pkg{uwamaths} package \cite{uwamaths}. % The \env{proof} environment is redefined to give a % \textbf{bold} header (it's done in the same way as % the \pkg{uwamaths} package \cite{uwamaths}). % \begin{macrocode} \RequirePackage{amsmath}\relax \ifx\relax\mathfrak \@xp\@gobbletwo \else \let\mathfrak\relax \fi \RequirePackage{amssymb}\relax \RequirePackage{amsthm}\relax \renewenvironment{proof}[1][\proofname]{\par \normalfont \topsep6\p@\@plus6\p@ \trivlist \item[\hskip\labelsep\bfseries #1\@addpunct{.}]\ignorespaces }{% \qed\endtrivlist }% % \end{macrocode} % The following \amslatex/ command tells \latex/ to allow breaks % within maths displays but to avoid them as much as possible. % \begin{macrocode} \allowdisplaybreaks[1] % \end{macrocode} % \section[The title-, approval and defense pages] % {Commands that set the title-, approval and defense pages} % Now we set up macros for the titlepage. The \cn{maketitle} % macro is a simplified version of the one from the \cls{book} class. % The \cn{thismonth} macro is essentially \cn{today} without the day. % The \cn{title} and \cn{author} commands are % modified versions of \cls{amsbook} macros. % \begin{macrocode} \def\thismonth{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi} \renewcommand{\title}[2][]{\gdef\shorttitle{#1}\gdef\@title{#2}} \edef\title{\@nx\@dblarg \@xp\@nx\csname\string\title\endcsname} \renewcommand{\author}[2][]{\gdef\shortauthors{#1}\gdef\authors{#2}} \edef\author{\@nx\@dblarg \@xp\@nx\csname\string\author\endcsname} \let\shortauthors\@empty \let\authors\@empty \renewcommand{\thanks}[1]{\let\thankses\@empty \g@addto@macro\thankses{\thanks{#1}}} % \end{macrocode} % We supply \cn{dept}, \cn{deptaddress}, \cn{degree} % and \cn{approvedate} % commands which work in the same way \cn{title} does. % If the user does not set these, the following % default values are used: % \[ % \begin{tabular}{lp{3.8cm}} % Command&Default Value\\ % \hline % \cn{dept}&\slshape\verb+Department of Mathematics+\\[3pt] % \cn{deptaddress}&\slshape\setlength\tabcolsep{0pt} % \begin{tabular}[t]{l} % \verb+College of Science\\+\\ % \verb+University of the Philippines\\+\\ % \verb+Diliman, Quezon City+\\[3pt] % \end{tabular}\\ % \cn{degree}&\slshape % \verb+Doctor of Philosophy in Mathematics+\\[3pt] % \cn{approvedate}&\slshape\verb+\hspace*{2.5cm}+\\ % \hline % \end{tabular} % \] % \begin{macrocode} \newcommand{\dept}[1]{\gdef\department{#1}} \newcommand{\deptaddress}[1]{\gdef\departmentaddress{#1}} \newcommand{\degree}[1]{\gdef\thesisdegree{#1}} \newcommand{\approvedate}[1]{\gdef\@approvedate{#1}} \dept{Department of Mathematics} \deptaddress{College of Science\\ University of the Philippines\\ Diliman, Quezon City} \degree{Doctor of Philosophy in Mathematics} \approvedate{\hspace*{2.5cm}} % \end{macrocode} % We now define commands \cn{adviser}, \cn{coadviser}, \cn{reader}, % \cn{chair}, \cn{dean}, \cn{examiner}, \cn{Endorsedby} and % \cn{Authorizedby}. Each of these takes two arguments: % \sltt{NAME} and \sltt{ADDRESS} (the \sltt{ADDRESS} begins % with the person's title (e.g.\ \emph{Head of Department}) % and lines of the \sltt{ADDRESS} are separated by \verb+//+). % Here is an example % \begin{quote}\slshape % \verb+\adviser{Fred R. Nerk, Ph.D.}+\\ % \verb+ {Associate Professor\\+\\ % \verb+ Department of Mathematics\\+\\ % \verb+ University of the Philippines\\+\\ % \verb+ Diliman, Quezon City}+ % \end{quote} % \begin{macrocode} \newcommand{\adviser}{\@adviser{Dissertation Adviser}} \newcommand{\coadviser}{\@adviser{Dissertation Co-Adviser}} \newcommand{\reader}{\@adviser{Dissertation Reader}} \newcommand{\chair}[2]{\gdef\@chair{\adv@tab{#2}{#1}}} \newcommand{\dean}[2]{\gdef\@dean{\adv@tab{#2}{#1}}} \newcommand{\Endorsedby}[2]{\gdef\@endorsedby{\adv@tab{#2}{#1}}} \newcommand{\Authorizedby}[2]{\gdef\@authorizedby{\adv@tab{#2}{#1}}} \newcommand{\examiner}[2]{% \@xp\g@addto@macro\@xp\longadvisors\@xp{\sep% \adv@longtab{Dissertation Examiner}{#1}{#2}}% \ifx\@amp\sep\global\let\sep\\ \else\global\let\sep\@amp\fi} \newcommand{\defensetime}[1]{\gdef\@defensetime{#1}} \newcommand{\defensevenue}[1]{\gdef\@defensevenue{#1}} \def\hisher{her} \def\@amp{&} \newcommand\crsp{\\[2cm]\relax} \let\sep\@amp \let\advisors\@empty \let\longadvisors\@empty \let\@defensetime\@empty \let\@defensevenue\@empty \def\@baselinestretch{1} \newcommand{\adv@tab}[2]{% \renewcommand{\baselinestretch}{\@baselinestretch}\normalsize \begin{tabular*}{0.5\textwidth}[t]{l} #2\\ #1 \end{tabular*}} \newcommand{\adv@longtab}[3]{% \renewcommand{\baselinestretch}{\@baselinestretch}\normalsize \begin{tabular*}{0.5\textwidth}[t]{l} \MakeUppercase{#1}\\ #2\\ #3\\\ \end{tabular*}} \newcommand{\@adviser}[3]{% \ifx\@empty\advisors \gdef\advisors{\adv@tab{#1}{#2}}% \gdef\longadvisors{\adv@longtab{#1}{#2}{#3}}% \else \@xp\g@addto@macro\@xp\advisors\@xp{\sep\adv@tab{#1}{#2}}% \@xp\g@addto@macro\@xp\longadvisors\@xp{% \sep\adv@longtab{#1}{#2}{#3}}% \ifx\@amp\sep\global\let\sep\crsp \else\global\let\sep\@amp\fi \fi} % \end{macrocode} % \begin{macrocode} \renewcommand\maketitle{\par \frontmatter \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 1em\noindent \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \@maketitle \pagebreak \approv \pagebreak \defense \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \def\@maketitle{\cleardoublepage \thispagestyle{empty}% \begingroup \topskip\z@skip \null\vfil \vspace*{2cm} \begin{center} \bfseries\large\@title\\\ \\ \mdseries\normalsize by\\\ \\ \mdseries\MakeUppercase\authors\\[4cm] \ifx\@empty\thankses\else\@setthanks\\\ \\\fi \ifx\@empty\@date\thismonth, \number\year\else\@date\fi \end{center} \vfil \endgroup} \def\@setthanks{\def\thanks##1{\par##1\@addpunct.}\thankses} \def\approv{\cleardoublepage \thispagestyle{empty}% \begingroup\noindent% This is to certify that this doctoral dissertation entitled \begin{center} \sffamily\@title \end{center} and submitted by \authors\ to fulfill part of the requirements for the degree of \thesisdegree\ was successfully defended and approved on \@approvedate. \vspace*{1cm} \[ \begin{tabular*}{\textwidth}{p{0.49\textwidth}l} \advisors \end{tabular*} \] \vspace*{1cm} \par The \department\ endorses acceptance of this doctoral dissertation as partial fulfillment of the requirements for the degree of \thesisdegree. \vspace*{1cm} \[ \begin{tabular*}{\textwidth}{ll} \hspace*{0.49\textwidth}&\@chair \end{tabular*} \] \vspace*{1cm} \par This doctoral dissertation is hereby accepted as partial fulfillment of the requirements for the degree of \thesisdegree. \vspace*{1cm} \[ \begin{tabular*}{\textwidth}{ll} \hspace*{0.49\textwidth}&\@dean \end{tabular*} \] \endgroup} \def\defense{\cleardoublepage \thispagestyle{empty}% \begingroup \def\@baselinestretch{0.9} \renewcommand{\baselinestretch}{\@baselinestretch} \begin{center} \MakeUppercase\department\\ \departmentaddress\\[4pt] ANNOUNCEMENT OF THE DOCTORAL DEFENSE\\[2pt] OF\\[2pt] \authors\\[2pt] in defense of \hisher\ doctoral dissertation\\[2pt] ``\MakeUppercase\@title''\\[2pt] for the degree of \thesisdegree\\ \@defensetime\ \\ \@defensevenue\ \end{center} \[ \begin{tabular*}{\textwidth}{ll} \longadvisors \end{tabular*} \] \enlargethispage*{3\baselineskip} \[ \begin{tabular*}{\textwidth}{ll} Endorsed by:&Authorized by:\\[5pt] \@endorsedby&\@authorizedby \end{tabular*} \] \endgroup} % \end{macrocode} % Now we give the default value of \cn{thanks}. % \begin{macrocode} \thanks{A Doctoral Dissertation Submitted to the\\ \department\\ \departmentaddress\\\ \\ As Partial Fulfillment of the Requirements\\ for the Degree of\\ \MakeUppercase{\thesisdegree}} % \end{macrocode} % We now create the \env{abstract}, % \env{acknowledgements}, \env{dedication}, % \env{theglossary} environments % and \env{thesymbols} environments. % \begin{macrocode} \newcommand{\abstractname}{Abstract} \newenvironment{abstract}{\cleardoublepage \section*{\abstractname} \@mkboth{\abstractname}{\abstractname}% \addcontentsline{toc}{chapter}{\abstractname}}{} \newenvironment{acknowledgements}% {\renewcommand{\abstractname}{Acknowledgements}% \begin{abstract}} {\end{abstract}} \newenvironment{dedication}% {\renewcommand{\abstractname}{Dedication}% \begin{abstract}} {\end{abstract}} \newcommand{\glossaryname}{Glossary} \newenvironment{theglossary}% {\chapter*{\glossaryname} \@mkboth{\glossaryname}{\glossaryname}% \addcontentsline{toc}{chapter}{\glossaryname} \thispagestyle{plain} \begin{description}} {\end{description}} \newcommand{\listsymbolsname}{List of Symbols} \newenvironment{thesymbols}% {\chapter*{\listsymbolsname} \@mkboth{\listsymbolsname}{\listsymbolsname}% \addcontentsline{toc}{chapter}{\listsymbolsname} \thispagestyle{plain} \begin{description}} {\end{description}} % \end{macrocode} % Analogous to the commands \cn{makeglossary}, \cn{glossaryentry} % and \cn{glossary} \cite{source2e}, we define % \cn{makesymbols}, \cn{symbolsentry} and \cn{symbols} % commands for generating a \textbf{List of Symbols}. % Thus a command \cn{makesymbols} in the preamble causes the % opening of a \fn{.sym} file. Then \cn{symbols} causes % \cn{symbolsentry}s to be written to the \fn{.sym} file. It is % then up to the user to create from the \fn{.sym} file % a \fn{.smb} file that contains a \env{thesymbols} environment % conceivably by creating an appropriate \fn{.ist} (indexstyle) % file and then running \makeindx/ with the appropriate options. % To cause the \fn{.smb} file to be included in a document the % user issues a \cn{printsymbols} command. See a bit later below. % \begin{macrocode} \def\makesymbols{% \newwrite\@symbolsfile \immediate\openout\@symbolsfile=\jobname.sym \def\symbols{\@bsphack\begingroup \@sanitize \@wrsymbols}\typeout {Writing symbols file \jobname.sym }% % \end{macrocode} % Opening the write channel should be done only once % since on some operating systems multiple opens are forbidden and in % any case it is useless; so we turn this into a no-op after use. % (The previous comment is taken straight from a similar one in % \cite{source2e}.) % \begin{macrocode} \let\makesymbols\@empty } \@onlypreamble\makesymbols \def\@wrsymbols#1{% \protected@write\@symbolsfile{}% {\string\symbolsentry{#1}{\thepage}}% \endgroup \@esphack} % \end{macrocode} % \begin{macrocode} \def\symbols{\@bsphack\begingroup\@sanitize\@index} % \end{macrocode} % We provide \cn{printglossary} and \cn{printsymbols} commands, % analogous to \cn{printindex}. % \begin{macrocode} \newcommand\printglossary{\@input{\jobname.gls}}% \newcommand\printsymbols{\@input{\jobname.smb}}% % \end{macrocode} % We redefine the \cn{listoftables} and \cn{listoffigures} % commands, and the \env{thebibliography} and % \env{theindex} environments % to add a contents line to the table of contents. % Since we prefer headlines not to be entirely uppercase, % uses of \cn{MakeUppercase} for (headline) marks % have also been deleted. The \latex/ \cls{book} % class doesn't issue marks when the \cn{chapter*} % macro is used -- from the code below one can see % an explicit use of \cn{@mkboth} in each of % \cn{listoffigures}, \cn{listoftables}, % \cn{thebibliography} and \cn{theindex}. This serves % as a warning to users that \cn{chapter*} is % really a low-level command and should normally % be used in the make-up of higher level commands % in the \emph{preamble} or a user's personal macros % file. % \begin{macrocode} \renewcommand\listoffigures{% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse \fi \chapter*{\listfigurename \addcontentsline{toc}{chapter}{\listfigurename} \@mkboth{\listfigurename}{\listfigurename}}% \@starttoc{lof}% \if@restonecol\twocolumn\fi } \renewcommand\listoftables{% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse \fi \chapter*{\listtablename \addcontentsline{toc}{chapter}{\listtablename} \@mkboth{\listtablename}{\listtablename}}% \@starttoc{lot}% \if@restonecol\twocolumn\fi } \renewenvironment{thebibliography}[1] {\chapter*{\bibname \addcontentsline{toc}{chapter}{\bibname} \@mkboth{\bibname}{\bibname}}% \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy\clubpenalty4000\widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \renewenvironment{theindex} {\if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi \columnseprule \z@ \columnsep 35\p@ \twocolumn[\@makeschapterhead{\indexname}]% \addcontentsline{toc}{chapter}{\indexname} \@mkboth{\indexname}{\indexname}% \thispagestyle{plain}\parindent\z@ \parskip\z@ \@plus .3\p@\relax \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} % \end{macrocode} % In case you want an index we have the following code (also % from the \cls{amsbook} class). % \begin{macrocode} \newcommand\seename{see also}% \newcommand\see[2]{{\em \seename\/} #1}% \newcommand\printindex{\@input{\jobname.ind}}% % \end{macrocode} % For convenience we provide \cn{indx}, \cn{gloss} and \cn{symb} % as shorthand for indexing, glossary and symbols listing commands % to deal with the most usual way we would use \cn{index}, \cn{glossary} % and \cn{symbols} e.g. % \begin{center} % \begin{tabular}{cc@{\quad abbreviates\quad}c} % \slshape\verb|\indx{gnat}| &&\slshape\verb|gnat\index{gnat}|\\ % \slshape\verb|\gloss{gnat}| &&\slshape\verb|\emph{gnat}\glossary{gnat}|\\ % \slshape\verb|\symb{=}| &&\slshape\verb|=\symbols{$=$}| % \end{tabular} % \end{center} % The abbreviation \cn{symb} assumes that the symbol is a math-mode % symbol -- don't use it, if your symbol is not a math-mode symbol. % Also, don't use \cn{symb} if its argument has arguments. % \begin{macrocode} \newcommand{\indx}[1]{#1\index{#1}} \newcommand{\gloss}[1]{\emph{#1}\glossary{#1}} \newcommand{\symb}[1]{#1\symbols{\ensuremath{#1}}} % \end{macrocode} % Now we set up sections and chapters headers in the style of the % \cls{amsbook} class. The macros are straight from the \cls{amsbook} % class except that for the chapterhead macros the setting of % \cn{topskip} was removed \dots\ since besides wasting paper % this upset the \cn{topskip} on subsequent pages. % \begin{macrocode} \newdimen\linespacing \normalsize \setlength{\linespacing}{\baselineskip} \newdimen\normalparindent \setlength{\normalparindent}{18pt} \def\@makechapterhead#1{% \begingroup \fontsize{\@xivpt}{18}\bfseries\centering \ifnum\c@secnumdepth>\m@ne \leavevmode \hskip-\leftskip \rlap{\vbox to\z@{\vss \centerline{\normalsize\mdseries \uppercase\@xp{\chaptername}\enspace\thechapter} \vskip 3pc}}\hskip\leftskip\fi #1\par \endgroup \skip@34\p@ \advance\skip@-\normalbaselineskip \vskip\skip@ } \def\@makeschapterhead#1{% \begingroup \fontsize{\@xivpt}{18}\bfseries\centering #1\par \endgroup \skip@34\p@ \advance\skip@-\normalbaselineskip \vskip\skip@ } \def\section{\@startsection{section}{1}% \z@{.7\linespacing\@plus\linespacing}{.5\linespacing}% {\normalfont\bfseries\centering}} \def\subsection{\@startsection{subsection}{2}% \normalparindent{.5\linespacing\@plus.7\linespacing}{-.5em}% {\normalfont\bfseries}} \def\subsubsection{\@startsection{subsubsection}{3}% \normalparindent\z@{-.5em}% {\normalfont\itshape}} \def\paragraph{\@startsection{paragraph}{4}% \normalparindent\z@{-\fontdimen2\font}% \normalfont} \def\subparagraph{\@startsection{subparagraph}{5}% \z@\z@{-\fontdimen2\font}% \normalfont} \def\appendix{\par \c@chapter\z@ \c@section\z@ \let\chaptername\appendixname \def\thechapter{\@Alph\c@chapter}} % \end{macrocode} % To get nice page headers we use the % \pkg{fancyheadings} package. % \begin{macrocode} \RequirePackage{fancyheadings} \addtolength{\headwidth}{5truemm} \lhead[\fancyplain{\hskip-5mm\bfseries\thepage}{\bfseries\thepage}]% {\fancyplain{}{\sffamily\slshape\rightmark}} \chead[]{} \rhead[\fancyplain{}{\sffamily\slshape\leftmark}]% {\fancyplain{\begin{picture}(0,0)% \put(0,0){\makebox[5truemm][r]{\bfseries\thepage}}% \end{picture}}{\bfseries\thepage}} \cfoot{} \pagestyle{fancyplain} \renewcommand{\chaptermark}[1]{\markboth{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \@chapapp\ \thechapter. \ % \fi \fi #1}{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \@chapapp\ \thechapter. \ % \fi \fi #1}} \renewcommand{\sectionmark}[1]{\markright{% \ifnum \c@secnumdepth >\z@ \thesection. \ % \fi #1}} % \end{macrocode} % We redefine \cn{frontmatter} and \cn{mainmatter} % so that they also change the pagestyle. The user should never need % to use \cn{frontmatter} (it is used in the \cn{maketitle} % command) but should use \cn{mainmatter} to specify the start % of the thesis text. % \begin{macrocode} \renewcommand\frontmatter{% \if@openright \cleardoublepage \else \clearpage \fi \@mainmatterfalse \pagestyle{plain} \pagenumbering{roman}} \renewcommand\mainmatter{% \if@openright \cleardoublepage \else \clearpage \fi \@mainmattertrue \pagestyle{fancyplain} \pagenumbering{arabic}} % \end{macrocode} % We make available some spacing macros. % The amounts of stretch are those specified % for $12\,$pt by the \emph{\latex/ Companion} \cite{Companion}. % Other font sizes differ from these only marginally. % See the \pkg{uwamaths} package \cite{uwamaths} % where the same macros are defined, for further discussion % of these macros. % \begin{macrocode} \newcommand{\singlespacing}{\renewcommand{\baselinestretch}{1}} \newcommand{\oneandhalfspacing}{\renewcommand{\baselinestretch}{1.24}} \newcommand{\doublespacing}{\renewcommand{\baselinestretch}{1.66}} % \end{macrocode} % Now we modify the standard \latex/ macros \cn{@startsection} and % \cn{chapter} (the latter is defined in the \cls{book} class) % by adding \verb+\AtBeginSection{#1}+ in an appropriate place. % The purpose and examples of use of \cn{AtBeginSection} are % described a little later, below. % \begin{macrocode} \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi \par \@tempskipa #4\relax \@afterindenttrue \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi \if@nobreak \everypar{}\else \addpenalty\@secpenalty\addvspace\@tempskipa\fi \@ifstar{\@ssect{#3}{#4}{#5}{#6}}% {\AtBeginSection{#1}% \@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}} \renewcommand\chapter{% \if@openright\cleardoublepage\else\clearpage\fi \thispagestyle{plain}% \AtBeginSection{chapter}% \global\@topnum\z@ \@afterindentfalse \secdef\@chapter\@schapter} % \end{macrocode} % We define \cn{AtBeginSection} to be a no-op by default. % \begin{macrocode} \def\AtBeginSection#1{\relax} % \end{macrocode} % Now we define the macro that motivated the desire to have something % like \cn{AtBeginSection}. \amslatex/ defines a macro \cn{numberwithin} % which doesn't work as desired in the case where a counter is already % numbered within a sectional unit -- one can end up with duplicate chapter % numbers for a table, for example. Hence we provide a macro % \cn{numberin} which otherwise works in the manner described for % \cn{numberwithin} in \cite{AmSLaTeX}, e.g. % \begin{quote}\slshape % \verb+\numberin{table}{chapter}+ % \end{quote} % will cause \env{table}s to be numbered within \texttt{chapter}s. % To get the order of the arguments right, read the above command % this way: \emph{number} \env{table} \emph{in} \texttt{chapter}. % (You will get strange effects if you get the arguments the wrong way % round.) % \begin{macrocode} \newcommand{\numberin}[2]{% \@addtoreset{#1}{#2}% \@xp\@xp\@xp\renewcommand\@xp{\csname the#1\endcsname}{% \csname the#2\endcsname.\arabic{#1}}} % \end{macrocode} % (For those curious about what \cn{@xp} does: \cn{@xp} is an % \amslatex/ abbreviation for \tex/'s \cn{expandafter}. % The above configuration of \cn{expandafter} commands is described % in \cite[page 374]{TeX}.) % Now, we describe a use for \cn{AtBeginSection}. Suppose we want % numbering to be within the particular sectional unit a numbered % item resides, i.e.\ if it is in a \texttt{subsection} we want it % numbered subordinate to the \texttt{subsection} counter, % if it is in a \texttt{chapter} % (but not in a smaller unit) we want it numbered subordinate only to % the \texttt{chapter} counter, etc. We could issue \cn{numberin} % commands each time we enter a new \texttt{chapter}, \texttt{section}, % \texttt{subsection}, \dots . (We can't use \cn{numberwithin} to do this % \dots we would end up with longer and longer strings of duplicated % sectional numbers.) This is where \cn{AtBeginSection} comes in. % To automatically number \env{table}s, \env{figure}s and \env{equation}s % within the smallest current sectional unit, one would redefine % \cn{AtBeginSection} as follows. % \begin{quote}\slshape % \verb+\renewcommand{\AtBeginSection}[1]{\numberin{table}{#1}+\\ % \verb+ \numberin{figure}{#1}+\\ % \verb+ \numberin{equation}{#1}}+ % \end{quote} % \cn{AtBeginSection} \emph{must} be defined with one argument. When % called by the \cn{chapter} or \cn{@startsection} command % (\cn{@startsection} command is invoked by \cn{section}, % \cn{subsection}, \dots) the \verb+#1+ % in the body of the \cn{AtBeginSection} command definition is % the current sectional unit (e.g.\ \texttt{chapter}, \texttt{section}, % \texttt{subsection}, \dots). % The \pkg{uwamaths} package \cite{uwamaths} defines a number of % theorem environments and a command \cn{numberallin}. Since the theorem % environments aren't actually defined by this class, we don't provide % \cn{numberallin}. Suppose, however, that you are loading the package % \pkg{uwamaths}, then to also number the theorem environments within % the smallest current sectional unit one could instead redefine % \cn{AtBeginSection} as follows. % \begin{quote}\slshape % \verb+\renewcommand{\AtBeginSection}[1]{\numberallin{#1}}+ % \end{quote} % Presumably, there are many other uses for \cn{AtBeginSection}. % \begin{macrocode} \endinput % \end{macrocode} % \section{A sample thesis master file} % Well that's it for the code. Here is an example of a typical % master file for a thesis; let's call it % \slshape\verb+mythesis+\upshape\verb+.tex+. % First we must specify the class and fontsize: % \begin{quote}\slshape % \verb+\documentclass[12pt]{upthesis}+ % \end{quote} % Usually, the user will load the \pkg{uwamaths} package \cite{uwamaths} % but this is not essential. Suppose that \env{theorem}s etc., \env{table}s, % \env{figures} and \env{equation}s should be numbered within the % smallest current sectional unit then one should specify: % \begin{quote}\slshape % \verb+\usepackage[unsectioned]{uwamaths}+\\ % \verb+\renewcommand{\AtBeginSection}[1]{\numberallin{#1}+ % \end{quote} % \emph{Note} that \cn{numberallin} is provided by the \pkg{uwamaths} % package, \emph{not} the \cls{upthesis} class. If you are happy with % having all \env{theorem}s etc., \env{table}s, \env{figure}s and % \env{equation}s numbered in the form \textbf{N.m.l} then the above two % lines should be replaced by: {\slshape\verb+\usepackage{uwamaths}+} % (i.e. without declaring the \opt{unsectioned} option or redefining % \cn{AtBeginSection}). See the discussion in the previous section for % other possibilities for \cn{AtBeginSection} and \cite{uwamaths} % for other options you might want from the \pkg{uwamaths} package. % % The University of the Philippines specifies the interline % spacing for a PhD thesis should be at least $1\frac12$-spacing % but not more than double-spacing: % \begin{quote}\slshape % \verb+\oneandhalfspacing+ % \end{quote} % If you intend having an \textbf{Index} and you are using % \makeindx/ to generate it then you need: % \begin{quote}\slshape % \verb+\makeindex+ % \end{quote} % Similarly if you want a \textbf{Glossary} and/or a % \textbf{List of Symbols} and you have appropriate % \fn{.ist} (index style) files so that you can use % \makeindx/ to % generate the \fn{.gls} and \fn{.smb} files from % the (\latex/-generated) \fn{.glo} and \fn{.sym} files, % respectively, then you need (one or both of): % \begin{quote}\slshape % \verb+\makeglossary+\\ % \verb+\makesymbols+ % \end{quote} % Now the guff that will be set in the title page; % \cn{date} is optional \dots\ it defaults to today's date. % Also, {\slshape \verb+\date{}+} (i.e.\ giving \cn{date} a blank % argument) gives just the current \emph{month} and \emph{year} % (i.e. \emph{no day}). % There is also \cn{thanks} which the user may use to over-ride % the default words: \emph{This thesis is presented for \dots}. % \begin{quote}\slshape % \verb+\title{My Thesis}+\\ % \verb+\author{A. U. Thor}+\\ % \verb+\date{December 1997}+ % \end{quote} % Now the start of the document followed by \cn{maketitle} % to actually set the title page. % \begin{quote}\slshape % \verb+\begin{document}+\\ % \verb+\maketitle+ % \end{quote} % Now the usual front matter stuff. Here we have specified % that the \env{abstract} and \env{acknowledgements} environments % are in files \fn{abstract.tex} and \fn{acknow.tex}, respectively. % There is also a \env{dedication} environment entirely analogous % to the \env{acknowledgements} environment. % The \env{theglossary} environment, if there is one, should be in % file % \slshape\verb+mythesis+\upshape\verb+.gls+ % since our thesis master file is called % \slshape\verb+mythesis+\upshape\verb+.tex+. % It may be printed via \cn{printglossary} rather than using an % \cn{include} statement. % A \env{thesymbols} environment for a \textbf{List of Symbols}, % if there is one, should be in file % \slshape\verb+mythesis+\upshape\verb+.smb+ % since our thesis master file is called % \slshape\verb+mythesis+\upshape\verb+.tex+. % As for the \textbf{Glossary}, it % may be printed via \cn{printsymbols} rather than using an % \cn{include} statement. % It's good form to put the environments \env{abstract} etc.\ % in separate files. % We discuss these front matter environments a little further in the next % section. % \begin{quote}\slshape % \verb+\include{abstract}+\\ % \verb+\tableofcontents+\\ % \verb+\listoftables+\\ % \verb+\listoffigures+\\ % \verb+\printsymbols+\\ % \verb+\printglossary+\\ % \verb+\include{acknow}+ % \end{quote} % Now comes the body of the text, initiated by \cn{mainmatter}, % which sets a fancy pagestyle and arabic numbering on a fresh % page. Again, it is recommended that each chapter is in a separate % file. The \cn{appendix} macro does not generate any text but % resets the \cn{chapter} counter to number A, B, \dots. % \begin{quote}\slshape % \verb+\mainmatter+\\ % \verb+\include{chap1}+\\ % \verb+\include{chap2}+\\ % \verb+\include{chap3}+\\ % \verb+\include{chap4}+\\ % \verb+\appendix+\\ % \verb+\include{appxA}+ % \end{quote} % Let's suppose we are using \bibtex/ and our bibliography % database file is % \slshape\verb+myrefs+\upshape\verb+.bib+ and we are % using the \env{uwa} bibliography style. Then we would have: % \begin{quote}\slshape % \verb+\bibliographystyle{uwa}+\\ % \verb+\bibliography{myrefs}+ % \end{quote} % If we intend to have an index we have: % \begin{quote}\slshape % \verb+\printindex+ % \end{quote} % Finally, we have the closing out of the document: % \begin{quote}\slshape % \verb+\end{document}+ % \end{quote} % \section{The front matter environments} % Now, we discuss what goes in the included files % \fn{abstract.tex}, \fn{acknow.tex} and % \slshape\verb+mythesis+\upshape\verb+.gls+ % (the front matter environments files specified in our % sample master file above). Firstly, in the file % \fn{abstract.tex} one should have an \env{abstract} % environment, e.g. the contents of \fn{abstract.tex} % should be something like % \begin{quote}\slshape % \verb+\begin{abstract}+\\ % \verb+ TEXT+\\ % \verb+\end{abstract}+ % \end{quote} % The file \fn{acknow.tex} should contain an \env{acknowledgements} % environment, something like % \begin{quote}\slshape % \verb+\begin{acknowledgements}+\\ % \verb+ TEXT+\\ % \verb+\end{acknowledgements}+ % \end{quote} % If you also have a \env{dedication} environment it also should be % in its own file, \cn{include}d like \fn{acknow.tex} and contain % \begin{quote}\slshape % \verb+\begin{dedication}+\\ % \verb+ TEXT+\\ % \verb+\end{dedication}+ % \end{quote} % The file % \slshape\verb+mythesis+\upshape\verb+.gls+ % should contain a \env{theglossary} environment, which is % just like the standard \latex/ \env{description} environment, % i.e.\ something like % \begin{quote}\slshape % \verb+\begin{theglossary}+\\ % \verb+ \item[LABEL] DESCRIPTION+\\ % \verb+ \item[LABEL] DESCRIPTION+\\ % \verb+ .+\\ % \verb+ .+\\ % \verb+\end{theglossary}+ % \end{quote} % (Note: you can also call the glossary \fn{glossary.tex}, but % then you would need to change the \cn{printglossary} command in % \slshape\verb+mythesis+\upshape\verb+.tex+ % to \verb+\include{glossary}+. The reason for choosing to call % the glossary % \slshape\verb+mythesis+\upshape\verb+.gls+ % is to allow for the possibility of automatic generation of the % glossary using \latex/'s \cn{glossary} command in % conjunction with the program \makeindx/.) % There is also \env{thesymbols} environment that is entirely analogous % to the \env{theglossary} environment. Its default header is % \textbf{List of Symbols}. See earlier, where the environment is defined, % for a discussion of its usage. % \CheckSum{1121} % \Finale