-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.tex
218 lines (162 loc) · 7.4 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
%% PhD thesis template
%% School of Computing and Communications, Lancaster University,
%% Copyright 2020 Andrew Moore and Alistair Baron
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Alistair Baron
%
% This work consists of the files main.tex, and the other example tex files referenced within.
%
% Heavily based on the formatting and content of Alistair Baron's thesis (https://eprints.lancs.ac.uk/id/eprint/84887/1/2011Baronphd.pdf), Kelly Widdicks's thesis (https://doi.org/10.17635/lancaster/thesis/951), and Andrew Moore's thesis (https://doi.org/10.17635/lancaster/thesis/1408). The thesis is also somewhat based on the Cambridge thesis template: https://github.com/kks32/phd-thesis-template
%
% This was created by Andrew Moore and Alistair Baron with help from Paul Rayson, and Edward Dearden.
%
% Conforms with Lancaster University MANUAL OF ACADEMIC REGULATIONS AND PROCEDURES (MARP) for POSTGRADUATE RESEARCH. This can be found here: https://www.lancaster.ac.uk/media/lancaster-university/content-assets/documents/student-based-services/asq/marp/PGR-Regs.pdf
% For layout information the most relevant pages of that document are Appendix 2.
% This template was updated in November 2022, to apply changes to the regulations made in July 2021.
% Please check that your thesis complies with the current regulations.
% If you have any useful updates for this template, which you think will benefit others, please make these available via github (https://github.com/InfoLab21/scc-thesis-template).
\documentclass[twoside,12pt, a4paper]{report}
% The following sets the whole document to 1.5 line spacing. The line spacing should be 1.5 according to the MARP regulations (Appendix 2), for the purpose of examiner annotation. However, some have a preference for different line spacing (e.g. single). Comment this line out for single line spacing.
\linespread{1.5}
\usepackage[paper=a4paper]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{svg}
\usepackage{hyperref}
\hypersetup{
colorlinks=false,
breaklinks=true
}
% All sections and sub sections have to be labelled in the table of contents and thesis. This does this down to the level of subsubsection.
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
%discourages hyphenated words at end of lines
\hyphenpenalty=5000
\tolerance=1000
% biblography formatting
% NOTE: At the moment both URL and DOI will be displayed, if you have a bib entry that has both URL and DOI please remove the URL so that only one link is displayed, in this case to the DOI.
\usepackage[style=authoryear,backend=biber,url=true, doi=true, sorting=nyt, natbib=true]{biblatex}
\usepackage{bibentry}
\addbibresource{ref.bib}
% Appendix formatting
\usepackage[title, titletoc]{appendix}
\renewcommand{\appendixpagename}{Appendix}
% for the title page
\usepackage{datetime}
\newdateformat{monthyeardate}{%
\monthname[\THEMONTH], \THEYEAR}
% For the declaration
% NOTE IF NOT USING OVERLEAF PLEASE REMOVE THIS AND ADD THE WORD COUNT MANUALLY. The software overleaf uses is this: https://app.uio.no/ifi/texcount/
% This has come from overleaf and has been slightly adapted. This counts everything including footnotes and captions I believe and the appendix, but not bibliography.
% https://www.overleaf.com/learn/how-to/Is_there_a_way_to_run_a_word_count_that_doesn%27t_include_LaTeX_commands%3F
\newcommand{\quickwordcount}[1]{%
\immediate\write18{texcount -0 -sum -merge #1.tex > #1-words.sum }%
\input{#1-words.sum}%
}
%
% TO BE FILLED IN
%
\newcommand\thesistitle{Title of your thesis}
\newcommand\authorname{First (Middle) Last name} % Full name
\newcommand\authordegrees{BSc (Hons), MRes} % This does not have to be filled in, but the regulations state that you should include any degrees you have.
\newgeometry{left=35mm, right=25mm, top=25mm, bottom=25mm, asymmetric, includeheadfoot} % This has to come before the header and footer information
% HEADER AND FOOTER STYLE
% https://en.wikibooks.org/wiki/LaTeX/Customizing_Page_Headers_and_Footers
\usepackage{fancyhdr}
% This needs to be smaller or larger depending on your largest header, at the moment we have set it to 15
% even though it states a warning in the latex, as your largest header is most likely
% not to be a multiline header, but remember this may changed so checks the latex
% warning for:
% (fancyhdr) \setlength{\headheight}
% Where it will tell you what to change this too.
\setlength{\headheight}{15pt}
% For preamble
\fancypagestyle{preamble}{ %
\fancyhf{} % remove everything
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
}
\pagestyle{preamble}
% For the main pages
\fancypagestyle{main}{
\fancyhf{}
%\fancyhead[R]{\thepage}
\fancyfoot[C]{\thepage}
\fancyhead[LE]{\textit{ \nouppercase{\leftmark}} }
\fancyhead[RO]{\textit{ \nouppercase{\rightmark}} }
\renewcommand{\headrulewidth}{1pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
}
% For title and chapter pages
\fancypagestyle{plain}{ %
\fancyhf{} % remove everything
\fancyfoot[C]{\thepage} %should keep page number
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
}
% Highlighting your own name in the publication.tex section
\usepackage{xpatch}% or use http://tex.stackexchange.com/a/40705
\makeatletter
\newbibmacro*{name:bold}[2]{%
\edef\blx@tmp@name{\expandonce#1, \expandonce#2}%
\def\do##1{\ifdefstring{\blx@tmp@name}{##1}{\bfseries\listbreak}{}}%
\dolistloop{\boldnames}}
\newcommand*{\boldnames}{}
\makeatother
\xpretobibmacro{name:family}{\begingroup\usebibmacro{name:bold}{#1}{#2}}{}{}
\xpretobibmacro{name:given-family}{\begingroup\usebibmacro{name:bold}{#1}{#2}}{}{}
\xpretobibmacro{name:family-given}{\begingroup\usebibmacro{name:bold}{#1}{#2}}{}{}
\xpretobibmacro{name:delim}{\begingroup\normalfont}{}{}
\xapptobibmacro{name:family}{\endgroup}{}{}
\xapptobibmacro{name:given-family}{\endgroup}{}{}
\xapptobibmacro{name:family-given}{\endgroup}{}{}
\xapptobibmacro{name:delim}{\endgroup}{}{}
\usepackage{lipsum} % just to add random text as an example
%
%
\begin{document}
\pagenumbering{roman}
\input{title_page}
%I dedicate this thesis to someone. \textbf{(this is not required when submitting your thesis before your viva and you can add a dedication in your final thesis after your viva if you wish.)}
\clearpage
\input{abstract}
\clearpage
\input{acknowledgements}
\clearpage
\input{declaration}
\clearpage
\input{publications}
\clearpage
\tableofcontents
\clearpage
\listoftables
\clearpage
\listoffigures
\clearpage
\pagestyle{main}
\pagenumbering{arabic}
\chapter{Introduction}
\input{chapters/introduction}
\chapter{Middle chapters}
\input{chapters/middle}
\chapter{Conclusions}
\input{chapters/conclusion}
\begin{appendices}
\chapter{Introduction}
\label{appendix_introduction}
\input{appendix/introduction}
\end{appendices}
\clearpage % Required to make sure the references table of contents page number is correct.
\printbibliography[heading=bibintoc,title=References]
\end{document}