%% Skeleton LaTeX2e file for the preparation of my thesis. 
%%  conforms to the guidelines of University of Colorado at Boulder and the princeton thesis guidelines (see http://amath.colorado.edu/documentation/LaTeX/thesis/sample/Mythesis.pdf and http://www.princeton.edu/~artarch/guideline.pdf, resp.) 
%% created July 2006, by Benjamin Auffarth.
%%
%% Initially I borrowed heavily from the thesis templates on http://www.ce.cmu.edu/~kijoo/thesis.html
%% the affirmation statement was copy-edited from Sonja Engmann's thesis as found on studip
%%
%% About editing .tex files: 
%% I used TeXShop (which is for mac) for creating and compiling this file. Alternatively there is LyX
%% TeXShop can be downloaded at http://www.uoregon.edu/~koch/texshop/
%% To make it run, you first need to install a lot of other packages (most comfortably using the program i-Packages, which is available at http://ii2.sourceforge.net/)
% This file compiles with settings (Typeset) LaTeX, TeX and Ghostscript
%% a good introduction to TeX is available at http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf 
%% a good online help can be found at http://www.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/ltx-2.html
%% 
%% If you want to use this template for your thesis you will have to change only slightly. Indicated "change this here"

% document specifications. preamble
\documentclass[12pt,a4paper,titlepage,onecolumn,twoside,openright,babel,english,german]{book}
\pagestyle{headings}
\usepackage[applemac]{inputenc} % telling explicitly, this was produced on a mac (might help, not sure)
\usepackage{makeidx} % for the index at the end; mark 
\usepackage{txfonts}                     % Public Times New Roman text & math font
%\usepackage{amssymb}  % for mathematical formulas
\usepackage{fancyhdr}  % nicer headers (cf. not so short introduction to tex)
\usepackage[tocindex,hyper]{apacite} % apa style citations with hyper-referenced authors' index
%\usepackage{verbatim} % for inclusion of simple code lines
\usepackage{listings} % for inclusion of code files; supports matlab
\usepackage{setspace} % for changing spacing within the document
\usepackage{rotating}
\usepackage{url}  % for nicely formatted urls in bibliography

% for nicer figure captions
\usepackage[small,normal,bf,up]{caption}
\renewcommand{\captionfont}{\small\itshape}

%% Define a new 'leo' style for the package that will use a smaller font.
\makeatletter
\def\url@leostyle{%
  \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
\makeatother
%% Now actually use the newly defined style.
\urlstyle{leo}

% for the reference.tex
%\usepackage{alltt}
%\usepackage{color}
%\usepackage{fullpage}
    
%\definecolor{string}{rgb}{0.7,0.0,0.0}
%\definecolor{comment}{rgb}{0.13,0.54,0.13}
%\definecolor{keyword}{rgb}{0.0,0.0,1.0}

\lstset{language=Matlab,  basicstyle=\tiny}

\pagestyle{fancy} % chapter headings are in lowercase

\bibliographystyle{apacite}  % don't leave this out if you want to use the apacite package
% (due to a bug in latex: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2281)

\usepackage{graphicx,psfrag,color,hyperref}

%% check if you are compiling under latex or pdflatex, and include the appropriate graphics package
%\ifx\pdftexversion\undefined
% \usepackage[dvips]{graphicx,color,psfrag} % for eps graphic files
% \RequirePackage[plainpages=true]{hyperref}
%%\usepackage{color}
%\else
%\usepackage[pdftex]{graphicx,color,psfrag}
%\RequirePackage[hyperindex,plainpages=false]{hyperref}  % do I need colored hyperreferencing for pdfs? 
%\def\pdfBorderAttrs{/Border [0 0 0] } % No border arround Links
%\fi
% please note that the hyperref package has to be loaded last in the preamble! 
% turning internal references into hyperlinks: p. 73



\pdfpagewidth=\paperwidth  % adjust paper size
\pdfpageheight=\paperheight


\doublespacing % double line spacing

\makeindex


% the following command has to be last in the preamble! 
% turning internal references into hyperlinks: p. 73

\begin{document}
\frontmatter % should be the first tag after begin of document


%%%%%%% change this here:  
\newcommand{\myname}{Benjamin Joachim Auffarth}
\newcommand{\mytitle}{Investigation into differences of monkey and human eye movements}
\newcommand{\degree}{Bachelor of Science}
\newcommand{\supervisor}{Prof. Dr. Peter K\"onig}
\newcommand{\cosupervisor}{MSc Selim Onat}
\newcommand{\matrikelnummer}{904882}

% found at http://www.tug.org/TeXnik/mainFAQ.cgi?file=layouts/examples#header
%  Chapter without a leading "Chapter". If you want this titles without a leading "Chapter" 
\makeatletter
\renewcommand\thechapter{\arabic{chapter}}
\def\@makechapterhead#1{%
%  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
        \par\nobreak
        \vskip 20\p@
      \fi
    \fi
    \interlinepenalty\@M
    \Huge \bfseries \thechapter\ #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother


% fancy headers (copied from not so short introduction to tex)
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\ #1}{}}
\fancyhf{}  % delete current header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}  % space for the rule
\fancypagestyle{plain}{%
	\fancyhead{}  % no headers on plain pages
	\renewcommand{\headrulewidth}{0pt} % and the line
	}


\include{Title}

\include{Affirmation}  % Eidesstattliche Erklärung

  \newpage
  \pagenumbering{roman} \setcounter{page}{1}  % this is the first counted page
  \include{Abstract}

\include{Acknowledgments}

   
% insert the table of contents
\tableofcontents
        
\listoffigures % be sure you used the \caption tag with all of them
\listoftables % ... and them as well (illustrating creative use of proximal deixis. Meant are floating bodies)


% here starts the main part
\mainmatter % comes right before the first chapter of the thesis
\include{Introduction}
  
\include{Methods}

\include{Results}

\include{Discussion}

%

%%%%%%%%%%%%% EXAMPLES
%%%%%%% FIRST
%example for captions of figures
%\begin{figure}
%\begin{center}
%\caption{}
%\end{center}
%\end{figure}
%%%%%%% SECOND
%example of internal referencing
%\newpage
%\label{firstpage}some text which is referenced later % show labeling
%\newpage
%cf.~Fig.~5\\
%see page \pageref{firstpage} for some text
%\newpage
%something
%\newpage


% bibliography and appendix follow the same page-numbering rules as regular chapters. 
% references
\appendix
\begin{singlespacing} % line spacing 1

%\newpage % that's where we want them to be: on a new page!
\bibliography{monkeys}

% commented for faster compilation. Uncomment to see it in the pdf
\include{Documentation}

\include{Aufklaerung}

\include{fdl}

% Index
% here the keys with their pointers will be; keys are indicated in the text by \index{key}. See "a not so short introduction into LaTeX page 67

\printindex[autx]  % authors' index. See author indexing options (apacite.pdf)
\printindex % index of topics; use the key{} command

\end{singlespacing}

\end{document}
