-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.tex
More file actions
372 lines (360 loc) · 13.9 KB
/
header.tex
File metadata and controls
372 lines (360 loc) · 13.9 KB
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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
% comment out if working in vscode
% \RequirePackage[l2tabu]{nag} % Warns for incorrect (obsolete) LaTeX usage
% \documentclass[a4paper,11pt,leqno,oldfontcommands]{memoir} %add 'draft' to turn draft option on (see below)
%
%
% Adding metadata:
\usepackage{datetime}
\usepackage{ifpdf}
\ifpdf
\pdfinfo{
/Author (Author's name)
/Title (PhD Thesis)
/Keywords (One; Two;Three)
/CreationDate (D:\pdfdate)
}
\fi
% When draft option is on.
\ifdraftdoc
\usepackage{draftwatermark} %Sets watermarks up.
\SetWatermarkScale{0.3}
\SetWatermarkText{\bf Draft: \today}
\fi
%
% Declare figure/table as a subfloat.
\newsubfloat{figure}
\newsubfloat{table}
% Better page layout for A4 paper, see memoir manual.
\settrimmedsize{297mm}{210mm}{*}
\setlength{\trimtop}{0pt}
\setlength{\trimedge}{\stockwidth}
\addtolength{\trimedge}{-\paperwidth}
\settypeblocksize{634pt}{448.13pt}{*}
\setulmargins{4cm}{*}{*}
\setlrmargins{*}{*}{1.5}
\setmarginnotes{17pt}{51pt}{\onelineskip}
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{*}{2\onelineskip}{*}
\checkandfixthelayout
%
\frenchspacing
% Font with math support: New Century Schoolbook
\usepackage{fouriernc}
\usepackage[T1]{fontenc}
%
% UoB guidelines:
%
% Text should be in double or 1.5 line spacing, and font size should be
% chosen to ensure clarity and legibility for the main text and for any
% quotations and footnotes. Margins should allow for eventual hard binding.
%
% Note: This is automatically set by memoir class. Nevertheless \OnehalfSpacing
% enables double spacing but leaves single spaced for captions for instance.
\OnehalfSpacing
%
% Sets numbering division level
\setsecnumdepth{subsection}
\maxsecnumdepth{subsubsection}
%
% Chapter style (taken and slightly modified from Lars Madsen Memoir Chapter
% Styles document
\usepackage{calc,soul,fourier}
\makeatletter
\newlength\dlf@normtxtw
\setlength\dlf@normtxtw{\textwidth}
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{gray}{\color{white}\thechapter}%
}}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
{!}{\scshape\so\@chapapp}}\quad%
\raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][c]{% aka \rlap
\makebox[1cm][r]{\usebox\feline@chapter}%
}}
\makechapterstyle{daleifmodif}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
\renewcommand\chaptitlefont{\normalfont\Large\bfseries\scshape}
\renewcommand\chapternamenum{} \renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\color{gray}\chaptitlefont\raggedleft ##1\par}
}
\makeatother
\chapterstyle{daleifmodif}
%
% UoB guidelines:
%
% The pages should be numbered consecutively at the bottom centre of the
% page.
\makepagestyle{myvf}
\makeoddfoot{myvf}{}{\thepage}{}
\makeevenfoot{myvf}{}{\thepage}{}
\makeheadrule{myvf}{\textwidth}{\normalrulethickness}
\makeevenhead{myvf}{\footnotesize\textsc{\leftmark}}{}{}
\makeoddhead{myvf}{}{}{\footnotesize\textsc{\rightmark}}
\pagestyle{myvf}
%
% Oscar's command (it works):
% Fills blank pages until next odd-numbered page. Used to emulate single-sided
% frontmatter. This will work for title, abstract and declaration. Though the
% contents sections will each start on an odd-numbered page they will
% spill over onto the even-numbered pages if extending beyond one page
% (hopefully, this is ok).
\newcommand{\clearemptydoublepage}{\newpage{\thispagestyle{empty}\cleardoublepage}}
%
% Creates indexes for Table of Contents, List of Figures, List of Tables and Index
\makeindex
% \printglossaries below creates a list of abbreviations. \gls and related
% commands are then used throughout the text, so that latex can automatically
% keep track of which abbreviations have already been defined in the text.
%
% The import command enables each chapter tex file to use relative paths when
% accessing supplementary files. For example, to include
% chapters/brewing/images/figure1.png from chapters/brewing/brewing.tex we can
% use
% \includegraphics{images/figure1}
% instead of
% \includegraphics{chapters/brewing/images/figure1}
\usepackage{import}
% Add other packages needed for chapters here. For example:
\usepackage{lipsum} %Needed to create dummy text
\usepackage{amsfonts} %Calls Amer. Math. Soc. (AMS) fonts
%\usepackage{stmaryrd} %New AMS symbols
\usepackage{amsthm} %Calls AMS theorem environment
\usepackage{amssymb} %Calls AMS symbols
\usepackage{bm}
\usepackage[centertags]{amsmath} %Writes maths centred down
\usepackage{bbm}
%\usepackage{mathpazo}
%\usepackage{newlfont} %Helpful package for fonts and symbols
\usepackage{layouts} %Layout diagrams
\usepackage{graphicx} %Calls figure environment
\usepackage{longtable,rotating} %Long tab environments including rotation.
\usepackage[utf8]{inputenc} %Needed to encode non-english characters
%directly for mac
\usepackage{colortbl} %Makes coloured tables
%\usepackage{wasysym} %More math symbols
%\usepackage{mathrsfs} %Even more math symbols
\usepackage{float} %Helps to place figures, tables, etc.
\usepackage{verbatim} %Permits pre-formated text insertion
\usepackage{upgreek} %Calls other kind of greek alphabet
%\usepackage{latexsym} %Extra symbols
\usepackage[round,authoryear,sort]{natbib} %Calls bibliography commands
%\usepackage{apacite}
\usepackage[hyphens]{url} %Supports url commands
% \usepackage{etex} %eTeXÕs extended support for counters
% \usepackage{fixltx2e} %Eliminates some in felicities of the
%original LaTeX kernel
\usepackage[british]{babel} %For languages characters and hyphenation
\usepackage{color} %Creates coloured text and background
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[colorlinks=true,linkcolor=Black,citecolor=MidnightBlue,urlcolor=Cerulean,breaklinks]{hyperref} %Creates hyperlinks in cross references
\usepackage{memhfixc} %Must be used on memoir document
%class after hyperref
\usepackage{enumerate} %For enumeration counter
\usepackage{footnote} %For footnotes
\usepackage{microtype} %Makes pdf look better.
\usepackage{rotfloat} %For rotating and float environments as tables,
%figures, etc.
\usepackage{alltt} %LaTeX commands are not disabled in
%verbatim-like environment
\usepackage[version=0.96]{pgf} %PGF/TikZ is a tandem of languages for producing vector graphics from a
\usepackage{tikz} %geometric/algebraic description.
\usetikzlibrary{arrows,shapes,snakes,
automata,backgrounds,
petri,topaths} %To use diverse features from tikz
%
\usepackage{todonotes}
\usepackage{mathtools}
\usepackage{algorithm}%
\usepackage{algorithmicx}%
\usepackage[noend]{algpseudocode}%
\usepackage{authblk}
\usepackage{booktabs}
\usepackage{wrapfig}
\usepackage{multirow}
%\usepackage[style=long3col-booktabs,hyperfirst,nogroupskip,nopostdot,automake,toc]{glossaries} %Load glossaries package
\usepackage[style=long3col-booktabs,stylemods=longbooktabs,hyperfirst,nogroupskip,nopostdot,automake,toc,acronym,indexonlyfirst,automake]{glossaries-extra}
%\makeglossaries
%\usepackage{floatrow}
%Reduce widows (the last line of a paragraph at the start of a page) and orphans
% (the first line of paragraph at the end of a page)
\widowpenalty=1000
\clubpenalty=1000
%
% New command definitions for my thesis
%
\newcommand{\keywords}[1]{\par\noindent{\small{\bf Keywords:} #1}} %Defines keywords small section
\newcommand{\parcial}[2]{\frac{\partial#1}{\partial#2}} %Defines a partial operator
\newcommand{\vectorr}[1]{\mathbf{#1}} %Defines a bold vector
\newcommand{\vecol}[2]{\left( %Defines a column vector
\begin{array}{c}
\displaystyle#1 \\
\displaystyle#2
\end{array}\right)}
\newcommand{\mados}[4]{\left( %Defines a 2x2 matrix
\begin{array}{cc}
\displaystyle#1 &\displaystyle #2 \\
\displaystyle#3 & \displaystyle#4
\end{array}\right)}
\newcommand{\pgftextcircled}[1]{ %Defines encircled text
\setbox0=\hbox{#1}%
\dimen0\wd0%
\divide\dimen0 by 2%
\begin{tikzpicture}[baseline=(a.base)]%
\useasboundingbox (-\the\dimen0,0pt) rectangle (\the\dimen0,1pt);
\node[circle,draw,outer sep=0pt,inner sep=0.1ex] (a) {#1};
\end{tikzpicture}
}
\newcommand{\range}[1]{\textnormal{range }#1} %Defines range operator
\newcommand{\innerp}[2]{\left\langle#1,#2\right\rangle} %Defines inner product
\newcommand{\prom}[1]{\left\langle#1\right\rangle} %Defines average operator
\newcommand{\tra}[1]{\textnormal{tra} \: #1} %Defines trace operator
\newcommand{\sign}[1]{\textnormal{sign\,}#1} %Defines sign operator
\newcommand{\sech}[1]{\textnormal{sech} #1} %Defines sech
\newcommand{\diag}[1]{\textnormal{diag} #1} %Defines diag operator
\newcommand{\arcsech}[1]{\textnormal{arcsech} #1} %Defines arcsech
\newcommand{\arctanh}[1]{\textnormal{arctanh} #1} %Defines arctanh
%Change tombstone symbol
\newcommand{\blackged}{\hfill$\blacksquare$}
\newcommand{\whiteged}{\hfill$\square$}
\newcounter{proofcount}
\renewenvironment{proof}[1][\proofname.]{\par
\ifnum \theproofcount>0 \pushQED{\whiteged} \else \pushQED{\blackged} \fi%
\refstepcounter{proofcount}
\normalfont
\trivlist
\item[\hskip\labelsep
\itshape
{\bf\em #1}]\ignorespaces
}{%
\addtocounter{proofcount}{-1}
\popQED\endtrivlist
}
%
%
% New definition of square root:
% it renames \sqrt as \oldsqrt
\let\oldsqrt\sqrt
% it defines the new \sqrt in terms of the old one
\def\sqrt{\mathpalette\DHLhksqrt}
\def\DHLhksqrt#1#2{%
\setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0
\advance\dimen0-0.2\ht0
\setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%
{\box0\lower0.4pt\box2}}
%
% My caption style
\makeatletter
\newcommand{\mycaption}[2][\@empty]{
\captionnamefont{\scshape}
\changecaptionwidth
\captionwidth{0.9\linewidth}
\captiondelim{.\:}
\indentcaption{0.75cm}
\captionstyle[\centering]{}
\setlength{\belowcaptionskip}{10pt}
\ifx \@empty#1 \caption{#2}\else \caption[#1]{#2}
}
\makeatother
%
% My subcaption style
\makeatletter
\newcommand{\mysubcaption}[2][\@empty]{
\subcaptionsize{\small}
\hangsubcaption
\subcaptionlabelfont{\rmfamily}
\sidecapstyle{\raggedright}
\setlength{\belowcaptionskip}{10pt}
\ifx \@empty#1 \subcaption{#2}\else \subcaption[#1]{#2}
}
\makeatother
%
%An initial of the very first character of the content
\usepackage{lettrine}
\newcommand{\initial}[1]{%
\lettrine[lines=3,lhang=0.33,nindent=0em]{
\color{gray}
{\textsc{#1}}}{}}
\makeatother
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n} % for nicer looking mathcal fonts
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\newcommand{\Exp}[2][]{\mathbb{E}_{#1}\!\left[#2\right]}
\newcommand{\Var}[2][]{\mathrm{Var}_{#1}\!\left(#2\right)}
\newcommand{\Bern}[1]{\mathrm{Bernoulli}\!\left(#1\right)}
\newcommand{\Prob}[1]{\mathbb{P}\!\left(#1\right)}
\newcommand{\summ}[3][1]{\sum_{#2=#1}^{#3}}
\newcommand{\iid}{\overset{\text{iid}}{\sim}}
\newcommand{\N}[2][0]{\mathcal{N}\!\left(#1, #2\right)}
\newcommand{\Ind}[1]{\mathbbm{1}{\left\{#1\right\}}}
\newcommand{\CInd}[2]{\mathbbm{1}{\left\{#1\, \vert \, #2\right\}}}
\newcommand{\CProb}[2]{\mathbb{P}\left(#1 \, \vert \, #2\right)}
\newcommand{\CExp}[2]{\mathbb{E}\left[#1 \, \vert \, #2\right]}
\newcommand{\X}{\mathbf{X}}
\newcommand{\by}{\mathbf{y}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\bu}{\mathbf{u}}
\newcommand{\tmu}{\tilde{\mu}}
\newcommand{\tsigma}{\tilde{\sigma}^2}
\newcommand{\ugm}{\textnormal{\textmu g m}^{-3}}
\newcommand{\um}{\textnormal{\textmu m}}
\newcommand{\kgm}{\textnormal{kg m}^{-3}}
\newcommand{\kgs}{\textnormal{kg s}^{-1}}
\newcommand{\kgms}{\textnormal{kg m}^{-1}\textnormal{s}^{-1}}
\newcommand{\kgkms}{\textnormal{kg km}^{-1}\textnormal{s}^{-1}}
\newcommand{\mss}{\textnormal{m s}^{-2}}
\newcommand{\logt}{\log_{10}}
\newcommand{\solve}[1]{\textsc{solve}\left(#1\right)}
\newcommand{\pstrat}{\hat{p}_{\textrm{strat}}}
\newcommand{\soufr}{Soufri\`ere}
\newcommand{\lasoufr}{La Soufri\`ere}
\newcommand{\eyja}{Eyjafjallaj{\"o}kull}
\newcommand{\grimsvotn}{Gr\'{\i}msv\"{o}tn}
\newcommand{\dd}{\textnormal{d}}
\newcommand{\pdt}[1][]{\frac{\partial}{\partial t}}
\newcommand{\doiurl}[1]{\href{https://doi.org/#1}{#1}}
% Theorem styles used in my thesis
%
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[chapter]
\theoremstyle{plain}
\newtheorem{proposition}{Proposition}[chapter]
\theoremstyle{plain}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[chapter]
\theoremstyle{plain}
\newtheorem{lemma}{Lemma}[chapter]
\theoremstyle{plain}
\newtheorem{corollary}{Corollary}[chapter]
\theoremstyle{plain}
\newtheorem{resu}{Result}[chapter]
\theoremstyle{plain}
\newtheorem{remark}{Remark}[chapter]
\theoremstyle{plain}
\newtheorem{example}{Example}[chapter]
%
% Hyphenation for some words
%
\hyphenation{res-pec-tively}
\hyphenation{mono-ti-ca-lly}
\hyphenation{hypo-the-sis}
\hyphenation{para-me-ters}
\hyphenation{sol-va-bi-li-ty}
\hyphenation{vol-ca-nic}
\hyphenation{quan-ti-fying}
\hyphenation{ex-cee-dance}
\hbadness=10000
\vbadness=10000
\makeatletter
\renewcommand{\@pnumwidth}{2em}
\renewcommand{\@tocrmarg}{3em}
\makeatother