-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tex
277 lines (204 loc) · 5.89 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
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
\documentclass[11pt,a4paper,twoside]{book}
%when compiling offline, run bibtex main then pdflatex main
\usepackage[a4paper,twoside,top=2.5cm,bottom=2.5cm,left=4cm,right=3cm]{geometry}
\raggedbottom
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{csquotes}
\usepackage{multirow}
\usepackage{appendix}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{verbatim}
\usepackage[printonlyused]{acronym}
\usepackage[nottoc]{tocbibind} %contents setup
%SI units etc
\usepackage{siunitx}
\makeatletter
\patchcmd{\verbatim@input}{\@verbatim}{\scriptsize\@verbatim}{}{}
\newcommand{\vel}[1]{\qty{#1}{\meter\per\second}}
\DeclareSIUnit{\foot}{ft}
%siunitx package v. useful for nicely typset units
\newcommand{\ic}[1]{\enquote*{#1}} %making quotations appear proper.
%font styles
\usepackage{sectsty}
\allsectionsfont{\sffamily} %make titles sans-serif but body serif, nice innit
%\usepackage{cfr-lm} %includes 'oldstyle' digits but mucks up \texttt
\usepackage{textgreek} %proper typesetting of greek letters in text
\usepackage{lmodern} %latin modern, like computer modern but unicode or something
%figures and subfigures
\usepackage{caption}
\usepackage{subcaption}
%english
\usepackage[UKenglish]{babel}
\usepackage[level]{datetime}
%paragraph styles
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
%page headings
\usepackage{fancyhdr}
%section numbering
\setcounter{secnumdepth}{3}
%References
\usepackage{fancyref}
\usepackage{hyperref}%pass the option 'hidelinks' if you want to suppress the outlines around links.
\hypersetup{
pdflang={en-UK},
pdftitle={Thesis Title},
pdfauthor={A. Dent},
pdfsubject={PhD Thesis},
}
%\usepackage{natbib}
\usepackage[capitalise]{cleveref}
\usepackage{xpatch}
\usepackage[natbib,
backend=bibtex,
style=authoryear,
sorting=nyvt,
isbn=false,
doi=true,
arxiv=abs,
dashed=false,
eprint=true,
giveninits=true,
maxcitenames=2,
uniquename=false,
uniquelist=false,
maxbibnames=99,
date=year,
useprefix=true,
]{biblatex} %an approximation of "Leeds Harvard" using biblatex.
\addbibresource{references.bib}
\DeclareNameAlias{sortname}{family-given}
\xpatchbibmacro{date+extradate}{%
\printtext[parens]%
}{%
\setunit*{\addperiod\space}%
\printtext%
}{}{}
\xpatchbibmacro{volume+number+eid}{%
\setunit*{\adddot}%
}{%
}{}{}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addperiod\space}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%pre
\newunit}
\DeclareSourcemap{
\maps{
\map{
\step[fieldsource=doi,
match=\regexp{\{\\_\}},
replace=\regexp{_}]
}
}
}
%%%separated bib here
\setlength\bibitemsep{0.5\baselineskip}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\DeclareFieldFormat[article]{title}{#1}
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\renewbibmacro{in:}{}
\DeclareFieldFormat[dataset]{title}{#1}
\DeclareFieldFormat[dataset]{publisher}{\textit{#1}}
\DeclareFieldFormat[unpublished]{title}{#1 [Preprint]}
\DeclareFieldFormat[unpublished]{title}{#1 [Preprint]}
\DeclareFieldFormat[misc]{title}{\textit{#1}}
\DeclareFieldFormat[misc]{booktitle}{[Online]. #1} % show title in quotes
\DeclareBibliographyDriver{misc}{%
\printnames{author}%
\newunit%
\printfield{year}%
\printfield{extradate}
\newunit%
\printfield{title}%
\newunit%
\printfield{booktitle}% display booktitle or last-accessed for websites
\newunit%
\printfield{url}%
\newunit%
\printfield{issn}%
\newunit%
\printfield{doi}%
\finentry
}
\setcounter{biburlnumpenalty}{9000}
\DeclareCiteCommand{\fullcite}
{\usebibmacro{prenote}}
{\usedriver
{}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
%%%%%%%%%%%%%%%%%%here endeth the references style setup%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\frontmatter
\begin{titlepage}
\begin{center}
\Huge
\textbf{Thesis Title}
\vspace{2cm}
\LARGE
\includegraphics[width=.52\textwidth]{University_of_Leeds_crest-fixed.pdf}
\vfill
\textbf{Arthur Philip Dent}
%\vspace{1cm}
Submitted in accordance with the requirements for the degree of Doctor of Philosophy
\vspace{0.8cm}
\Large
The University of Maximegalon\\
School of Beverages not quite entirely unlike tea\\
\vspace{0.8cm}
\today
\end{center}
\end{titlepage}
\chapter*{Intellectual property and Publication statements}
\newpage
\chapter*{Acknowledgements}
\input{acknowledgements}
\newpage
\cleardoublepage
\chapter*{Abstract}
\input{abstract}
\spacing{1}
\newpage
\tableofcontents
\clearpage
\markboth{}{}
\chapter*{Inclusion of copyrighted material}
\addcontentsline{toc}{chapter}{Inclusion of copyrighted material}
\cleardoublepage
\chapter*{List of Abbreviations}
\addcontentsline{toc}{chapter}{List of Abbreviations}
\begin{acronym}[BR]\itemsep4pt %how you want spacing to be laid out, i.e. the longest abbreviation plus a bit
\acro{BR}{British Rail\acroextra{, the state-owned operator of railways in Britain during the second half of the 20th century}}
\end{acronym}
\listoffigures
\listoftables
\mainmatter
\spacing{1.5}
%\setstretch{1.5}
%%these seem to do the same thing?!
\setcounter{chapter}{0}
\include{chapters/1introduction/main}
\include{chapters/4results_1/main}
%you can swap out \include for \includeonly to keep refs. in place, but just speed up compile time for certain chapters etc.
\newpage
\printbibliography[heading=bibintoc]
\appendix
\cleardoublepage
\chapter{Appendix 1}
Something extra, maybe you don't even need it.
\end{document}