%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To make formatting easy tell LaTeX what kind of document you want to write
% by changing the according {} to {#1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Which language do you want to write in
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%English
\newcommand{\EN}[1]{#1}
%German
\newcommand{\DE}[1]{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For print single or double page?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\single}[1]{#1}
\newcommand{\double}[1]{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Now this is followed by a lot of page and command definitions. For the beginning you 
% should be able to continue where you find the next comment section like this one.
% However, you might want to take a look a the definitions sometime to be able to use 
% them. Of course you can also add the defintions you needed yourself.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\single{\documentclass[12pt,a4paper,oneside,english]{book}}
\double{\documentclass[12pt,a4paper,twoside,english]{book}}

\usepackage[english]{babel}
%\usepackage[draft,breaklinks=true,colorlinks=false,dvips,bookmarks,pdffitwindow,pdfcenterwindow=true,pdfstartview=Fit]{hyperref}
%\usepackage[breaklinks=true,colorlinks=false,dvips,bookmarks,pdffitwindow,pdfcenterwindow=true,pdfstartview=Fit]{hyperref}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{setspace}
\usepackage{cite}
\usepackage{float,times} 
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsthm,latexsym}
\usepackage[dvips]{epsfig}
%\usepackage{subfigure}
\usepackage{rotating}
\usepackage{afterpage}
\usepackage{multirow}
\usepackage{array}

\usepackage[outputdir=obj]{minted}
\usepackage{newfloat}
\usepackage{xspace}
%! put the new-command after the inputenc package use, so 'ü' will not be shown as abomination ASCII -TF
	
\input{globalcommands.tex}
\newcommand{\DocuTitle}{Documentation of the LT16x32 System-on-Chip}

% format page layout.
\setlength{\topmargin}{0cm}
\setlength{\textwidth}{15cm}
\setlength{\textheight}{22cm}
\setlength{\oddsidemargin}{1cm}
\setlength{\evensidemargin}{0cm}

\setlength{\headheight}{15pt}
% \setlength{\voffset}{-0cm}
% \setlength{\topmargin}{0cm}
% \setlength{\headheight}{0.54cm}
% \setlength{\textheight}{23cm}
% % \setlength{\headsep}{1.5cm}
% %\setlength{\hoffset}{-2.54cm}
% \setlength{\hoffset}{0cm}
% \setlength{\oddsidemargin}{0.46cm}
% \setlength{\evensidemargin}{0.46cm}
% \setlength{\textwidth}{15cm}
% \setlength{\marginparsep}{0cm}
% \setlength{\marginparwidth}{1.54cm}

\setcounter{secnumdepth}{3}


% \setlength{\footskip}{1cm}
% \setlength{\parindent}{0cm}
% \setlength{\parskip}{1em}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
%\fancyhead[LO, RE]{\slshape \nouppercase{\leftmark}} % chapter titles
%\fancyhead[LE, RO]{\slshape \nouppercase{\leftmark}\\\nouppercase{\rightmark}} % section titles
\double{\fancyhead[LE]{\slshape \nouppercase{\leftmark}}} % chapter titles
\fancyhead[RO]{\slshape \nouppercase{\rightmark}} % section titles
\fancyfoot{} % clear all footer fields
\fancyfoot[C]{\thepage}


\usepackage[%dvips,
	colorlinks=false,
	bookmarks,
	pdffitwindow,
	pdfcenterwindow=true,
	pdfstartview=Fitpdftex,
	pdfauthor={Lasse Schnepel, Thomas Fehmel},
	pdftitle={\DocuTitle},
	pdfsubject={LT16x32 Documentation}, % one sentence summery
	pdfkeywords={Processor,Firmware-based Verification,Architecture design}, %comma-seperated keywords
	pdfproducer={Latex with hyperref},
	pdfcreator={}]{hyperref}

\begin{document}

% \EN{\selectlanguage{english}}
% \DE{\selectlanguage{german}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Here you have to start editing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\DocuTitle}
\author{Lasse Schnepel, Thomas Fehmel}
\date{2015}
\pagenumbering{arabic} 
\hyphenation{Bit-ebenen Gateprop Bit-ebene Fanin Boole-sche
  Partial-produkt-generator
  Code-inspektion
  Verifika-tions-ablauf
  IPC-Verifika-tions-ablauf
  Abhangig-keiten
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% title page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frontmatter
\maketitle
\tableofcontents

\mainmatter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Now this is followed by your chapters
% this usually starts with introduction and Fundamentals and then 
% continues with whatever you need or did
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\input{socscope}
\input{socarch}
\input{architecture}
\input{instructionset}
\input{interrupts}
\input{memory}
\input{guides}

\backmatter
\listoffigures 
\listoftables
%\listofcodefloat %triggers Errors for me, for whatever reason, but the pdf is generated nonetheless -TF

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{alphadin}
\bibliography{refs3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\end{document}
