\NeedsTeXFormat{LaTeX2e} \ProvidesClass{hwthesis}[2007/05/03 v0.ALTER Heriot-Watt Thesis Class] %% use the `fancyhdr` package to make headers and footers \usepackage{fancyhdr} %% set `@draft` to `true` if the `draft` option is specified \let\if@draft\iffalse \DeclareOption{draft}{\let\if@draft\iftrue} %% process other options: \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}} \ProcessOptions\relax \LoadClass[a4paper,12pt]{report} \usepackage{calc} %% define the `time` macro: \newcount\h \newcount\m \h=\time\divide\h 60 \m=-\h \multiply\m 60 \advance\m \time \def\twodigits#1{\ifnum #1<10 0\fi \number#1} \def\time{\twodigits\h:\twodigits\m} %% configure a page style using the `fancyhdr` package \setlength{\headheight}{10pt} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \lhead{\small\textit{\nouppercase{\leftmark}}} \rhead{\if@draft\small\today\ (\time)\fi} \cfoot{\small\thepage} \pagestyle{fancy} % Put fixmes in the big margin %\reversemarginpar % Increase the width of fixmes %\renewcommand{\baselinestretch}{1.5} \usepackage{setspace} \onehalfspacing %%% 1 in = 25.4 mm %%% A4: 210 × 297 (mm) \setlength{\voffset}{-1in} \setlength{\hoffset}{-1in} \setlength{\topmargin}{10mm} \setlength{\headheight}{10pt} \setlength{\headsep}{20mm-10mm-10pt-2mm} \setlength{\evensidemargin}{40mm-2mm} \setlength{\oddsidemargin}{40mm-2mm} \setlength{\textwidth}{210mm-40mm-20mm+2mm} \setlength{\footskip}{10mm-4mm} \setlength{\textheight}{297mm-20mm-20mm+2mm+3mm} \renewcommand\maketitle{\begin{titlepage}% \null\vfil \vskip 60\p@ \begin{center}% {\Large\bf \@title \par}% \vskip 3em% {\Large \lineskip .75em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 6em% {\Large Submitted for the degree of Doctor of Philosophy }\par \vskip 2em% {\Large Heriot-Watt University}\par \vskip 2em% {\Large School of Mathematical and Computer Sciences}\par \vskip 2em% {\Large \@date \par}% % Set date in \large size. \end{center}\par \vskip 6em% \noindent The copyright in this thesis is owned by the author. Any quotation from the thesis or use of any of the information contained in it must acknowledge this thesis as the source of the quotation or information. \vfil\null \end{titlepage}% \setcounter{footnote}{0}% \global\let\maketitle\relax \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 } \if@titlepage \newenvironment{acknowledgments}{% \titlepage \null\vfil \@beginparpenalty\@lowpenalty \begin{center}% \bfseries \acknowledgmentsname \@endparpenalty\@M \end{center}}% {\par\vfil\null\endtitlepage} \else \newenvironment{acknowledgments}{% \if@twocolumn \section*{\acknowledgmentsname}% \else \small \begin{center}% {\bfseries \acknowledgmentsname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi} {\if@twocolumn\else\endquotation\fi} \fi \newcommand\acknowledgmentsname{Acknowledgments}