
\documentclass[a4paper,10pt]{book}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{tikz} 
\usetikzlibrary{shapes,snakes}
\usetikzlibrary{shapes.gates.logic.US,trees,positioning,arrows}
\usepackage{subfigure}
\usepackage{amsfonts,amsmath,amsthm}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{lastpage}
\usepackage{glossary}
\renewcommand{\baselinestretch}{1.5}
\makeglossary

%% fix for hyperref bug in algorithm package
\newcommand{\theHalgorithm}{\thechapter.\arabic{algorithm}}
\usepackage{ifthen}
\newboolean{pld}
\setboolean{pld}{false} % boolvar=true or false
\newboolean{paper}
\setboolean{paper}{false} % boolvar=true or false
\input{style}
\usepackage{hyperref}
%\begin{document}
\pagestyle{fancy}
\fancyhf{}
\cfoot{Page \thepage}

\newcommand{\chappap}{chapter}

\begin{document}
\input{titlepage/titlepage}

\clearpage

%\rhead{{\small\bf Failure Mode Modular De-Composition}}         
%\rfoot{{\small\bf PhD Thesis : R.P. Clark } }   
 
% Contents
% --------
 
%\cfoot{Page \thepage}                   % Contents page numbers centred
 
\clearpage
%\input{colophon/colophon}
\clearpage

\tableofcontents    
\listoffigures    
\listoftables
\listofalgorithms

%
\cleardoublepage

% Main text
% ---------

%
%\middlefoot{ } \outerfoot{{Page \bf\thepage}} % Body of manual has bolded page
                                              % numbers at outer edges
\pagenumbering{arabic}                        % Arabic page numbers hereafter
\cfoot{Page \thepage\ of \pageref{LastPage}}
\lfoot{University of Brighton 2012}  %% Year keeps fucking incrementing
\rfoot{R.P.Clark \today}
\lhead{Failure Mode Modular De-Composition}
\rhead{PhD Thesis}
%\begin{document}

%\typeout{>>--------------------->> introduction}
\chapter{Introduction}
\input{CH1_introduction/copy}

\chapter{Failure Mode Effect Analysis}
\input{CH2_FMEA/copy}

\chapter{FMEA Criticism}
\input{CH3_FMEA_criticism/copy}

\chapter{Failure Mode Modular Decomposition}
\input{CH4_FMMD/copy}

\chapter{FMMD Examples} % {Examples of FMMD applied to electronic circuits}
\input{CH5_Examples/copy}

\chapter{Applying FMMD to Software}
\input{CH5_Examples/software}

\chapter {FMMD Metrics Critiques Exceptions and Evaluation}
\input{CH6_Evaluation/copy} 

\chapter{Conclusion}
\input{CH7_Conclusion/copy}

\appendix
\input{appendixes/detailed_analysis}
\input{appendixes/formal}
\input{appendixes/algorithmic}

\nocite{alggraph}
\nocite{ince}

%%% ONLY NEEDED IF WE HAVE APPENDIXES
%\chapter{Conclusion}
%\input{CH8_finish_appendixes/copy}


%\chapter{FMMD tool : Design Issues}
%
%reference the MSC document and describe the Java extension classes.
%Software documentation for fmmd tool.
%
%\typeout{ ----------------  Euler Diagrams represented as graphs}
%\chapter {Euler Diagrams \\ Represented as graphs}
%\input{eulerg/eulerg}
%
%\chapter{Fast Zone Discrimination Algorithm}
%\input{fzd/fzd}
%
%\chapter{Milli Volt Amp with Safety Resistor}
%\input{millivoltamp/millivoltamp}
%
%\chapter{A detailed look at the safety systems required by industrial burner controller}
%\input{burner/burner}
%%\glossary{name={test glossary name}, description={test glossary entry description}}

\printglossary
\addcontentsline{toc}{chapter}{Glossary}

\bibliographystyle{plain}
\bibliography{../vmgbibliography,../mybib}

\end{document}
