-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tex
285 lines (218 loc) · 10.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
%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/}}
\autor{\brazilword{Henrique da Cunha Buss}}
\titulo{\lang{The Ipe programming language}{Linguagem de programação Ipe}}
\subtitulo{\lang{Purely functional programming for REST APIs}{Programação puramente funcional para APIs REST}}
\orientador[\lang{Supervisor}{Orientador(a)}]{\brazilword{Prof. Maicon Rafael Zatelli}, \lang{Phd.}{Dr.}}
\coordenador[\lang{Coordinator}{Coordenador(a)}]{\brazilword{Prof. Lucia Helena Martins Pacheco}, \lang{Phd.}{Dr.}}
\local{\brazilword{Florianópolis, Santa Catarina} -- \lang{Brazil}{Brasil}}
\ano{2023}
\biblioteca{\lang{University Library}{Biblioteca Universitária}}
\instituicaosigla{UFSC}
\instituicao{\brazilword{Universidade Federal de Santa Catarina}}
\tipotrabalho{\lang{Bachelor\s Thesis}{Trabalho de Conclusão de Curso}}
\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}%
}
\centro{\lang
{INE -- Department of Informatics and Statistics, CTC -- Technological Center}
{INE -- Departamento de Informática e Estatística, CTC -- Centro Tecnológico}
}
\campus{\brazilword{Campus Reitor João David Ferreira Lima}}
\data{\lang{11 de julho}{11 de julho de} 2023}
\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} {Programming language}
\palavraschaveufsc{palavraschaveportugues}{Linguagem de programação}
\palavraschaveufsc{palavraschaveingles} {Functional programming}
\palavraschaveufsc{palavraschaveportugues}{Programação funcional}
\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}
\include{chapters/1_introducao}
\include{chapters/2_fundamentacao_teorica}
\include{chapters/3_trabalhos_relacionados}
\include{chapters/4_especificacao}
\include{chapters/5_construcao_do_compilador}
\include{chapters/6_programas_em_ipe}
\include{chapters/7_resultados_obtidos}
\include{chapters/8_consideracoes_finais}
% 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
% % 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_artigo}
\include{aftertext/apendice_sintaxe}
\include{aftertext/apendice_github}
\end{apendicesenv}
% TODO - Adicionar anexos
% % 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}
\end{document}