\documentclass[12pt, a4paper, oneside, final]{matt} %matt is a style I got off Alex Rowe which makes the Chapters and headers look great - you need to make sure you copy matt.cls and matt.sty to the folder that this document is in

%%%%%%%PACKAGES%%%%%%%%%%%%%%
\usepackage{setspace}
\usepackage{hyperref}
%\usepackage{bibcontents}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{sidecap} %puts caption by side of figure - annoyingly 'renewcommand caption' doesn't work in this environment so you have to enter \small in manually every time (and the 'Figure 1.1' is in large text).
\usepackage{ifthen} %req for sidecap to work
%\usepackage{wrapfig}
\usepackage{rotating}
\usepackage{longtable}
\usepackage{supertabular}
\usepackage{booktabs}
%%%%%%%END PACKAGES%%%%%%%%%%%%%%

%%%%%%%NEW COMMANDS%%%%%%%%%%%
%%%%%%%%%COMMANDS (ALEX ROWE)%%%%%%%
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
%\newcommand{\Caption}[1]{\caption{\small #1}}
\newcommand{\Chapter}[1]{\chapter{\sc #1} }
\newcommand{\Section}[1]{\section{\sc #1} }
\newcommand{\Subsection}[1]{\subsection{\sc #1} }
\newcommand{\Subsubsection}[1]{\subsubsection{\sc #1} }
\newcommand{\Chapterstar}[1]{\chapter*{\sc #1} }
%%%%%%%%%END COMMANDS (ALEX ROWE)%%%%%%%
%%%%%%%%%COMMANDS (MOSTYN BROWN)%%%%%%%
\newcommand{\ec}[0]{\textit{E. coli}}
\newcommand{\rs}[0]{\textit{R. sphaeroides}}
\newcommand{\va}[0]{\textit{V. alginolyticus}}
\newcommand{\bs}[0]{\textit{B. subtilis}}
\newcommand{\sm}[0]{\textit{S. meliloti}}
\newcommand{\qpd}[0]{quadrant photodiode}
\newcommand{\yi}[0]{CheY$_1$}
\newcommand{\yii}[0]{CheY$_2$}
\newcommand{\yiii}[0]{CheY$_3$}
\newcommand{\yiv}[0]{CheY$_4$}
\newcommand{\yv}[0]{CheY$_5$}
\newcommand{\yvi}[0]{CheY$_6$}
\newcommand{\ai}[0]{CheA$_1$}
\newcommand{\aii}[0]{CheA$_2$}
\newcommand{\aiii}[0]{CheA$_3$}
\newcommand{\aiv}[0]{CheA$_4$}
\newcommand{\aiiiaiv}[0]{CheA$_3$A$_4$}
\newcommand{\bi}[0]{CheB$_1$}
\newcommand{\bii}[0]{CheB$_2$}
\newcommand{\flimi}[0]{FliM$_1$}
\newcommand{\flimii}[0]{FliM$_2$}
\newcommand{\flimt}[0]{FliM$^T$}
\newcommand{\cheopi}[0]{\textit{che}Op$_1$}
\newcommand{\cheopii}[0]{\textit{che}Op$_2$}
\newcommand{\cheopiii}[0]{\textit{che}Op$_3$}
\newcommand{\od}[0]{OD$_{700}$}
\newcommand{\vm}[0]{V$_M$}
% $\mu$m
% $\sim$
% $\pm$
% $\Delta$
% $^\circ$
% \cite{kojima2008cpd, roujeinikova2008csc}
% a \href{http://weblearn.ox.ac.uk/site/medsci/bioch/collaborate/armitagelab/mbrown/resources/videos/}{video} of swimming \rs{} available in Appendix ~\ref{sec:Literature and Videos})
% \Subsection{\texorpdfstring{Copy Numbers of CheY$_{3}$/$_{4}$/$_{6}$ per Cell}{Copy Numbers of CheY{3}/{4}/{6} per Cell}}
% \textit{T}$_{max}$
\newcommand{\degc}{\ensuremath{^\circ}C} %http://anthony.liekens.net/index.php/LaTeX/DegreesNotation
\newcommand{\p}[0]{/pIND4}
\renewcommand{\figurename}{\small Figure}
\renewcommand{\tablename}{\small Table}

%%%%%%%%%END COMMANDS (MOSTYN BROWN)%%%%%%%
%%%%%%%END NEW COMMANDS%%%%%%%%

%%%%%%%DIMENSIONS (ALEX ROWE)%%%%%%%%%%%
\textwidth 150mm %5.9inches
\topmargin -2mm
\headheight 0mm
\headsep 12mm
\textheight 230mm
\footskip 20mm
\setlength{\evensidemargin}{-2mm}
\setlength{\oddsidemargin}{10mm}
%%%%%%%%%END DIMENSIONS (ALEX ROWE)%%%%%%%%

\hypersetup{
	hypertexnames=false, %tip from pg 86 Not so short intro to Latex - means that my index won't work (but I don't have one)
	pdftitle = {Controlling Flagellar Motor Rotation in \textit{Rhodobacter sphaeroides}},
	pdfauthor = {Mostyn Brown mostynbrown@hotmail.com},
	pdfsubject = {Molecular Motors},
	pdfkeywords = {flagellar, molecular motor, clutch, brake, stopping angles, Rhodobacter, Mostyn Brown}}


\bibliographystyle{mark}
\begin{document}

%%%%%%%%FRONT MATTER%%%%%%%
%%%
\pagestyle{empty}
\include{chapterx/title}
%%%

%%%
\pagestyle{plain}
\pagenumbering{roman}
\include{chapterx/abstract}
\include{chapterx/declaration}
\include{chapterx/publications}
\include{chapterx/acknowledgements}
\include{chapterx/abbreviations}
%\include{chapterx/preface}
\include{chapterx/dedication}
\pagestyle{headings}
\pdfbookmark[0]{Contents}{Contents}\tableofcontents %from http://www.math.upenn.edu/tex_docs/latex/hyperref/slides.pdf
\clearpage
%%%
%%%%%%%%END FRONT MATTER%%%%%%%

%%%%%%%%MAIN MATTER%%%%%%%%
\onehalfspacing    %%%Comment out for single spacing   %\onehalfspacing
\pagenumbering{arabic}

\Chapter{Life at Low Reynolds Number}
\label{ch:Life at Low Reynolds Number}
\input{chapter1/chapter1}

\Chapter{Materials and Methods}
\label{ch:Materials and Methods}
\input{chapter2/chapter2}

\Chapter{Wild-Type Motor Output: Speed, Torque and Stops}
\label{ch:Wild-Type Motor Output: Speed, Torque and Stops}
\input{chapter3/chapter3}

\Chapter{Fundamental Motor Control}
\label{ch:Fundamental Motor Control}
\input{chapter4/chapter4}

\Chapter{Motor Control at the Molecular Level}
\label{ch:Motor Control at the Molecular Level}
\input{chapter5/chapter5}

\Chapter{The Stop Mechanism}
\label{ch:The Stop Mechanism}
\input{chapter6/chapter6}

\Chapter{Discussion and Future Work}
\label{ch:Discussion and Future Work}
\input{chapter7/chapter7}


\cleardoublepage
\phantomsection %see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tocbibind
\addcontentsline{toc}{chapter}{\sc Bibliography} 
\bibliography{bibs/allpapers}
%%%%%%%%END MAIN MATTER%%%%%%%%

%%%%%%%%APPENDIX%%%%%%%%%%
\appendix %from now on, instead of 'Chapter 1' you get 'Appendix A'
\chapter[\sc Appendix - Media Recipes and Reagents]{\sc Media Recipes and Reagents}
\label{app:appendix_a}
\input{appendix/appendix_a}

\chapter[\sc Appendix - Molecular Microbiology]{\sc Molecular Microbiology}
\label{app:appendix_b}
\input{appendix/appendix_b}

\chapter[\sc Appendix - XXX]{\sc XXX}
\label{app:appendix_c}
\input{appendix/appendix_c}

\chapter[\sc Digital Appendix - Online Resources]{\sc Online Resources}
\label{app:appendix_d}
\input{appendix/appendix_d}
%%%%%%%%END APPENDIX%%%%%%

\end{document}
