-
Notifications
You must be signed in to change notification settings - Fork 0
/
Thesis.tex
175 lines (133 loc) · 6.45 KB
/
Thesis.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% La Salle URL B.Sc. CS Senior Thesis
% Author: Jiahui Chen
% LaTeX
% Version 1.0.0 (2022/05/31)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[12pt, twoside]{article} % 12 pt font, two-sided book style
\usepackage[a4paper, includehead, headheight=0.6cm, inner=3cm ,outer=2.5cm, top=2.5 cm, bottom=2.5cm]{geometry} % Changing size of document
\usepackage[english]{babel} % The document is in English
\usepackage[utf8]{inputenc} % UTF8 encoding
\usepackage[T1]{fontenc} % Font encoding
\usepackage{mathptmx} % Times New Roman like font
\usepackage{graphicx} % For including images
\graphicspath{{./Images}} % Specifies the directory where pictures are stored
\usepackage{longtable} % tables that can span several pages
\usepackage{tabularx, ragged2e}
\usepackage[bf]{caption} % caption: FIG in bold
\usepackage{subcaption} % caption: FIG in bold
\usepackage{fancyhdr} % For the headers
\usepackage{setspace} % For double spacing
\usepackage{float} % Float for images
%----------------------------------------------------------------------------------------
% CODE CONFIGURATIONS
%----------------------------------------------------------------------------------------
\usepackage[newfloat]{minted} % For code snippets in the document
\usepackage{listings} % Listing of code snippets in the Content
\renewcommand{\lstlistingname}{Code Snippets}% Listing -> Code Snippets
\renewcommand{\lstlistlistingname}{List of \lstlistingname}% List of Listings -> List of Code Snippets
% Referencing code blocks
\newenvironment{code}{\captionsetup{type=listing}}{}
\SetupFloatingEnvironment{listing}{name=Source Code}
\usepackage[table,xcdraw, dvipsnames]{xcolor} % to access the named colour LightGray
\definecolor{LightGray}{gray}{0.9}
%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------
\usepackage{emptypage} % No headers on an empty page
\usepackage{eso-pic} % For the background picture on the title page
\newcommand\BackgroundPic{%
\put(-350,-140){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth, angle=-20]{Images/La Salle Star.png}%
\vfill
}}
}
\usepackage{hyperref} % Adds clickable links at references
%----------------------------------------------------------------------------------------
% CUSTOM VALUES, COMMANDS AND PACKAGES
%----------------------------------------------------------------------------------------
% Open Preamble/mydefinitions.tex and enter some values (name, thesis title...)
% and include my own custom LaTeX functions and packages
\input{Preamble/mydefinitions}
% Sets depth for the section numbering
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
% New commands for child sections
\makeatletter
\newcommand\subsubsubsection{\@startsection{paragraph}{4}{\z@}{-2.5ex\@plus -1ex \@minus -.25ex}{1.25ex \@plus .25ex}{\normalfont\normalsize\bfseries}}
\newcommand\subsubsubsubsection{\@startsection{subparagraph}{5}{\z@}{-2.5ex\@plus -1ex \@minus -.25ex}{1.25ex \@plus .25ex}{\normalfont\normalsize\bfseries}}
\makeatother
\begin{document}
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\pagestyle{empty} % No page numbers
%\frontmatter %
\begin{titlepage}
\AddToShipoutPicture*{\BackgroundPic}
\begin{center}
\vfill
{\large \scshape Computer Engineering Department\\ La Salle Universitat Ramon Llull}\\[1.4cm]
{\Large Graduation Thesis}\\[0.5cm]
\rule{\textwidth}{1.5pt}\\[0cm]
{\huge \bfseries \thesistitle \par \ }\\[-0.5cm]
\rule{\textwidth}{1.5pt}\\[2.5cm]
\hfill by\\[1cm]
\hfill {\large \bfseries\name}\\
\vfill
{\hfill \large Supervisor: \textbf{\supervisor}} \\
\ifx\cosupervisor\undefined\else{\hfill \large Co-Supervisor: \textbf{\cosupervisor}} \\ \fi
\vspace{1cm}
\hfill \submissiondate
\end{center}
\end{titlepage}
%----------------------------------------------------------------------------------------
% PREAMBLE PAGES (comment out unnecessary pages)
%----------------------------------------------------------------------------------------
\fancyhf{}% Clears header and footer
\fancyhead[RO,LE]{\thepage} % page number on the outside of headers
\pagestyle{empty} % Changes the headers
\input{Preamble/abstract}
%----------------------------------------------------------------------------------------
% LIST OF CONTENTS/FIGURES/TABLES
%----------------------------------------------------------------------------------------
\pagestyle{fancy} % Changes the headers
\renewcommand{\sectionmark}[1]{ \markboth{#1}{}} % Getting the chapter name right
\pagenumbering{Roman} % Use roman page numbering style (i, ii, iii, iv...) for the preamble pages
\unnumberedsection{Contents}
\tableofcontents % Write out the Table of Contents
\listoffigures % List of figures
\listoftables % List of tables
\lstlistoflistings % List of code snippets
%----------------------------------------------------------------------------------------
% LIST OF ACRONYMS
%----------------------------------------------------------------------------------------
\unnumberedsection{Acronyms}
\input{Preamble/Acronyms}
%----------------------------------------------------------------------------------------
% THESIS MAIN TEXT - CHAPTERS
%----------------------------------------------------------------------------------------
\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
\onehalfspacing % 1.5 spacing
% Main chapters of the document
\cleardoubleoddpage
\numberedsection
\pagenumbering{arabic} % Begin numeric (1,2,3...) page numbering
\input{MainText/Introduction}
\input{MainText/Yako}
\input{MainText/Results}
\input{MainText/Discussion}
\input{MainText/Conclusions}
\input{MainText/Acknowledgement}
%----------------------------------------------------------------------------------------
% BIBLIOGRAPHY
%----------------------------------------------------------------------------------------
\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
\unnumberedsection{References} % Title of the unnumbered chapter
\printbibliography
\end{document}