% Zur Verfügung gestellt von Johannes Woske, IT2010, j.woske@gmail.com
\documentclass[
	12pt, %Schriftgröße
	a4paper,
	liststotoc, %Inhaltsverzeichniseinträge für Listen (z.B. Abbildungen)
	bibtotoc, %Inhaltsverzeichniseinträge f+r Quellen
	pointlessnumbers, %Entfernt Punkt hinter Gliederungsnummern
    USenglish, %Sprachpaket
	headsepline, %Headertrennlinie
%	footsepline, %Footertrennlinie
	twoside %einseitiges Druckformat
	]{scrbook} %Dokumentenklasse (Koma-Script)
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[USenglish]{babel}
\usepackage{url}
\usepackage{graphicx} %Bilder einfügen
%\usepackage{pdfpages} %PDF einfügen
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage[right]{eurosym} %Euro-Zeichen
\usepackage{amssymb}
\usepackage{pdfpages}
\usepackage{cite} %Quellenangaben
\usepackage[ 
   colorlinks,        % Links ohne Umrandungen in zu wählender Farbe 
   linkcolor=black,   % Farbe interner Verweise 
   filecolor=black,   % Farbe externer Verweise 
   citecolor=black,    % Farbe von Zitaten 
   urlcolor=black	% Farbe von Links
]{hyperref} %Verlinkungen
\usepackage[USenglish]{translator}
\usepackage{blindtext} % Lorem-Ipsum-Plugin
%Glossar-Paket laden
\usepackage[
	nonumberlist, %keine Seitenzahlen anzeigenscrbook.cls
	acronym,      %ein Abkürzungsverzeichnis erstellen
	toc,          %Einträge im Inhaltsverzeichnis
	%section      %im Inhaltsverzeichnis auf section-Ebene erscheinen
	]
{glossaries}
\usepackage[printonlyused]{acronym}
\usepackage{csquotes}
\usepackage{booktabs}
%\usepackage{struktex}
\usepackage{verbatim}
%\usepackage{tabularx}
\usepackage{ltablex}\keepXColumns
\usepackage{makecell}
\usepackage{enumitem}
\newcommand{\bc}[1]{{\centering\bf #1}}
%\newcommand{\myref}[1]{{(see~\autoref{#1}~\q{\nameref{#1}})}}
\newcommand{\myref}[1]{{(see~\autoref{#1})}}
\newcommand{\q}[1]{{\enquote{#1}}}


\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}


\makeatletter
\renewcommand{\@chapapp}{}% Not necessary...
\newenvironment{chapquote}[2][2em]
  {\setlength{\@tempdima}{#1}%
   \def\chapquote@author{#2}%
   \parshape 1 \@tempdima \dimexpr\textwidth-2\@tempdima\relax%
   \itshape}
  {\par\normalfont\hfill--\ \chapquote@author\hspace*{\@tempdima}\par\bigskip}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% Studentenname
\newcommand{\studentName}{Seedorf, Sebastian}
%%%%%%%%%%%% Typ der Arbeit
\newcommand{\type}{Master Thesis}
%%%%%%%%%%%% Thema
\newcommand{\topic}{Detection of Traffic Lights in Urban Traffic Using a Convolutional Neural Network (CNN)}
%%%%%%%%%%%% Matrikelnummer
\newcommand{\matrikel}{5204360}
%%%%%%%%%%%% Erstbetreuer
\newcommand{\erstBetreuer}{Prof. Dr. Daniel Goehring}
%%%%%%%%%%%% Zweitbetreuer
\newcommand{\zweitBetreuer}{Prof. Dr. Dr. (h.c.) habil. Raúl Rojas}
%%%%%%%%%%%% Jahrgang
\newcommand{\jahrgang}{2017}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{listings,xcolor}
\usepackage{cleveref} %Codeanzeige
\definecolor{dkgreen}{rgb}{0,.6,0}
\definecolor{dkblue}{rgb}{0,0,.6}
\definecolor{dkyellow}{cmyk}{0,0,.8,.3}

\lstset{
    numbers=left, 
    numberstyle=\tiny, 
    numbersep=5pt,
    breaklines=true,
    frame=single,
    escapeinside={(*@}{@*)}, %nicht anzuzeigende Ausdrücke, z.B. für Labels
    language=sh,
    basicstyle=\ttfamily\fontsize{10}{12}\selectfont,
    keywordstyle    = \color{dkblue},
    stringstyle     = \color{red},
    identifierstyle = \color{dkgreen},
    commentstyle    = \color{gray},
    emph            =[1]{php},
    emphstyle       =[1]\color{black},
    emph            =[2]{if,and,or,else},
    emphstyle       =[2]\color{dkyellow}
    } 
    
\colorlet{punct}{red!60!black}
\definecolor{background}{HTML}{EEEEEE}
\definecolor{delim}{RGB}{20,105,176}
\colorlet{numb}{magenta!60!black}
\lstdefinelanguage{json}{
    basicstyle=\normalfont\ttfamily,
    numbers=left,
    numberstyle=\scriptsize,
    stepnumber=1,
    numbersep=8pt,
    showstringspaces=false,
    breaklines=true,
    frame=lines,
    backgroundcolor=\color{background},
    literate=
     *{0}{{{\color{numb}0}}}{1}
      {1}{{{\color{numb}1}}}{1}
      {2}{{{\color{numb}2}}}{1}
      {3}{{{\color{numb}3}}}{1}
      {4}{{{\color{numb}4}}}{1}
      {5}{{{\color{numb}5}}}{1}
      {6}{{{\color{numb}6}}}{1}
      {7}{{{\color{numb}7}}}{1}
      {8}{{{\color{numb}8}}}{1}
      {9}{{{\color{numb}9}}}{1}
      {:}{{{\color{punct}{:}}}}{1}
      {,}{{{\color{punct}{,}}}}{1}
      {\{}{{{\color{delim}{\{}}}}{1}
      {\}}{{{\color{delim}{\}}}}}{1}
      {[}{{{\color{delim}{[}}}}{1}
      {]}{{{\color{delim}{]}}}}{1},
}

\makeatletter
\AtBeginDocument{%
  \let\c@lstlisting\c@table
  \let\c@figure\c@lstlisting
  \let\thefigure\thelstlisting
  \let\ftype@lstlisting\ftype@figure % give the floats the same precedence
  
  
  \let\ftype@lstlisting\ftype@figure
  \renewcommand*{\ext@figure}{lot}
  %\let\c@figure\c@table
  \let\ftype@figure\ftype@table
  \let\listoftableandfigures\listoftables
  \renewcommand*\listtablename{Tables and Figures}
}
\makeatother


\makeatletter \def\cleardoublepage{\clearpage\if@twoside
\ifodd\c@page\else \hbox{} \vspace*{\fill}
\thispagestyle{empty} \newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi} \makeatother


% Seitenabstände definieren
\geometry{verbose,tmargin=3.5cm,bmargin=3.5cm,lmargin=3.5cm,rmargin=2.5cm}
\linespread{1.2}

% Witwe und Waise
\clubpenalty = 10000 \widowpenalty = 10000 \displaywidowpenalty = 10000 

\newcommand{\footfigref}[1]{\footnote{Abb. \ref{#1} auf Seite \pageref{#1}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% BEISPIEL BILD
%\begin{figure}[h]
%   \includegraphics[scale=0.8]{AlphaBeta_02.png}
%   \label{fig:alphabeta}       %fig:ID
%   \caption{Parametertests}    %Bildunterschrift
%\end{figure}\\
%%%%%%%%%% BILDVERWEIS IM TEXT MIT FUSSNOTE
%\footfigref{fig:alphabeta}     %fig:ID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%falsche Default-Silbentrennung überschreiben
%\include{hyphenation}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Ein eigenes Symbolverzeichnis erstellen
\newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols}

%Den Punkt am Ende jeder Beschreibung deaktivieren
\renewcommand*{\glspostdescription}{}

%Glossar-Befehle anschalten
\makeglossaries

%Diese Befehle sortieren die Einträge in den
%einzelnen Listen:
%makeindex -s datei.ist -t datei.alg -o datei.acr datei.acn
%makeindex -s datei.ist -t datei.glg -o datei.gls datei.glo
%makeindex -s datei.ist -t datei.slg -o datei.syi datei.syg

%\include{glossar}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% Dokumenteninhalt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

%Titelblatt
\include{01-title}

\pagenumbering{Roman}%römische Seitenzahlen

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% Abstract

\include{02-abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% Inhaltsverzeichnis
\cleardoublepage
\addcontentsline{toc}{chapter}{Table of Contents}

\setcounter{tocdepth}{3}
\tableofcontents

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% Abbildungsverzecihnis 
%\listoffigures
%\addcontentsline{toc}{chapter}{Abbildungsverzeichnis}
%\listoftables
%\lstlistoflistings
\listoftableandfigures


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% Glossar ausgeben
\include{03-acronym}

\cleardoublepage

\pagenumbering{arabic} %arabische Seitenzahlen

\cleardoublepage

\include{04-content}

\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%
% Quellen
%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{Roman}%römische Seitenzahlen
\setcounter{page}{6}
\bibliographystyle{ieeetr}
\bibliography{04a11-requirement-analysis.bib}
% backup 02-abstract,04a01-requirement-analysis,04a02-yolo,04a03-datasets,04a21-implementation-init,04a22-implementation-changes,04a31-experiments,04a-41-conclusion
% backup 02-abstract,04a11-requirement-analysis,04a12-yolo,04a13-datasets,04a21-implementation-init,04a22-implementation-changes,04a31-experiments,04a-41-conclusion
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Eidesstattliche Erklärung
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\thispagestyle{empty}

\include{05-statutory-declaration}

\end{document}
