% Master thesis template for Ghent University (2021)
%
%
% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
% !! MAKE SURE TO SET XeLaTex AS LATEX ENGINE !!
% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
% !! For overleaf: !!
% !! 1. click gear icon in top right !!
% !! 2. select `XeLaTex` in "latex engine" !!
% !! 3. click "save project settings" !!
% !! !!
% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
%
%
% History
% 2014 Doctoral Thesis of Bruno Volckaert
% 2017 Adapted to master thesis by Jerico Moeyersons
% 2018 Cleanup by Merlijn Sebrechts
% 2021 Update by Marleen Denert and Merlijn Sebrechts with feedback from Leen Pollefliet
% 2022, 2023 Updates by Merlijn Sebrechts
%
% Latest version
% https://github.com/galgalesh/masterproef-template
%
% Note: remove `openany` for printed version
\documentclass[12pt,a4paper,openany,dutch,english]{extbook}
\usepackage[a4paper,includeheadfoot,margin=2.50cm]{geometry}
% By default, LaTeX tries to stretch whitespace between paragraphs on a page in order to reduce whitespace at the end of the page. This sometimes gives ugly results. The following command disables that stretching.
\raggedbottom % Don't reduce whitespace at the end of a page.
\renewcommand{\baselinestretch}{1.2} % stretch horizontal space between everything by 20%
\usepackage[hyphens]{url} % Break line on hyphens in long urls
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{pdfpages}
\usepackage{enumitem}
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[toc,page]{appendix}
\usepackage{fontspec}
% Don't indent table of contents, list of figures, and list of tables
\usepackage{tocloft}
\setlength{\cftsecindent}{0pt} % Remove indent for \section in Table of Contents
\setlength{\cftsubsecindent}{0pt} % Remove indent for \subsection in Table of Contents
\setlength{\cftfigindent}{0pt} % remove indentation from figures in List of Figures
\setlength{\cfttabindent}{0pt} % remove indentation from tables in List of Tables
\usepackage{parskip} % Add space between two paragraphs and don't indent the first line of the paragraph
% To generate fake lorem ipsum text
\usepackage{lipsum}
%
% UGent style guide
%
\setmainfont[
Path=fonts/,
BoldFont =UGentPannoText-SemiBold.ttf,
ItalicFont =UGentPannoText-Normal.ttf,
ItalicFeatures={FakeSlant=0.3},
BoldItalicFont=UGentPannoText-SemiBold.ttf,
BoldItalicFeatures={FakeSlant=0.3},
]{UGentPannoText-Normal.ttf}
\urlstyle{same} % Also use the default font for URLs
% If you want left justified text, uncomment the line below.
%\usepackage[document]{ragged2e} % Left justify all text
% Style Chapter titles so they have the chapter number in grey.
\usepackage{color}
\definecolor{chaptergrey}{rgb}{0.5,0.5,0.5}
\usepackage[explicit, pagestyles]{titlesec}
\titleformat{\chapter}[display]{\bfseries}{\color{chaptergrey}\fontfamily{lmr}\fontsize{80pt}{100pt}\selectfont\thechapter}{0pt}{\Huge #1}
\titlespacing*{\chapter}{0pt}{-80pt}{30pt}
% Header showing chapter number and title and footer showing page number
\newpagestyle{fancy}{%
\sethead{} % left
{} % center
{\Large\thechapter~~\chaptertitle} %right
\setfoot{} % left
{\thepage} % center
{} %right
\setheadrule{0pt}
}
\pagestyle{fancy}
% Header showing chapter title and footer showing page number
\newpagestyle{numberless}{%
\sethead{} % left
{} % center
{\Large\chaptertitle} %right
\setfoot{} % left
{\thepage} % center
{} %right
\setheadrule{0pt}
}
% We use the package `minted` for modern code highlighting.
\usepackage[newfloat,chapter]{minted}
%\SetupFloatingEnvironment{listing}{name=Codefragment, listname=Lijst van codefragmenten} % lang:dutch
\SetupFloatingEnvironment{listing}{name=Code Fragment, listname=List of Code Fragments} % lang:english
\usemintedstyle{pastie} % for other highlighting color schemes, see https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted#Reference_guide
\PassOptionsToPackage{hyphens}{url}
\usepackage{hyperref}
\usepackage{url}
\usepackage[numbers]{natbib} % For bibliography; use numeric citations
\bibliographystyle{IEEEtran}
\usepackage[nottoc]{tocbibind} % Put Bibliography in ToC
%
% Defines \checkmark to draw a checkmark
%
\usepackage{tikz}
\def\checkmark{\tikz\fill[scale=0.4](0,.35) -- (.25,0) -- (1,.7) -- (.25,.15) -- cycle;}
%
% For tables
%
\usepackage{booktabs}
\usepackage{array}
\usepackage{ragged2e} % for '\RaggedRight' macro (allows hyphenation)
\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}}
%
% Support for splitting Dutch words correctly
%
\usepackage{polyglossia}
%\setdefaultlanguage[babelshorthands=true]{dutch} % lang:dutch
\setmainlanguage{english} % lang:english
% Manually specify additional hypnations for words
%
% Translated strings. If these aren't set, the English words are used.
%
% \addto\captionsenglish{\renewcommand{\contentsname}{Inhoudsopgave}} % lang:dutch
% Fix error "Package hyperref Warning: The anchor of a bookmark and its parent's must not be the same. Added a new anchor on ..."
\newcommand{\sectionbreak}{\phantomsection}
% \renewcommand\appendixtocname{Bijlagen} % lang:dutch
% \renewcommand\appendixpagename{Bijlagen} % lang:dutch
\usepackage[toc,acronym]{glossaries} % for list of acronyms
\makeglossaries % start internal list of acronyms
%
% Set the title and your name
%
\input{personal_data}
%
% END OF HEADER
% The actual latex document content starts here.
%
\begin{document}
\frontmatter
\pagestyle{empty}
% Download the cover sheet from Plato
\includepdf{cover-sheet.pdf}
\include{chapters/1_confidentiality.tex}
\include{chapters/2_acknowledgment.tex}
\include{chapters/3_disclaimer-oral-exam.tex}
\include{chapters/4_abstract.tex}
\include{chapters/5_extended_abstract.tex}
\tableofcontents\newpage
\listoffigures\newpage
\listoftables\newpage
\include{chapters/6_list_of_acronyms.tex}
\listoflistings\newpage
%
% Include the main chapters of the thesis below
% Note: it's best to avoid spaces in filenames as Latex might complain about them.
%
\mainmatter
\pagestyle{fancy} % Use header
\include{chapters/7_introduction.tex}
\include{chapters/8_chapter_1.tex}
\include{chapters/8_chapter_2.tex}
\include{chapters/8_chapter_3.tex}
\include{chapters/8_chapter_4.tex}
\include{chapters/9_conclusion.tex}
\include{chapters/10_future-work.tex}
\include{chapters/11_ethical-reflection.tex}
\include{chapters/12_bibliography.tex}
\include{chapters/13_appendices.tex}
\pagestyle{numberless}
\pagestyle{empty}
\include{chapters/12_appendices.tex}
\end{document}