-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.tex
274 lines (234 loc) · 8.16 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
% M.Sc. Dissertation Template
% A work by Mário Cristóvão, based on an example by Gonçalo Martins and José Faria.
% Preamble
\documentclass[a4paper, 11pt]{book}
% Includes
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[utf8]{inputenc} % UTF-8 encoding, so that you can use characters like ç and ã
\usepackage[T1]{fontenc} % Same, but for output encoding
\usepackage[portuguese,english]{babel} % Still related to the above
\setlength {\marginparwidth }{2cm}
\usepackage{todonotes}
\usepackage{acronym} % List of acronyms
\usepackage{textcomp} % Extra characters
\usepackage{graphicx} % \includegraphics{}, the most common command to include images in figures
\usepackage{titlesec} % To manually format the chapter titles
\usepackage[left=3cm,right=2cm,top=2.5cm,bottom=2.5cm]{geometry} % Margins, as dictated by the rules
\usepackage[nottoc]{tocbibind} % Hyperlinks in table of contents, useful for navigation
\usepackage{multirow, makecell, pifont, rotating}
\usepackage[section]{placeins} % \FloatBarrier, a useful command when your figures are trying to run away
\usepackage{caption} % For captioning figures
\usepackage{subcaption} % Subfigures (the subfigure package is deprecated and should not be used)
\usepackage[toc,page]{appendix} % Appendices
\usepackage{pdfpages} % Useful when your appendix is a pre-compiled PDF, such as a whole paper
\usepackage{url} % Useful when one wants to include URLs in the text
\usepackage[
colorlinks=true, %no frame around URL
urlcolor=black, %no colors
menucolor=black, %no colors
linkcolor=black, %no colors
citecolor=black, %no colors
bookmarks=true, %tree-like TOC
bookmarksopen=true, %expanded when starting
bookmarksnumbered=true, %Put section numbers in bookmarks
hyperfootnotes=true, %no referencing of footnotes, does not compile
pdfpagemode=UseOutlines, %show the bookmarks when starting the pdf viewer
plainpages=false, %solve problem ``destination with the same identifier'' warning
pdfpagelabels %solve problem ``destination with the same identifier'' warning
]{hyperref} % So that our citations look good and still work as links
\usepackage{epigraph} % For your inspirational quote
\usepackage{etoolbox}
\usepackage{float}
\usepackage{arydshln}
\usepackage{tikz,lipsum,lmodern}
\usepackage[most]{tcolorbox}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{fancyhdr}
\lstset{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\linespread{0.8}\ttfamily\small,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\renewcommand\cellalign{lc}
\newcommand{\xmark}{\ding{55}}%
\newcommand{\cmark}{\ding{51}}%
\setlength{\headheight}{16pt}
\renewcommand{\baselinestretch}{1.5} % 1.5 line spacing, as mandated by the rules
\renewcommand{\familydefault}{\rmdefault}
%---FORMAT CHAPTERS---
% Different Formating styles for the chapter,
% uncomment your preferred style
% Simple Format
\titleformat{\chapter}[hang]
{
\sffamily
\Huge
\bfseries
}
{\thechapter}{0.5em}
{}
% Line Format
% \titleformat{\chapter}[hang]
% {
% \sffamily
% \Huge
% \bfseries
% }
% {\thechapter}{0.5em}
% {}
% [\vspace{-3.0ex} \rule{\textwidth}{2pt}]
% Framed Format
%\titleformat{\chapter}[frame]
%{
% \sffamily
% \Huge
% \bfseries
%}
%{Chapter \thechapter}{0.5em}
%{}
%---STYLE FOR CODE---
%Example of adding a language not included in the package (Julia in this case)
%\lstdefinelanguage{Julia}%
% {morekeywords={abstract,break,case,catch,const,continue,do,else,elseif,%
% end,export,false,for,function,immutable,import,importall,if,in,%
% macro,module,otherwise,quote,return,switch,true,try,type,typealias,%
% using,while},%
% sensitive=true,%
% alsoother={\$},%
% morecomment=[l]\#,%
% morecomment=[n]{\#=}{=\#},%
% morestring=[s]{"}{"},%
% morestring=[m]{'}{'},%
%}[keywords,comments,strings]%
\lstset{aboveskip=20pt,belowskip=20pt}
\definecolor{codegreen}{rgb}{0,0.3,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.38,0,0.62}
\definecolor{backcolour}{rgb}{1,1,1}
\newcommand{\MONTH}{%
\ifcase\the\month
\or January% 1
\or February% 2
\or March% 3
\or April% 4
\or May% 5
\or June% 6
\or July% 7
\or August% 8
\or September% 9
\or October% 10
\or November% 11
\or December% 12
\fi}
\makeatletter
\newcommand{\YEAR}{\the\year}
\makeatother
\colorlet{shadecolor}{lightgray}
\newcommand{\thesistitle}{Dissertation Title} % Your work's title
\newcommand{\myname}{Author Name} % Your name
\newcommand{\statedate}{Place, \MONTH\ \YEAR} % The date, usually "Place, Month Year"
\newcommand{\supervisorname}{Supervisor's Name} % Your supervisor's name
\newcommand{\cosupervisorname}{co-supervisor 1 \linebreak co-supervisor 2} % Your co-supervisor's name, if any.
% Handle page styling for headers and footers
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[CE,CO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
}
\fancypagestyle{empty}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
}
% MAIN DOCUMENT
\begin{document}
% TITLE PAGES
\frontmatter
% Uncomment this line when you have your cover ready. An MSWord template is available at that folder.
% You should edit it in MSWord, and then export it into PDF, so we can neatly import it here.
\includepdf[pages={-}]{images/cover.pdf}
% Blank page (Back of Cover)
\newpage\thispagestyle{empty}
\pagestyle{plain}
% Title page
\input{title_page.tex}
% Acknowledgements
\chapter*{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgements}
\input{acknowledgements}
% ABSTRACT
\chapter*{Resumo}
\addcontentsline{toc}{chapter}{Resumo}
\input{chapters/resumo}
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
\input{chapters/abstract}
% INSPIRATIONAL QUOTE
% Setup
\chapter*{}
\setlength\epigraphwidth{12cm}
\setlength\epigraphrule{0pt}
\makeatletter
\patchcmd{\epigraph}{\@epitext{#1}}{\itshape\@epitext{#1}}{}{}
\makeatother
% Actual Quote
\vspace*{\fill}
\epigraph{"Intelligence is the ability to avoid doing work, yet getting the work done.”}
{Linus Torvald}
\vspace*{\fill}
% TABLE OF CONTENTS
\pagestyle{plain}
\tableofcontents
% LIST OF ACRONYMS
\chapter*{List of Acronyms}
\addcontentsline{toc}{chapter}{List of Acronyms}
\input{list_acronyms}
% LIST OF FIGURES
\listoffigures
% LIST OF TABLES
\listoftables
% BODY
\mainmatter
%-----------------CHAPTERS--------------------
% For each chapter, you should have a bit of code that looks like this:
% \label allows you to later \ref that chapter.
% \input includes a different .tex file, so that you can have you dissertation
% neatly partitioned into several files. I recommend one file per chapter.
%-----CHAPTER1-INTRODUCTION-----
\chapter{Introduction}
\label{chap:introduction}
\input{chapters/introduction}
% Add your chapters
%---SAMPLE---
\chapter{Chapter}
\label{chap:conclusions}
\input{chapters/sample}
% REFERENCES
% Edit the references.bib file to add your own references, that you can then
% \cite on your text.
\bibliographystyle{ieeetr}
\bibliography{bibliography/references.bib}
\titleformat{\chapter}[display] % Return chapter titles to normal, taking up a whole page (cool for appendices)
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
%APPENDIX
\begin{appendix} % Start appendices
\chapter{Sample Appendix} % One chapter per appendix
\label{app: sample appendix}
\input{appendix/sample.tex}
% To include pdf use this
%\includepdf[pages={-}]{path/to/appendix.pdf}
\end{appendix}
\end{document}