-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tex
executable file
·216 lines (198 loc) · 9.97 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
%----------------------------------------------------------------------------------------
% Final Year Project Report Bachelor of Engineering
% Glasgow College, UESTC
% (LaTex Template)
%-------------------------------------------------------------------------------
% Arrangement Author: Huang Yifan 2288862h@student.gla.ac.uk
% Zhuheng Song 2357651S@student.gla.ac.uk
%-------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%-------------------------------------------------------------------------------
% arrangement ------------------------------------------------------------------
\documentclass[
12pt, % The default document font size, options: 10pt, 11pt, 12pt
twoside, % Two side (alternating margins) for binding
% draft, % speed up comile and show problems
% showframe, % Uncomment to show how the type block is set on the page
]{article} % The class file specifying the document structure
\usepackage[
a4paper,
inner=2.5cm, % more margin for inner in case to bookbind
outer=2cm,
top=2cm,
bottom=2cm
]{geometry}
% set line spacing to 1.5
\usepackage{setspace}
\onehalfspacing{}
% set no vertical space to lists
\usepackage{enumitem}
\setlist{itemsep=0mm}
% language, fonts and symbols --------------------------------------------------
% \usepackage{xeCJK} % chinese character support
% \usepackage{fontspec}
% \setromanfont{Times New Roman}
% \setsansfont{Arial}
% \setmonofont{Courier New}
\usepackage{csquotes} % quotation support
\usepackage{amssymb} % math symbols support
% figures, tables, code --------------------------------------------------------
\usepackage[figuresleft]{rotating} % for figure rotation
\usepackage{graphicx} % inclusion of graphics files
\graphicspath{{./}}
\usepackage{import} % to solve import path
\usepackage[newfloat]{minted}
\SetupFloatingEnvironment{listing}{name=Program code}
\SetupFloatingEnvironment{listing}{listname=List of Program Code}
\usemintedstyle{vs}
\usepackage{caption}
\usepackage{tabularx}
\usepackage{booktabs} % for \toprule, \midrule, \bottomrule
\usepackage[nottoc]{tocbibind} % add LofF, LofT to TOC
% reference --------------------------------------------------------------------
\usepackage[
backend=biber,
style=alphabetic,
citestyle=authoryear,
backref=true,
maxcitenames=1,
maxbibnames=999,
sorting=ynt,
]{biblatex}
% set cite link to whole author-year
\makeatletter
\let\abx@macro@citeOrig\abx@macro@cite{}
\renewbibmacro{cite}{\bibhyperref{\let\bibhyperref\relax\relax\abx@macro@citeOrig{}}}
\makeatother{}
% allow \citetitle{} to support hyperlink
\DeclareCiteCommand{\citetitle}{\usebibmacro{prenote}}{
\ifciteindex{\indexfield{indextitle}}{}\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}
}{\multicitedelim}{\usebibmacro{postnote}}
% add bibliography files
\addbibresource{References.bib}
% color ------------------------------------------------------------------------
\usepackage[svgnames]{xcolor} % colouring
\definecolor{blue_cite}{RGB}{34,111,212}
\usepackage{hyperref} % keep hyperref to be loaded last (before glossaries-extra)
\hypersetup{
colorlinks=true,
linkcolor=DarkSalmon,
% anchorcolor=black,
citecolor=blue_cite,
% filecolor=cyan,
% menucolor=red,
% runcolor=cyan,
urlcolor=cyan,
% allcolors=LightSlateGray,
} % set colors for different types of links
% list of symbols --------------------------------------------------------------
\usepackage[symbols, nogroupskip, record]{glossaries-extra} % place after hyperref
\GlsXtrLoadResources[
src={Notations.bib},
type=symbols,
save-locations=false
]
%----------------------------------------------------------------------------------------
% THESIS INFORMATION (NECESSARY)
%----------------------------------------------------------------------------------------
\newcommand{\thesistitle}{Some Thesis Title} % Your thesis title, this is used in the cover page, print it elsewhere with \thesistitle
\newcommand{\GUID}{1111111A} % Your GUID, this is used in the cover page, print it elsewhere with \GUID
\newcommand{\student}{San~\textsc{Zhang}} % Your name, this is used in the title page and abstract, print it elsewhere with \student
\newcommand{\firstsupervisor}{\textcolor{red}{\tiny Keep blank before hardcopy submission}} % Your 1st supervisor's name, this is used in the cover page, print it elsewhere with \firstsupervisor. YOU NEED TO KEEP BLANK FOR MOODLE SUBMISSION BUT PUT THE NAME BEFORE HARDCOPY SUBMISSION.
\newcommand{\secondsupervisor} {\textcolor{red}{\tiny Keep blank before hardcopy submission}} % Your 2nd supervisor's name, this is used in the cover page, print it elsewhere with \secondsupervisor. YOU NEED TO KEEP BLANK FOR MOODLE SUBMISSION BUT PUT THE NAME BEFORE HARDCOPY SUBMISSION.
%----------------------------------------------------------------------------------------
% OTHER INFORMATION
%----------------------------------------------------------------------------------------
\newcommand{\degree}{Engineering} % Your degree name, this is used in the cover page and abstract, print it elsewhere with \degree
\newcommand{\subject}{Electric & Electronic Engineering} % Your subject area, this is not currently used anywhere in the template, print it elsewhere with \subject
\newcommand{\keywords}{} % Keywords for your thesis, this is not currently used anywhere in the template, print it elsewhere with \keywords
\newcommand{\university}{\href{https://www.uestc.edu.cn/}{UETSC}} % Your university's name and URL, this is used in the cover page and abstract, print it elsewhere with \university
\newcommand{\department}{\href{http://www.gla.uestc.edu.cn/}{Glasgow College}} % Your department's name and URL, this is used in the cover page and abstract, print it elsewhere with \department
%----------------------------------------------------------------------------------------
% ENVIRONMENTS
%----------------------------------------------------------------------------------------
\newenvironment{declaration}{
\newgeometry{left=2cm, right=2cm, top=2cm, bottom=2cm}
\renewcommand*{\arraystretch}{1.3}
\section*{Coursework Declaration and Feedback Form}
% \addcontentsline{toc}{section}{Coursework Declaration and Feedback Form}
}{\clearpage\restoregeometry}
\renewenvironment{abstract}{
\section*{Abstract}
\bigskip
\addcontentsline{toc}{section}{Abstract}
}{\clearpage}
\newenvironment{acknowledgement}{
\section*{Acknowledgements}
\bigskip
\addcontentsline{toc}{section}{Acknowledgements}
}{\clearpage}
\newenvironment{code}{
\captionsetup{type=listing}
}{}
\AtBeginDocument{
\hypersetup{pdftitle=\thesistitle} % Set the PDF's title to your title
\hypersetup{pdfauthor=\student} % Set the PDF's author to your name
\hypersetup{pdfkeywords=\keywords} % Set the PDF's keywords to your keywords
}
\begin{document}
%----------------------------------------------------------------------------------------
% COVER PAGE
%----------------------------------------------------------------------------------------
\include{Front/Cover.tex}
%----------------------------------------------------------------------------------------
% DECLARATION PAGE
%----------------------------------------------------------------------------------------
\include{Front/Declaration.tex}
%----------------------------------------------------------------------------------------
% ABSTRACT PAGE
%----------------------------------------------------------------------------------------
\pagenumbering{roman} % start to show page number in the roman style
\include{Front/Abstract.tex}
%----------------------------------------------------------------------------------------
% ACKNOWLEDGEMENTS
%----------------------------------------------------------------------------------------
\include{Front/Acknowledgement.tex}
%----------------------------------------------------------------------------------------
% LIST OF CONTENTS
%----------------------------------------------------------------------------------------
\tableofcontents
\pagebreak
%----------------------------------------------------------------------------------------
% LIST OF FIGURES AND TABLES
%----------------------------------------------------------------------------------------
\listoffigures
\listoftables
\listoflistings
\pagebreak
%----------------------------------------------------------------------------------------
% LIST OF NOTATIONS
%----------------------------------------------------------------------------------------
\printunsrtglossary[type=symbols,style=long,title={List of Notations}]
\pagebreak
%----------------------------------------------------------------------------------------
% THESIS CONTENT - SECTIONS
%----------------------------------------------------------------------------------------
\pagestyle{headings} % Return the page headers back to the "thesis" style
\pagenumbering{arabic}
% Include the sections of the thesis
\include{Sections/Section1.tex}
\include{Sections/Section2.tex}
\include{Sections/Section3.tex}
\include{Sections/Section4.tex}
%----------------------------------------------------------------------------------------
% BIBLIOGRAPHY
%----------------------------------------------------------------------------------------
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
\printbibliography[heading=bibintoc]
%----------------------------------------------------------------------------------------
% THESIS CONTENT - APPENDICES
%----------------------------------------------------------------------------------------
\appendix % Cue to tell LaTeX that the following "chapters" are Appendices
% Include the appendices of the thesis as separate files from the Appendices folder
\include{Appendices/Appendices.tex} % Uncomment the lines as you write the Appendices
\include{Appendices/Plagiarism.tex}
\include{Appendices/Code.tex}
%----------------------------------------------------------------------------------------
\end{document}