-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble.tex
340 lines (306 loc) · 13.9 KB
/
preamble.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
% Constants (double check these before submitting!)
\newcommand{\thesistitle}{Computational~Pipelines for Spatio-Temporal Analysis of Team Invasion Games}
\newcommand{\me}{Anj Simmons}
%\newcommand{\pubyear}{\the\year{}}
\newcommand{\pubyear}{2019}
% Essential packages
\usepackage{amsmath, amssymb, amsthm, amstext}
\usepackage[font=small, labelfont=bf, margin=20pt]{caption}
\usepackage{graphicx,color}
% Deakin specifies 45 mm margin on binding side, and 20 mm trim margin.
\usepackage[left=45mm, right=20mm, top=33mm, bottom=33mm, headheight=14pt]{geometry}
% https://tex.stackexchange.com/questions/3001/list-sections-of-chapter-at-beginning-of-that-chapter
% nohints option needed to workaround bug in minitoc that can add an extra blank page when combined with float package
% https://tex.stackexchange.com/questions/194295/minitoc-package-adds-extra-page-when-used-with-float-and-lastpage-packages
\usepackage[nohints]{minitoc}
% Custom hook to generate table of contents at start of each chapter
% (and control this from a centralised location).
% Toggle true/false to control whether refs per chapter or all together
\newif\ifchrefs
\chrefstrue % Note: Overridden by thesis-includes.tex (auto-generated by Makefile)
% \chrefsfalse
\newcommand{\startchapter}{\minitoc \newpage}
\newcommand{\startchapternobreak}{\minitoc} % no page break variant
% https://tex.stackexchange.com/questions/345163/references-at-the-end-of-each-chapter
% Custom hook I added to the start of each included chapter
\newcommand{\openchapterblock}{
\ifchrefs
\begin{refsection}
\fi
}
\newcommand{\closechapterblock}{
\ifchrefs
\printbibliography[title=Chapter References]
\end{refsection}
\fi
}
% Counters
\newcounter{contribnum} % Used in Chapter 1 and Chapter 8 to keep count of contribution number when spread over multiple lists.
\usepackage{subfig}
\usepackage{float} % gives option to force figure to appear at a certain location with [H].
\usepackage{flushend}
\usepackage{rotating}
\usepackage{multirow}
\usepackage{setspace}
% https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url
\usepackage[hyphens]{url}
\usepackage{pdflscape} % provides landscape environment
\usepackage{changepage} % https://tex.stackexchange.com/questions/35933/indenting-a-whole-paragraph
% Optional customisation packages
\usepackage{mathpazo}
%\usepackage{algorithm, algpseudocode} % we will use algorithm2e instead
% Required by LaTeX code generated by Pandoc
\usepackage{longtable,booktabs}
% Underline word-wrap
\usepackage{soul}
\usepackage{alltt} % Like verbatim, but allows commands/macros.
% https://tex.stackexchange.com/questions/12703/how-to-create-fixed-width-table-columns-with-text-raggedright-centered-raggedlef
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash}p{#1}}
% https://tex.stackexchange.com/questions/2441/how-to-add-a-forced-line-break-inside-a-table-cell
% For table column in "Prevalence of Improper De-identification Methods" section.
\newcommand{\specialcell}[2][c]{%
\begin{tabular}[#1]{@{}L{4cm}@{}}#2\end{tabular}}
% For "Analysis of trade-off between de-identification strength versus utility of data after de-identification" table.
% Is deliberately wider than table columns in order to prevent automatic line breaks (but can insert these manually).
\newcommand{\specialcellb}[2][c]{%
\begin{tabular}[#1]{@{}L{3cm}@{}}#2\end{tabular}}
% == Begin dependencies for SigSpatial paper ==
% for pseudocode
\usepackage[ruled,vlined]{algorithm2e}
% https://tex.stackexchange.com/questions/22798/nice-looking-empty-set - real numbers set
%\usepackage{amssymb} % already imported
% http://mirror.aarnet.edu.au/pub/CTAN/macros/latex/contrib/braket/braket.pdf
\usepackage[]{braket}
% https://tex.stackexchange.com/questions/64204/mutliple-inputs-with-line-breaking
\newlength\mylen
\newcommand\myinput[1]{%
\settowidth\mylen{\KwIn{}}%
\setlength\hangindent{\mylen}%
\hspace*{\mylen}#1\\}
% == End SigSpatial depdendencies ==
% Use of titlesec removed, as it leaves ugly white-space to left of
% headings that wrap, near where the heading number should have been.
% Use secnumdepth counter in title.tex to control numbering instead.
% \usepackage[compact]{titlesec}
% \titlespacing{\section}{0pt}{16pt}{0pt}
% \titlespacing{\subsection}{0pt}{14pt}{0pt}
% \titlespacing{\subsubsection}{0pt}{12pt}{0pt}
% Page layout
\parindent 0pt
\parskip 0.20in
\numberwithin{equation}{section}
\renewcommand{\bibname}{References}
\renewcommand{\contentsname}{Contents}
\footskip 70pt
%------------------------------------------------------------------------- %
% Stuff needed to use PDF figures inside this document
\usepackage{times}
\usepackage{xspace}
\usepackage{graphicx}
\graphicspath{{figs/}}
%---------------------------------------------------------------------------%
% Markup macros for proof-reading
\usepackage[normalem]{ulem} % for \sout
\usepackage{xcolor}
\newcommand{\ra}{$\rightarrow$}
\newcommand{\ugh}[1]{\textcolor{red}{\uwave{#1}}} % please rephrase
\newcommand{\ins}[1]{\textcolor{blue}{\uline{#1}}} % please insert
\newcommand{\del}[1]{\textcolor{red}{\sout{#1}}} % please delete
\newcommand{\chg}[2]{\textcolor{red}{\sout{#1}}{\ra}\textcolor{blue}{\uline{#2}}} % please change
%------------------------------------------------------------------------- %
% Put edit comments in a really ugly standout display
\usepackage{ifthen}
\usepackage{amssymb}
\newif\ifwip
\wiptrue % TOGGLE true/false to show or hide work in progress
\newboolean{showcomments}
\setboolean{showcomments}{true} % TOGGLE true/false to show or hide mess
%\setboolean{showcomments}{false}
\ifthenelse{\boolean{showcomments}}
{\newcommand{\note}[2]{
\fbox{\bfseries\sffamily\scriptsize#1}
{\sf\small$\blacktriangleright$\textit{#2}$\blacktriangleleft$}
}
}
{\newcommand{\note}[2]{}
\newcommand{\version}{}
}
\newcommand{\here}{\note{***}{CONTINUE HERE}}
\newcommand\rv[1]{\note{RV}{#1}} % Flags for specific reviewers (supervisor)
\newcommand\as[1]{\note{AS}{#1}} % Flags for specific reviewers (me)
\newcommand\todo[1]{\note{TODO}{#1}}
\newcommand\review[1]{\note{REVIEW}{#1}}
\newcommand\nb[1]{\note{Note}{#1}}
\newcommand\isec[1]{\note{Implicit Section}{\textbf{#1}}} % implicit section
\newcommand\thought[1]{\note{Thought}{#1}} % implicit section
%-------------------------------------------------------------------------
\newif\ifcrossref
\crossreftrue % TOGGLE true/false to show or hide crossrefs
%\crossreffalse % For individual chapters, hide for now, as the cross references break unless whole thesis is generated.
% Thus ensuring that they can be used in such a way that they
% will not interfere with the main text when invisible.
\newcommand{\chref}[1]{\ifcrossref Chapter~\ref{#1}\fi}
\newcommand{\secref}[1]{\ifcrossref Sec.~\ref{#1}\fi}
% Variants to insert a space before the ref, but only if visible,
% \newcommand{\chpref}[1]{\ifcrossref \ (Chapter~\ref{#1}\fi)}
% \newcommand{\secpref}[1]{\ifcrossref \ (Sec.~\ref{#1})\fi}
\newcommand{\figref}[1]{Fig.~\ref{#1}}
\newcommand{\appendixref}[1]{Appendix~\ref{#1}}
\newcommand{\appendixsecref}[1]{Appendix Sec.~\ref{#1}}
\newcommand{\appendixtabref}[1]{Appendix Table~\ref{#1}}
% https://tex.stackexchange.com/questions/42619/x-mark-to-match-checkmark/42620#42620
\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\cmark}{\ding{51}}
\newcommand{\xmark}{\ding{55}}
%-------------------------------------------------------------------------
\newcommand{\bs}{\symbol{'134}} % backslash
\newcommand{\us}{\symbol{'137}} % underscore
\newcommand{\ie}{\emph{i.e.}\xspace}
\newcommand{\eg}{\emph{e.g.}\xspace}
\newcommand{\etal}{\emph{et al.}\xspace}
%-------------------------------------------------------------------------
% Command to prevent hyphenation of word (e.g. of Dates)
% https://en.wikibooks.org/wiki/LaTeX/Boxes#makebox_and_mbox
\newcommand{\dt}[1]{\mbox{#1}}
%-------------------------------------------------------------------------
% Common terms that could change (Removed, now use glossary instead)
%\newcommand{\arf}{AF}
%\newcommand{\afl}{AFL}
% https://tex.stackexchange.com/questions/86666/how-to-create-both-list-of-abbreviations-and-list-of-nomenclature-using-nomencl
%\usepackage[acronym]{glossaries}
\usepackage[toc, nonumberlist]{glossaries}
\newglossaryentry{af}{
name = {Australian Rules Football}, % Always spell out in full
description = {The game of Australian Rules Football played between two competing teams with an oval ball on an oval field (see \secref{sec:information-available-to-coaches})},
}
\newglossaryentry{afl}{
name = {AFL},
description = {Australian Football League, the game of Australian Rules Football played at the national elite level in accordance with the official rules set by the AFL Commission. Informally used as a synonym for Australian Rules Football},
}
\newglossaryentry{centrebounce}{
name = {centre bounce},
description = {An event marking the start of play in AFL. The umpire bounces the ball in the centre of the field and ruck players attempt to hit it towards their own team}
}
\newglossaryentry{kick-in}{
name = {kick-in},
description = {An event in AFL where after a team scores a behind, the opposition is provided with possession of the ball to kick in from the end of the field towards the opposite end of the field}
}
% \newglossaryentry{goal}{ % Removed, definition should be obvious.
% name = Goal,
% description = TODO,
% }
\newglossaryentry{behind}{
name = {behind},
description = {A kick that goes between two outer goal posts rather than the two inner goal posts. Unlike a goal which is worth 6 points, a behind is only awarded 1 point},
}
\newglossaryentry{quarter}{
name = {quarter},
description = {One of the four periods that comprise an AFL match. Each quarter lasts approximately 20 minutes, but is extended during times that the ball is not in play},
}
\newglossaryentry{spatio-temporal}{
name = {spatio-temporal},
description = {relating to both spatial (location) and temporal (time) dimensions},
}
\newglossaryentry{gps}{
name = {GPS},
description = {The Global Positioning System of satellites operated by US Department of
Defense. Informally used to refer to other forms of Global Navigation Satellite Systems (GNSS) such as GLONASS operated by Russia. Position tracking devices utilising GPS or other GNSS systems often integrate additional microsensors such as accelerometers, gyroscopes, and magnetometers to enhance accuracy during short rapid movements occurring between readings. Local Positioning Systems such as Catapult ClearSky can fulfil a similar role by using radio beacons placed at a stadium rather than satellites}
}
\newglossaryentry{gis}{
name = {GIS},
description = {Geographic Information System}
}
% \newglossaryentry{interchange}{
% name = Interchange,
% description = TODO,
% }
% \newglossaryentry{substitute}{
% name = Substitute,
% description = TODO,
% }
% \makeglossaries % Won't work without run of custom external command to build glossaries
\makenoidxglossaries
\newcommand{\arf}{\gls{af}}
\newcommand{\afl}{\gls{afl}}
\newcommand{\soccer}{Association Football}
\newcommand{\centrebounce}{\gls{centrebounce}}
\newcommand{\centrebounces}{\glspl{centrebounce}}
% Non-breaking space
\newcommand{\nbs}{~}
% Below configuration adapted from my supervisor's thesis template. Headings/headers looked good, so I avoided modifying it.
%---------------------------------------------------------------------------
% Customise header to show chapter - see fancyhdr.pdf
\usepackage{fancyhdr}
\pagestyle{fancy} % default ``plain''
\fancyhf{} % clear all rules
\rhead{} % default - chapter
\lhead{\nouppercase{\textsc{\leftmark}}} % default - section
\renewcommand{\headrulewidth}{0.4pt} % thin line
%\renewcommand{\footrulewidth}{0.4pt} % thin line
\makeatletter
%\renewcommand{\chaptermark}[1]{\markboth{\textsc{\@chapapp} \thechapter: #1}{}}
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername \xspace \thechapter. #1}}{}}
\cfoot{} % remove the page number in the middle of footer
%\rfoot{\thepage}
\fancyfoot[R]{\thepage}
%\fancyhead[R]{\thepage}
%% The following commands force page numbers to right at start of new chapter
%% Needed because Latex will override fancy headers on first page of new chapters
\fancypagestyle{plain}{\fancyhf{} % clear all header and footer fields
%\fancyhead[R]{\thepage}
%\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername \xspace \thechapter. #1}}{}}
%\renewcommand{\headrulewidth}{0.4pt} % thin line
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[R]{\thepage}} % page number in centre
\makeatother
% Remove the Warning: \headheight is too small (12.0pt):
\setlength{\headheight}{15pt}
% used for wide space in lists of definitions
\newcommand{\hs}{\hspace{1em}}
\usepackage{pdfpages}
%\usepackage[pdftitle={title here},pdfpagemode=UseOutlines,
%colorlinks=true,pdfauthor={author here},pdfpagetransition=Dissolve,
%bookmarks=true,pdftex=true,plainpages=false,pdfpagelabels,backref]{hyperref}
%PDF hyper-linking (set colors to black for printing)
\usepackage[colorlinks]{hyperref}
\hypersetup{colorlinks,
linkcolor=black,
filecolor=black,
urlcolor=black,
citecolor=black}
\usepackage{listings}
\usepackage{color}
\usepackage{textcomp}
\lstset{
%float=p,
%floatplacement=p,
%boxpos=t,
% backgroundcolor=\color{lbcolor},
tabsize=2,
% rulecolor=,
language=Java,
basicstyle=\scriptsize,
%basicstyle=\footnotesize,
upquote=true,
aboveskip={\bigskipamount},
belowskip={\medskipamount},
lineskip={\smallskipamount},
columns=fixed,
showstringspaces=false,
breaklines=true,
numbers=left,
captionpos=b,
abovecaptionskip={\bigskipamount},
belowcaptionskip={\medskipamount},
% prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
frame=single,
identifierstyle=\ttfamily,
keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color[rgb]{0.133,0.545,0.133}\bfseries,
stringstyle=\color[rgb]{0.627,0.126,0.941}
% stringstyle=\ttfamily
}