% options for the class scrbook of the KOMA script bundle
%
% headsepline: line separating the header from the text body
% openany: any page can be used to begin a new chapter
% openright: every chapter begins with a new right page
% cleardoubleempty: pagestyle empty if \cleardoublepage is used
%
\documentclass[12pt,twoside,a4paper,dvips,headsepline,openany,cleardoubleempty]{scrbook}
\usepackage[german,british]{babel}
% package geometry to modify the page layout
% (should be preferred w.r.t. changing the parameters manually)
\usepackage[top=3cm,bottom=3cm,inner=2.5cm,outer=2.5cm,bindingoffset=0.5cm]{geometry}
% package of the KOMA script bundle to define the behaviour of head and foot
\usepackage[automark]{scrpage2}
\usepackage{graphicx}
\usepackage{amssymb,amsmath}
% package for producing 'publication quality tables'
\usepackage{booktabs}
% package to produce tables with a fixed width
\usepackage{tabularx}
% package to have automatic page breaking for tables
\usepackage{longtable}
% packages for rotating
%\usepackage[dvips]{rotating}
\usepackage{packages/isorot/isorot} % extension of the rotating package
\rotdriver{dvips}
% package to align numbers in a table w.r.t. to the 'decimal point'
% \usepackage{dcolumn}
% package to draw Feynman diagrams
\usepackage{feynmp}
% package to use simple if-conditions 
\usepackage{ifthen}
\newboolean{debug}
\setboolean{debug}{false}

%\newcounter{dummy} % need for correct PDF hyperlinks and bookmarks :-(

% if the driver option 'draft' is added all hypertext options will
% be disabled

\usepackage[linktocpage,colorlinks,urlcolor=blue,draft]{hyperref}
\hypersetup{%
  pdftitle = {Measurement of the Proton Structure Function F2 at Low Q2 at HERA},
  pdfauthor = {Olaf Behrendt},
  pdfkeywords = {F2, proton structure function, dissertation},
  pdfsubject = {Dissertation, University of Dortmund},
  pdfcreator = {Adobe-Acrobat-Distiller},
  pdfproducer = {LaTeX with hyperref},
% pdfcreated = {\today},  % not supported yet
% pdfmodified = { }       % not supported yet
}

%%
%% *** 'driver' options for \usepackage{hyperref} ***
%%
%% hypertex - produces dvi and ps files with symbolic links (default)
%% dvips    - produces ps and pdf files with symbolic links
%%            to get pdf file run: ps2pdf file.ps
%% (this options can be taken also directly from \documentclass option dvips)
%% ps2pdf   - for older versions of ps2pdf, not needed any more
%%            use option dvips instead
%%

% definition of head and foot for the package scrpage2
% (see chapter 4 of the KOMA documentation scrguien.pdf)

\pagestyle{scrheadings}
\clearscrheadfoot
\ohead{\pagemark}
\ihead{\headmark}
\ofoot{}

% definition of caption style for figures and tables
% (see chapter 3 of the KOMA documentation scrguien.pdf)

\setkomafont{caption}{\slshape}
%\setcapindent{1em}

% changing the font of the section headings to roman
%\setkomafont{sectioning}{\rmfamily\bfseries}

% definition of the style of the footnotes
% (see chapter 3.6.3 of the KOMA documentation scrguien.pdf)
\deffootnote{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
\setlength{\defaultaddspace}{0.2em}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}

% definition of the style for the chaper heading in the appendix
% (see chapter 3.7 of the KOMA documentation scrguien.pdf)
\newcommand*{\appendixmore}{%
\renewcommand*{\chapterformat}{%
\appendixname~\thechapter\autodot\enskip}
\renewcommand*{\chaptermarkformat}{%
\appendixname~\thechapter\autodot\enskip}
}

% defintion of commands

\input{phd_def}

\begin{document}

\bibliographystyle{phdstyle}

\include{tex/title}       %  title page

\cleardoublepage

\pagenumbering{roman}

\include{tex/abstracts}   %  abstracts in English and German

\cleardoublepage

\pdfbookmark[0]{Table of Contents}{c:toc}
\tableofcontents

\cleardoublepage

\pagenumbering{arabic}
\setcounter{page}{1}

\include{tex/preface}     %  Preface

\include{tex/dis}         %  Deep Inelastic Scattering

\include{tex/h1}          %  The H1 Experiment

\include{tex/basics}      %  Basics of the Cross Section Measurement

\include{tex/selection}   %  Data Selection and Treatment

\include{tex/results}     %  Results of the Measurement

\include{tex/summary}     %  Summary

\cleardoublepage

\include{tex/appendices}  %  Appendices

\pdfbookmark[0]{Bibliography}{c:bib}
%\addcontentsline{toc}{chapter}{Bibliography}
\addtocontents{toc}{\protect\contentsline{chapter}{\protect\numberline{}Bibliography}{\thepage}{c:bib.0}}
\bibliography{bibliography/bibliography}

\cleardoublepage

\selectlanguage{german}
\include{tex/acknowledgements}  %  Acknowledgements

\end{document}
