jamie stevens'
code


PhD Thesis LaTeX style
For my PhD thesis, I wanted a style which was different to anyone else's, so I spent some time making a personal style file. This style has since been adopted by quite a few more PhD students in the Physics school at the University of Melbourne. Feel free to use any or all of the style for your own work. Although my PhD is completed and I can't change the style, I'm always on the lookout for good-looking LaTeX styles, so if you have improvements/suggestions for this style, I'd love to hear about them!

New! Get the style file for my PhD thesis style here. Simply copy this file into the same directory as your LaTeX file, and put the command
\usepackage{phdthesis}
at the top of your document, after the \documentclass{book} command, and before the \begin{document} command. If you don't want your thesis to look exactly the same as mine, please scroll down and look at the style file's code.

A sample double page spread from my PhD thesis
My title page, and a chapter page from my PhD thesis

Page style
The individual page style, including the headers, footers and page numbers are all defined using the standard LaTeX packages fancyhdr and psboxit, and the following code:

\usepackage{psboxit}
\PScommands
\usepackage{fancyhdr}

%% first reset the headers and footers
\fancyhead{}
\fancyfoot{}
%% make the odd pages have the section name on the top right
\fancyhead[RO]{\sffamily\bfseries \rightmark}
%% make the even pages have the chapter name on the top left
\fancyhead[LE]{\sffamily\bfseries \leftmark}

%% page nums on the bottom in a nice box
%% even side pages
\fancyfoot[LE]{\psboxit{box 0.8 setgray fill}
{\framebox[10mm][c]{\rule{0cm}{4mm}\color{black}{\bfseries \thepage}}}}
%% odd side pages
\fancyfoot[RO]{\psboxit{box 1 setgray fill}
{\hspace{\textwidth}\psboxit{box 0.8 setgray fill}
{\framebox[10mm][c]{\rule{0cm}{4mm}\color{black}{\bfseries \thepage}}}}}

%% make the bottom line above the page number box
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\footruleskip}{0mm}

%% bring the style into effect
%% (must come after all the fancyhead and fancyfoot stuff)
\pagestyle{fancy}

%% now redefine the plain style pages (chapter pages, contents pages)
%% to have the same page number stuff on the bottom
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[RO]{\psboxit{box 1 setgray fill}
{\hspace{\textwidth}\psboxit{box 0.8 setgray fill}
{\framebox[10mm][c]{\rule{0cm}{4mm}\color{black}{\bfseries \thepage}}}}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.5pt}
}

%% this next section (till \makeatother) makes sure that blank pages
%% are actually completely blank, cause they're not usually
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
	\hbox{}
	\vspace*{\fill}
	\thispagestyle{empty}
	\newpage
	\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

The comments in this code should be enough to understand what is going on in general, but look at the manuals for fancyhdr and psboxit to understand what each command does. Basically I'm using psboxit to make little boxes with Postscript code. Note that when I'm making the box on the odd side pages, I have to push the filled box across to the right-hand side of the page with a box that has no filling.

Equation numbers
I wanted something to spruce up the same-old equation numbers that are produced by LaTeX, and the style with the little rounded rectangles is what I came up with. Some people like this style, some hate it, and I'm only mildly happy with them - it's an improvement if you want something different, but there has to be something better. Still, if you like it, here's how to do it. I should say that this isn't all my own work, and it builds on work that Donald Arseneau has done. This solution requires the LaTeX packages amsmath and fancybox. This code should be placed near the top of any document, as I've noticed that it does not work if used after the fancypage stuff.

\usepackage{amsmath}
\usepackage{fancybox}

\def\tagform@#1{\maketag@@@{\cornersize{0.8}\ovalbox{
\ignorespaces\sffamily{#1}\unskip\@@italiccorr}}}

Chapter and section style
This is most definitely not my own work. The package quotchap is in my opinion the best looking chapter style file I saw while looking for the one to use for my thesis, and I highly recommend it. There are multiple options for this package - I have used the avantgarde option. To make my chapter style, I used:

\usepackage[avantgarde]{quotchap}
To make the quote appear in the chapter heading, place the quote in the savequote environment before giving the \chapter{} command, like this:

\begin{savequote}[10pc]
\sffamily
Smoke whirls\\
After the passage of a train.\\
Young foliage.
\qauthor{Shiki Masaoka (1867-1902)}
\end{savequote}
\chapter{Star Formation in HIPASS Galaxies}\label{sfringalaxies}

To ensure that the quote appears next to the chapter number, and not far above it, use the code:

\renewcommand\chapterheadstartvskip{\vspace*{-5\baselineskip}}

To make my section heading style, with the line beneath the heading, I used the titlesec package, and the following code:

\usepackage[calcwidth]{titlesec}
\titleformat{\section}[hang]{\sffamily\bfseries}
 {\Large\thesection}{12pt}{\Large}[{\titlerule[0.5pt]}]

Title page
I also made a title page style file that created the title page when the \maketitle command. This style as presented below is relevant for theses made at the University of Melbourne, but is obviously easily adaptable - change the name of the logo, the University, the description etc. This style has an option, acidfree which when specified makes the text "Produced on acid-free paper" appear at the bottom of the title page. You should copy this code into a separate file called, for example, titlepage_melbourne_uni.sty.

%% This style file was created by Jamie Stevens on 09/05/2005
%% It allows you to put the UniMelb logo on the top of your title
%% page, as well as keeping all the rest of the maketitle options intact.

%% You'll need the A3_CMYK.eps file in your thesis directory for this
%% style to work properly.

%% This style file is called by 
%%    \usepackage[options]{titlepage_melbourne_uni}
%% where options can be:
%%     acidfree = puts ``Produced on acid-free paper'' 
%%                at the bottom of the page

\ProvidesPackage{titlepage_melbourne_uni}[2005/05/09]
\RequirePackage{graphicx}
\newsavebox{\acidfreepaper}
\DeclareOption{acidfree}{
\sbox{\acidfreepaper}{\rmfamily Produced on acid-free paper}
}
\DeclareOption*{
\sbox{\acidfreepaper}{}
}
\ProcessOptions
\renewcommand{\maketitle}{
\thispagestyle{empty}
\begin{center}
\includegraphics[scale=0.65]{A3_CMYK}\\
\vspace{2cm}
{\sffamily\Huge \@title}\\
\vspace{1cm}
{\rmfamily\Large \@author}\\
\vspace{1cm}
{\rmfamily Submitted in total fulfilment of the requirements}\\
{\rmfamily of the degree of Doctor of Philosophy}\\
\vspace{1cm}
{\rmfamily \@date}\\
\vspace{1cm}
{\rmfamily School of Physics}\\
{\rmfamily The University of Melbourne}\\
\vspace{5cm}
\usebox{\acidfreepaper}
\end{center}
\cleardoublepage
\setcounter{page}{1}
}

To create the title page, put the following code in your document right after the \begin{document}, with some obvious changes.

\author{Jamie Brett Stevens}
\title{Neutral Hydrogen in Nearby Galaxy Groups}
\date{February 2005}
\maketitle



this page last modified @ 2007/09/11 18:04
website maintained by jamie stevens, school of mathematics and physics, university of tasmania
this page, its contents and style are the responsibility of the author, and do not necessarily reflect the opinions of the university of tasmania
all images on this site are copyright jamie stevens unless specified otherwise
best viewed at resolutions higher than 800x600 (this centre thing is 600 pixels wide) and with a recent browser
Firefox 2