

%\newboolean{binding}
%\setboolean{binding}{true}


%\ifthenelse {\boolean{binding}}
%% PDF suitable for binding
\documentclass[a4paper,10pt,twoside]{book}
%%}
%{
%% PDF suitable for reading on the web
%\documentclass[a4paper,10pt]{book}
%}

\usepackage{ifthen}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{multirow}
\usepackage{tikz} 
\usetikzlibrary{shapes,snakes}
\usetikzlibrary{shapes.gates.logic.US,trees,positioning,arrows}
\usepackage{subfigure}
\usepackage{amsfonts,amsmath,amsthm}
%\usepackage{algcompatible}
\usepackage{algorithm}
%\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{lastpage}
\usepackage{glossary}
\renewcommand{\baselinestretch}{1.5}
\makeglossary

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

%\ifthenelse {\boolean{binding}}
%% PDF suitable for binding
%\usepackage[left=1.5cm,right=4.0cm,top=1in,bottom=1in]{geometry}
%\usepackage[left=4.0cm,right=1.5cm,top=1in,bottom=1in]{geometry} % THIS ONE IS WRONG 07FEB2014
%}
%{
%% PDF suitable for reding on the web/ebook reader
\usepackage[inner=2.0cm,outer=2.0cm,bottom=1in,top=1in]{geometry}
%}



\newcommand{\chappap}{chapter}

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

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

%\pagenumbering{roman} 
\tableofcontents    
\listoffigures    
\listoftables
\listofalgorithms

%
\cleardoublepage


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

%
%\middlefoot{ } \outerfoot{{Page \bf\thepage}} % Body of manual has bolded page
                                              % numbers at outer edges
\pagenumbering{arabic}  % they are hindu not arabic        
\cfoot{Page \thepage\ of \pageref{LastPage}}
\lfoot{University of Brighton}  %% Year keeps fucking incrementing
\rfoot{R.P.Clark \today}
\lhead{Failure Mode Modular De-Composition}
\rhead{Ph.D 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 and Hybrid Systems}
\input{CH6_Software_Examples/software}

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

\chapter{Conclusion}
\input{CH8_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}
