-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tex
143 lines (117 loc) · 3.9 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
\documentclass[a4paper,12pt,twoside,openright]{report}
% information defines
\def\authorname{Oliver D.\ N.\ Hope\xspace}
\def\authorcollege{Jesus College\xspace}
\def\authoremail{[email protected]}
\def\dissertationtitle{Generalisable data-driven routing using Deep RL with GNNs}
\usepackage{epsfig,graphicx,verbatim,parskip,tabularx,setspace,xspace}
\usepackage[twoside,a4paper,lmargin=3cm,rmargin=4cm,tmargin=3cm,bmargin=3cm]{geometry}
\usepackage[UKenglish]{babel} % correct hyphenation and dates
\usepackage[backend=biber]{biblatex}
\usepackage{csquotes}
\usepackage{amsmath}
\usepackage{unicode-math} % loads fontspec too
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[Numbers={Lining,Proportional},RawFeature={+ss06}]{EB Garamond}
\setmonofont{inconsolata}
\setsansfont{Linux Biolinum O}
\setmathfont{Garamond-Math}
\usepackage{fancyhdr}
\usepackage[md]{titlesec} % section/chapter headings aren't bold
\usepackage[titles]{tocloft} % for modifying toc, titles makes titlesec happy
\usepackage{bm} % bold maths stuff
\usepackage{algorithm}
\usepackage{algcompatible}
\usepackage{algpseudocode}
\usepackage{longtable} % for acro alignment
\usepackage{acro} % for acronyms
\usepackage[hidelinks=true]{hyperref}
\usepackage{changepage}
\setlength{\headheight}{15.5pt}
% remove this when done
\usepackage{todonotes}
% fix comment alignment in algorithm blocks
\renewcommand{\Comment}[2][.525\linewidth]{%
\leavevmode\hfill\makebox[#1][l]{$\triangleright$~#2}}
% word count for declaration page
\usepackage{shellesc}
\newcommand{\texcount}[1]{
\ShellEscape{texcount -merge -sum -q -brief -total -0 #1.tex > #1.wc }
\input{#1.wc}
}
% remove bolding and add small caps to chapters in toc
\renewcommand\cftchapfont{\mdseries\scshape}
\renewcommand\cftchappagefont{\mdseries\scshape}
% fancy chapter styling https://tex.stackexchange.com/a/177236/36845
\newcommand*\HUGE{\Huge}
\newcommand*\chapnamefont{\normalfont\LARGE\MakeUppercase}
\newcommand*\chapnumfont{\normalfont\HUGE}
\newcommand*\chaptitlefont{\normalfont\HUGE}
\newlength\beforechapskip
\newlength\midchapskip
\setlength\midchapskip{\paperwidth}
\addtolength\midchapskip{-\textwidth}
\addtolength\midchapskip{-\oddsidemargin}
\addtolength\midchapskip{-1in}
\setlength\beforechapskip{18mm}
\titleformat{\chapter}[display]
{\normalfont\filleft}
{{\chapnamefont\chaptertitlename}%
\makebox[0pt][l]{\hspace{.8em}%
\resizebox{!}{\beforechapskip}{\chapnumfont\thechapter}%
\hspace{.8em}%
\rule{\midchapskip}{\beforechapskip}%
}%
}%
{25pt}
{\chaptitlefont}
\titlespacing*{\chapter}
{0pt}{40pt}{40pt}
% fancy headers
\fancyhead{} % clear all header fields
\fancyhead[RO]{\scshape\nouppercase\rightmark}
\fancyhead[LE]{\scshape\nouppercase\leftmark}
\fancyfoot{} % clear all footer fields
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.0pt}
\renewcommand{\footrulewidth}{0.0pt}
% add bibliography
\addbibresource{refs.bib}
% add acronyms
\acsetup{list/template=longtable,case-sensitive=false} % so acronym table is aligned
\input{sections/acronyms}
%% START OF DOCUMENT
\begin{document}
%% FRONTMATTER (TITLE PAGE, DECLARATION, ABSTRACT, ETC)
\pagestyle{empty}
\singlespacing
\input{sections/titlepage}
\onehalfspacing
\input{sections/declaration}
\singlespacing
\input{sections/abstract}
\pagenumbering{roman}
\setcounter{page}{0}
\pagestyle{fancy}
\tableofcontents
\listoffigures
\onehalfspacing
%% START OF MAIN TEXT
\input{sections/introduction}
\input{sections/background}
\input{sections/problem}
\input{sections/learning}
\input{sections/evaluation}
\input{sections/conclusions}
\appendix
\singlespacing
\cleardoublepage
\phantomsection
\markboth{List of Abbreviations}{}
\addcontentsline{toc}{chapter}{List of Abbreviations} % put acronyms page in toc
\printacronyms[name=List of Abbreviations]
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography} % put bibliography in toc
\printbibliography
\end{document}