%%%%%%%%%%%%%%%%%%%%%%%%%%%   Document   %%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[notitlepage,oneside]{book}
% Pre-Ambule
% For Bibliography
\usepackage[sorting=none,natbib=true,citestyle=numeric-comp,backend=bibtex]{biblatex}
\addbibresource{../../bibliotheca/bibliography.bib}

% % Document
\usepackage{subfiles}
\usepackage{amsmath}
\usepackage{mathtools}
%\usepackage{cancel}
\usepackage{todo}

% Graphics
\usepackage{xcolor}
\usepackage{graphicx}
\graphicspath{{.}{../../figures/}}
\usepackage{epstopdf}

\usepackage{caption}
\usepackage{subcaption}
\usepackage[colorlinks=true]{hyperref}
\usepackage{cleveref}
\usepackage{grffile}

\usepackage[english]{babel}       % for proper word breaking at line ends
\usepackage[switch]{lineno}

%\usepackage{listings}
\usepackage{csquotes}
\usepackage[margin=1.0in]{geometry}
\usepackage[nobottomtitles]{titlesec}

\titleformat{\chapter}[hang] % shape
{\normalfont\bfseries\huge} % format
{\thechapter.} % label
{0.5ex} % sep
{
} % before-code
[
] % after-code

\setlength{\parindent}{0cm}
\newcommand*{\captionsource}[2]{%
  \caption[{#1}]{%
    #1%
    \\\hspace{\linewidth}%
    \textbf{Source:} #2%
  }%
}

% Shortcuts

% Math
\newcommand{\dif}[1]{\mathop{}\!\mathrm{d} #1}
\newcommand{\pdif}[1]{\mathop{}\!\mathrm{\partial} #1}


% Thesis titling
\def\thesistitle{Enhancing Timing Accuracy \\[0.3cm] in Air Shower Radio Detectors}
\def\thesissubtitle{}
\def\thesisauthorfirst{E.T.}
\def\thesisauthorsecond{de Boone}
\def\thesissupervisorfirst{dr. Harm}
\def\thesissupervisorsecond{Schoorlemmer}
\def\thesissecondreaderfirst{dr. Katherine}
\def\thesissecondreadersecond{Mulrey}
\def\thesisdate{2022-11}
\definecolor{radboud}{RGB}{227, 0, 11}

\begin{document}
\frontmatter
\begin{titlepage}
	\thispagestyle{empty}
	\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
	\center
	\textcolor{radboud}{\textsc{\Large Radboud Universiteit Nijmegen}}\\[.7cm]
	\includegraphics[width=25mm]{radboud/in_dei_nomine_feliciter}\\[.5cm]
	\textsc{Faculteit der Natuurwetenschappen, Wiskunde en Informatica}\\[0.5cm]

	\HRule \\[0.4cm]
	{ \huge \bfseries \thesistitle}\\[0.1cm]
	\textsc{\thesissubtitle}\\
	\HRule \\[.5cm]
	\textsc{\large Master's thesis Physics and Astronomy}\\[.5cm]

	\begin{minipage}{0.4\textwidth}
	\begin{flushleft} \large
	\emph{Author:}\\
	\thesisauthorfirst\space \textsc{\thesisauthorsecond}
	\end{flushleft}
	\end{minipage}
	~
	\begin{minipage}{0.4\textwidth}
	\begin{flushright} \large
	\emph{Supervisor:} \\
	\thesissupervisorfirst\space \textsc{\thesissupervisorsecond} \\[1em]
	\emph{Second Reader:} \\
	\thesissecondreaderfirst\space \textsc{\thesissecondreadersecond}
	\end{flushright}
	\end{minipage}\\[4cm]
	\vfill
	{\large \thesisdate}
	\clearpage
\end{titlepage}

%\newpage
%\hrule
%\bigskip

\tableofcontents
\clearpage
\mainmatter
\subfile{chapters/introduction.tex}

% Airshowers
\subfile{chapters/airshowers.tex}

% Timing
\subfile{chapters/timing.tex}

% Conclusion
\subfile{chapters/conclusion.tex}

%%%%%%%%%%%%%%%%%%%   Appendix and Bibliography   %%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\pagebreak[3]
%\phantomsection
%\subfile{appendix.tex}

%%% Print Bibliography
%\clearpage
\backmatter
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\printbibliography
\hrule

\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{Todos}
\todos
\end{document}
