forked from lrsantos11/ufscthesisx
-
Notifications
You must be signed in to change notification settings - Fork 9
/
main.tex
326 lines (254 loc) · 12.6 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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
%https://github.com/SublimeText/LaTeXTools/issues/1439
%!TEX output_directory=latexcache
% You can build this using the command:
% latexmk -pdf -jobname=output -output-directory=cache -aux-directory=cache -pdflatex="pdflatex -interaction=nonstopmode" -use-make main.tex
% When the bibliography includes a cyclic reference to another bibliography,
% you need to run `pdflatex` 5 times on the following order:
% 1. `pdflatex`,
% 2. `biber`,
% 3. `pdflatex`
% 4. `pdflatex`
% 5. `pdflatex`
% 6. `biber`
% 7. `pdflatex`
% Monograph LaTeX Template for UFSC based on:
% 1. https://github.com/royertiago/tcc
% 2. http://portal.bu.ufsc.br/normalizacao/
% 3. https://github.com/evandrocoan/ufscthesisx
% 4. http://www.latextemplates.com/template/simple-sectioned-essay
% Initially translated from Portuguese with help of https://github.com/omegat-org/omegat <Computer Assisted Translation of LaTeX document>
% https://tex.stackexchange.com/questions/313732/computer-assisted-translation-of-latex-document
% Allows you to write your thesis both in English and Portuguese
% https://tex.stackexchange.com/questions/5076/is-it-possible-to-keep-my-translation-together-with-original-text
\newif\ifenglish\englishfalse
\newif\ifadvisor\advisorfalse
% Uncomment the line `\englishtrue` to set the document default language to English
% \englishtrue
\advisortrue
% https://tex.stackexchange.com/questions/131002/how-to-expand-ifthenelse-so-that-it-can-be-used-in-parshape
\newcommand{\lang}[2]{\ifenglish#1\else#2\fi}
\newcommand{\advisor}[2]{\ifadvisor#1\else#2\fi}
% https://tex.stackexchange.com/questions/385895/how-to-make-passoptionstopackage-add-the-option-as-the-last
% https://tex.stackexchange.com/questions/484400/changing-the-cleveref-package-language-conjunction-definition
% https://tex.stackexchange.com/questions/516058/why-isnt-my-biblatex-language-changing-when-passing-the-language-on-my-document
\ifenglish
\PassOptionsToPackage{brazil,main=english,spanish,french}{babel}
\else
\PassOptionsToPackage{main=brazil,english,spanish,french}{babel}
\fi
% Simple alias for English and Portuguese words
% https://tex.stackexchange.com/questions/513019/argument-of-bbltempd-has-an-extra
\newcommand{\brazilword}[1]{\protect\foreignlanguage{brazil}{#1}}
\newcommand{\englishword}[1]{\protect\foreignlanguage{english}{#1}}
% Allow you to write `Evandro's house` in latex as `Evandro\s house` instead of `Evandro\textquotesingle{}s house`
% https://tex.stackexchange.com/questions/31091/space-after-latex-commands
\newcommand{\s}[0]{\textquotesingle{}s\xspace}
\newcommand{\q}[0]{\textquotesingle{}\xspace}
% Uncomment the following line if you want to use other biblatex settings
% \PassOptionsToPackage{style=numeric,repeatfields=true,backend=biber,backref=true,citecounter=true}{biblatex}
\documentclass[
\lang{english}{brazilian,brazil}, % https://tex.stackexchange.com/questions/484400/changing-the-cleveref-package-language-conjunction-definition
12pt, % Padrão UFSC para versão final
a4paper, % Padrão UFSC para versão final
oneside, % Impressão nos dois lados da folha
chapter=TITLE, % Título de capítulos em caixa alta
section=TITLE, % Título de seções em caixa alta
]{setup/ufscthesisx}
% Utilize o arquivo aftertext/references.bib para incluir sua bibliografia.
% http://tug.ctan.org/tex-archive/macros/latex/contrib/cleveref/cleveref.pdf
\addbibresource{aftertext/references.bib}
% https://www.overleaf.com/learn/latex/Inserting_Images
\graphicspath{{pictures/}}
% FIXME: Preencha com seus dados
\autor{\brazilword{Escreva aqui o Nome completo do Autor ou da Autora}}
\titulo{\lang{Work Title\protect\\Could be break into two lines}{Título do trabalho\protect\\Pode ser Quebrado em duas linhas}}
% FIXME: Se houver subtítulo, descomente a linha abaixo
\subtitulo{\lang{Subtitle}{Subtítulo}}
% FIXME: Siglas para grau de formação Dr./Dra., Me./Ma, Bel. Bela. (inglês: PhD., MSc., Bs.)
\orientador[\lang{Supervisor}{Orientador(a)}]{\brazilword{Nome completo do Orientador(a)}, \lang{Phd.}{Dr.}}
% FIXME: Se houver coorientador, descomente a linha abaixo
% \coorientador[\lang{Co-supervisor}{Coorientador(a)}]{\brazilword{Nome do coorientador(a)}, \lang{Phd.}{Dr.}}
% FIXME: Preencher com o nome do Coordenador de TCCs/Teses do seu curso
\coordenador[\lang{Coordinator}{Coordenador(a)}]{\brazilword{Nome do Coordenador(a)}, \lang{Phd.}{Dr.}}
% FIXME: Local da sua defesa
\local{\brazilword{Florianópolis, Santa Catarina} -- \lang{Brazil}{Brasil}}
% FIXME: Ano da sua defesa
\ano{2019}
\biblioteca{\lang{University Library}{Biblioteca Universitária}}
% FIXME: Sigla da sua instituição
\instituicaosigla{UFSC}
\instituicao{\brazilword{Universidade Federal de Santa Catarina}}
% FIXME: Preencha com Tese, Dissertação, Monografia ou Trabalho de Conclusão de Curso, Bachelor's Thesis, etc
\tipotrabalho{\lang{Bachelor\s Thesis}{Trabalho de Conclusão de Curso}}
% FIXME: Se houver Área de Concentração, descomente a linha abaixo
% \area{\lang{Formal Languages}{Linguagens Formais}}
% FIXME: Preencha com Doutor, Bacharel ou Mestrando
\formacao{\lang
{Bachelor of Science degree in Computer Science}
{Bacharel em Ciências da Computação}%
}
\programa{\lang
{Undergraduate Program in Computer Science}
{Programa de Graduação em Ciências da Computação}%
}
% FIXME: Preencha com Departamento de XXXXXX, Centro de XXXXXX
\centro{\lang
{INE -- Department of Informatics and Statistics, CTC -- Technological Center}
{INE -- Departamento de Informática e Estatística, CTC -- Centro Tecnológico}%
}
% FIXME: Preencha com Campus XXXXXX ou Centro de XXXXXX
\campus{\brazilword{Campus Reitor João David Ferreira Lima}}
% FIXME: Data da sua defesa
\data{\lang{30 of march of}{30 de março de} 2019}
% O preambulo deve conter tipo do trabalho, objetivo, nome da instituição e a área de concentração.
\preambulo{\lang%
{%
\imprimirtipotrabalho~submitted to the \imprimirprograma~of
\imprimirinstituicao~for degree acquirement in \imprimirformacao.%
}{%
\imprimirtipotrabalho~submetido ao \imprimirprograma~da
\imprimirinstituicao~para a obtenção do Grau de \imprimirformacao.%
}%
}
% Allows you to use ~= instead of `\hyp{}`
% https://tex.stackexchange.com/questions/488008/how-to-create-an-alternative-to-shortcut-or-hyp
% https://tex.stackexchange.com/questions/405718/depending-on-babel-language-setting-i-get-biblatex-error-argument-of-language
% https://tex.stackexchange.com/questions/340661/argument-of-languageactivearg-has-an-extra-i-use-includegraphics-and-r
\useshorthands{~}\defineshorthand{~=}{\hyp{}}
\palavraschaveufsc{palavraschaveingles} {Keyword 1}
\palavraschaveufsc{palavraschaveportugues}{Palavra~=Chave 1}
\palavraschaveufsc{palavraschaveingles} {Keyword 2}
\palavraschaveufsc{palavraschaveportugues}{Palavra~=Chave 2}
\palavraschaveufsc{palavraschaveingles} {Keyword 3}
\palavraschaveufsc{palavraschaveportugues}{Palavra~=Chave 3}
\hypersetup
{
pdfsubject={Thesis' Abstract},
pdfcreator={LaTeX with abnTeX2 for UFSC},
pdftitle={\imprimirtitulo},
pdfauthor={\imprimirautor},
pdfkeywords={\lang{\palavraschaveinglessemitem}{\palavraschaveportuguessemitem}},
}
% Altere o arquivo 'settings.tex' para incluir customizações de aparência da sua tese
\input{settings.tex}
% When writing a large document, it is sometimes useful to work on selected sections of the document
% to speed up compilation time: https://en.wikibooks.org/wiki/TeX/includeonly
\newif\ifforcedinclude\forcedincludefalse
% \addtoincludeonly{beforetext/agradecimentos}
% \addtoincludeonly{beforetext/epigrafe}
% \addtoincludeonly{beforetext/fichacatalografica}
% \addtoincludeonly{beforetext/folhadeaprovacao}
% \addtoincludeonly{beforetext/resumos}
% \addtoincludeonly{beforetext/siglas}
% \addtoincludeonly{beforetext/simbolos}
% Part 1
% \addtoincludeonly{chapters/introduction}
% \addtoincludeonly{chapters/motivation}
% \addtoincludeonly{chapters/beautifiers}
% Part 2
\addtoincludeonly{chapters/object_beautifier}
% \addtoincludeonly{chapters/conclusion}
% \addtoincludeonly{aftertext/aftertext}
% Control whether the full document will be generated
% Note: It will also generate severals errors like the following, which can be ignored
% Latexmk: Missing input file: 'chapters/test.aux'
%
% You can make latex stop generate these errors, if you generate a full version
% of the document, before uncommenting these lines.
%
% Uncomment these two lines, to only partially generate the document
% \doincludeonly
% \forcedincludetrue
% https://tex.stackexchange.com/questions/85113/xrightarrow-text
\makeatletter
\newcommand{\xRightarrow}[2][]{\ext@arrow 0359\Rightarrowfill@{#1}{#2}}
\newcommand{\xLeftarrow}[2][]{\ext@arrow 0359\Leftarrowfill@{#1}{#2}}
\makeatother
% https://tex.stackexchange.com/questions/32208/footnote-runs-onto-second-page
\interfootnotelinepenalty=10000
% Disable the empty pages automatically put by memoir class, except the ones by \cleardoublepage
\ifforcedinclude\openany\else\fi
% https://tex.stackexchange.com/questions/171999/overfull-hbox-in-biblatex
% https://tex.stackexchange.com/questions/499457/why-my-document-is-not-hyphenation-on-words-starting-with-upper-case-letter-i
\emergencystretch=5em
% https://tex.stackexchange.com/questions/23313/how-can-i-reduce-padding-after-figure
% https://tex.stackexchange.com/questions/499580/how-to-keep-my-default-floating-environment-spacing-before-them-while-reducing
% \xpretocmd{\figure}{\setlength{\belowcaptionskip}{-10pt}}{}{}
\begin{document}
% FIXME: Comment this after finishing the thesis, so you can start fixing the \flushbottom vs \raggedbottom
% https://tex.stackexchange.com/questions/65355/flushbottom-vs-raggedbottom
\raggedbottom
% https://tex.stackexchange.com/questions/4705/double-space-between-sentences
\frenchspacing
% Uncomment this to put a ←← | ← (Go To Top/Go Back) on each section header
\advisor{}{\addGoToSummary}
% ELEMENTOS PRÉ-TEXTUAIS
\input{beforetext/beforetext.tex}
% ELEMENTOS TEXTUAIS
\textual
\setlength\beforechapskip{50pt}
\setlength\midchapskip{20pt}
\setlength\afterchapskip{20pt}
% PARTE
\ifforcedinclude\else\part{\lang{Research}{Pesquisa}}\fi
\label{primeira_parte}
% Introdução (exemplo de capítulo sem numeração, mas presente no Sumário)
\include{chapters/intro}
% Capitulo com exemplos de comandos inseridos de arquivo externo
\include{chapters/chapter_1}
% Capitulo de revisão de literatura
\include{chapters/chapter_2}
% Primeiro capitulo de Resultados
\include{chapters/chapter_3}
% PARTE
\ifforcedinclude\else\part{\lang{Implementation}{Implementação}}\fi
\label{segunda_parte}
% Segundo capitulo de Resultados
\include{chapters/chapter_4}
% Finaliza a parte no bookmark do PDF para que se inicie o bookmark na raiz
% e adiciona espaço de parte no Sumário
\phantompart
% Conclusão (outro exemplo de capítulo sem numeração e presente no sumário)
\include{chapters/conclusion}
% ELEMENTOS PÓS-TEXTUAIS
\postextual
\setlength\beforechapskip{0pt}
\setlength\midchapskip{15pt}
\setlength\afterchapskip{15pt}
% Referências bibliográficas
\begingroup
% https://tex.stackexchange.com/questions/163559/how-to-modify-line-spacing-per-entry-of-bibliography
% https://tex.stackexchange.com/questions/19105/how-can-i-put-more-space-between-bibliography-entries-biblatex
\setlength\bibitemsep{\baselineskip}
\advisor{}{\linespread{1.18}\selectfont}
% https://tex.stackexchange.com/questions/17128/using-bibtex-to-make-a-list-of-references-without-having-citations-in-the-body
% \nocite{*}
\printbibliography[title=\lang{REFERENCES}{REFERÊNCIAS}]
\endgroup
% Glossário, consulte o manual da classe abntex2 para orientações sobre o glossário.
% \ifforcedinclude\else\glossary\fi
% Inicia os apêndices
\begin{apendicesenv}
% Imprime uma página indicando o início dos apêndices
\ifforcedinclude\else\partapendices\fi
\setlength\beforechapskip{50pt}
\setlength\midchapskip{20pt}
\setlength\afterchapskip{20pt}
\include{aftertext/apendice_a}
\end{apendicesenv}
% Inicia os anexos
\begin{anexosenv}
% Imprime uma página indicando o início dos anexos
\ifforcedinclude\else\partanexos\fi
\setlength\beforechapskip{50pt}
\setlength\midchapskip{20pt}
\setlength\afterchapskip{20pt}
\include{aftertext/anexo_a}
\include{aftertext/anexo_b}
\end{anexosenv}
% INDICE REMISSIVO
\ifforcedinclude\else
\phantompart
\printindex
\fi
\end{document}