-
Notifications
You must be signed in to change notification settings - Fork 0
/
basicthesis.cls
541 lines (503 loc) · 17.6 KB
/
basicthesis.cls
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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
%
% Classe base para monografias, dissertações e teses usando parcialmente as regras da Associação Brasileira de Normas Técnicas (ABNT).
%
% Criado por Alvaro Costa Neto em 28 de junho de 2021.
% Para ser usado com os drivers XeLaTeX e Biber.
% Licença [CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/).
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{basicthesis}[2021/06/25 Basic ABNT thesis class]
\DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{book}}
\DeclareOption{oneside}{\PassOptionsToClass{\CurrentOption}{book}}
\DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{book}}
\DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{book}}
\DeclareOption{12pt}{\PassOptionsToClass{\CurrentOption}{book}}
% Usar somente fonte serifada.
\DeclareOption{sanstitles}{\def\sanstitles}
% Opções de fontes (configuradas adiante).
\DeclareOption{libertinus}{\def\libertinus}
\DeclareOption{termes}{\def\termes}
\DeclareOption{schola}{\def\schola}
\DeclareOption{pagella}{\def\pagella}
\DeclareOption{bonum}{\def\bonum}
\DeclareOption{dejavu}{\def\dejavu}
\DeclareOption{stix}{\def\stix}
\DeclareOption{garamond}{\def\garamond}
\DeclareOption{erewhon}{\def\erewhon}
\DeclareOption{source}{\def\source}
\DeclareOption{plex}{\def\plex}
% Suprime as demais opções.
\DeclareOption*{\OptionNotUsed}
\ProcessOptions\relax
\LoadClass[a4paper, onecolumn, titlepage, openright]{book}
\RequirePackage{unicode-math}
\RequirePackage{polyglossia}
\RequirePackage{titlesec}
\RequirePackage[labelfont={bf}, position=above]{caption}
\RequirePackage[style=portuguese, portuguese=brazilian]{csquotes}
\RequirePackage[backend=biber, style=abnt, sorting=nyt]{biblatex}
\RequirePackage{booktabs}
% Língua principal.
\setdefaultlanguage{brazil}
% Língua secundária (inglês, ao menos para o "abstract").
\setotherlanguages{english}
% Possibilidades de fontes sem serifa:
% - Bebas Neue;
% - Fira Sans;
% - IBM Plex Sans Condensed (sem versalete);
% - Inria Sans (sem versalete);
% - League Spartan (sem versalete);
% - Libertinus Sans;
% - Montserrat;
% - Noto Sans;
% - Open Sans (sem versalete, identidade visual do IFSP);
% - Overlock (versalete sem negrito);
% - PT Sans (sem versalete);
% - PT Sans Narrow (sem versalete);
% - QTEurotype (sem versalete);
% - QTHelvetCnd (sem versalete);
% - QTLetterGoth (sem versalete);
% - Roboto Condensed;
% - Source Sans Pro;
% - Taogu (sem versalete);
% - TeX Gyre Heros Cn;
% - Ubuntu (sem versalete);
\setmainfont{Latin Modern Roman}[SmallCapsFont={Latin Modern Roman Caps}]
\setmathfont{Latin Modern Math}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono}[Scale=MatchLowercase]
\ifdefined\libertinus
\setmainfont{Libertinus Serif}
\setmathfont{Libertinus Math}
\setsansfont{Libertinus Sans}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\termes
\setmainfont{TeX Gyre Termes}
\setmathfont{TeX Gyre Termes Math}
\setsansfont{QTHelvetCnd}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\schola
\setmainfont{TeX Gyre Schola}
\setmathfont{TeX Gyre Schola Math}
\setsansfont{Inria Sans}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\pagella
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}
\setsansfont{PT Sans}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\bonum
\setmainfont{TeX Gyre Bonum}
\setmathfont{TeX Gyre Bonum Math}
\setsansfont{Roboto Condensed}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\dejavu
\setmainfont{DejaVu Serif}
\setmathfont{TeX Gyre DejaVu Math}
\setsansfont{PT Sans Narrow}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\stix
\setmainfont{STIX Two Text}
\setmathfont{STIX Two Math}
\setsansfont{PT Sans Narrow}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\garamond
\setmainfont{EBGaramond-Regular}[
BoldFont = EBGaramond-Bold,
ItalicFont = EBGaramond-Italic,
BoldItalicFont = EBGaramond-BoldItalic
]
\setmathfont{Garamond-Math}[Scale=MatchUppercase]
\setsansfont{Open Sans}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\erewhon
\setmainfont{Heuristica}
\setmathfont{Erewhon Math}
\setsansfont{PT Sans Narrow}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\fi
\ifdefined\source
\setmainfont{Source Serif Pro}
\setmathfont{Erewhon Math}
\setsansfont{Source Sans Pro}
\setmonofont{Source Code Pro}[Scale=MatchLowercase]
\RequirePackage[basic,italic,symbolgreek]{mathastext}
\makeatletter
\@for\@tempa:=a,b,c,d,e,h,i,k,l,m,n,o,q,r,s,t,u,v,w,x\do{%
\MTsetmathskips{\@tempa}{0.5mu}{0.5mu}}%
\makeatother
\MTsetmathskips{f}{2.5mu}{0.5mu}
\MTsetmathskips{g}{1.5mu}{0.5mu}
\MTsetmathskips{j}{2.5mu}{0.5mu}
\MTsetmathskips{p}{1.5mu}{0mu}
\MTsetmathskips{y}{1.5mu}{0.5mu}
\MTsetmathskips{z}{1mu}{0.5mu}
\fi
\ifdefined\plex
\setmainfont{IBM Plex Serif}
\setmathfont{Erewhon Math}
\setsansfont{IBM Plex Sans}
\setmonofont{IBM Plex Mono}[Scale=MatchLowercase]
\RequirePackage[basic,italic,symbolgreek]{mathastext}
\makeatletter
\@for\@tempa:=a,b,c,d,e,h,i,k,l,m,n,o,q,r,s,t,u,v,w,x\do{%
\MTsetmathskips{\@tempa}{0.5mu}{0.5mu}}%
\makeatother
\MTsetmathskips{f}{2.5mu}{0.5mu}
\MTsetmathskips{g}{1.5mu}{0.5mu}
\MTsetmathskips{j}{2.5mu}{0.5mu}
\MTsetmathskips{p}{1.5mu}{0mu}
\MTsetmathskips{y}{1.5mu}{0.5mu}
\MTsetmathskips{z}{1mu}{0.5mu}
\fi
% Espaçamento padrão entre linhas.
\renewcommand{\baselinestretch}{1.2}
% Formatação de citações de bloco.
\newlength{\quotemargin}
\setlength{\quotemargin}{2.5cm}
\newenvironment*{innerquote}{%
\setlength{\leftmargini}{0cm}%
\quote%
\hfill\begin{minipage}{\dimexpr\textwidth-\quotemargin\relax}%
\linespread{1.0}\small%
}{%
\end{minipage}%
\endquote%
}
\SetBlockEnvironment{innerquote}
\renewcommand{\mkbegdispquote}[2]{\textooquote}
\renewcommand{\mkenddispquote}[2]{\textcoquote#1#2}
% Remove os parênteses do autor para que a citação via ABNT fique correta.
\renewcommand{\mkcitation}[1]{ #1}
% Tipo de fonte para os títulos, subtítulos etc.
\newcommand{\titlefont}{\rmfamily\bfseries\scshape}%
\ifdefined\sanstitles%
\renewcommand*{\titlefont}{\sffamily\bfseries\scshape}%
\fi%
% Formata o pré-texto.
\makeatletter
\g@addto@macro\frontmatter{%
\addtocontents{toc}{\setcounter{tocdepth}{-1}}%
\pagenumbering{gobble}%
\pagestyle{empty}%
\titleformat{\chapter}[display]{\centering\titlefont\Huge}{}{0pt}{}%
\titlespacing*{\chapter}{0pt}{0pt}{40pt}%
}
\makeatother
% Separação do número de um capítulo, seção etc. do nome em si.
\newlength{\numbernamesep}
\setlength{\numbernamesep}{16pt}
% Formata o texto principal.
\makeatletter
\g@addto@macro\mainmatter{%
\addtocontents{toc}{\setcounter{tocdepth}{2}}%
\pagestyle{headings}%
\titleformat{\chapter}[display]{\titlefont\Huge}{}{0pt}{\thechapter\hspace{\numbernamesep}}%
\titleformat{\section}{\titlefont\Large}{\thesection}{\numbernamesep}{}%
\titleformat{\subsection}{\titlefont\large}{\thesubsection}{\numbernamesep}{}%
\titleformat{\subsubsection}{\titlefont\normalsize}{\thesubsubsection}{\numbernamesep}{}%
\titleformat{\paragraph}[runin]{\titlefont\normalsize}{\theparagraph}{\numbernamesep}{}%
\titleformat{\subparagraph}[runin]{\titlefont\normalsize}{\thesubparagraph}{\numbernamesep}{}%
\titlespacing*{\chapter}{0pt}{50pt}{40pt}%
\titlespacing*{\section}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}%
\titlespacing*{\subsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}%
\titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}%
\titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{1em}%
\titlespacing*{\subparagraph}{\parindent}{3.25ex plus 1ex minus .2ex}{1em}%
}
\makeatother
% Formata o pós-texto.
\makeatletter
\g@addto@macro\backmatter{%
\addtocontents{toc}{\setcounter{tocdepth}{0}}%
\pagestyle{plain}%
\titleformat{\chapter}[display]{\centering\titlefont\Huge}{}{0pt}{}%
\titleformat{\section}{\titlefont\Large}{}{0pt}{}%
\titleformat{\subsection}{\titlefont\large}{}{0pt}{}%
\titleformat{\subsubsection}{\titlefont\normalsize}{}{0pt}{}%
\titlespacing*{\chapter}{0pt}{0pt}{40pt}%
}
\makeatother
% Campo de assinatura com data.
\newcommand{\signaturefield}[1]{{%
\par\vspace{24pt}\linespread{1.0}\footnotesize%
\noindent\makebox[0.7\textwidth]{\hrulefill}\hfill\makebox[0.2\textwidth]{\hrulefill} \\[-6pt]%
\parbox[t]{0.7\textwidth}{#1}\hfill\makebox[0.2\textwidth][c]{Data}%
}}
% Listagem de palavras-chave em português e inglês.
\newcommand{\portuguesekeywords}[1]{\par\vspace{12pt}\noindent\textbf{\textsc{Palavras-Chave:}} #1}
\newcommand{\englishkeywords}[1]{\par\vspace{12pt}\noindent\textbf{\textsc{Keywords:}} #1}
% Versão antiga.
% \newenvironment{definition}[1][2cm]{%
% \renewcommand{\descriptionlabel}[1]{\makebox[#1][r]{\hspace\labelsep\normalfont\bfseries\hfill##1}}%
% \begin{description}%
% }{%
% \end{description}%
% }
% Ambiente para definições diversas, como abreviaturas, símbolos etc.
\newenvironment{definition}[1][Pirulita]{%
\begin{list}{}{%
\renewcommand\makelabel[1]{\hfill\textbf{##1}}%
\settowidth\labelwidth{\makelabel{#1}}%
\setlength\leftmargin{\labelwidth}%
\addtolength\leftmargin{\labelsep}%
}%
}{%
\end{list}%
}
% Figuras com rótulo e fonte.
\newcommand{\figuresource}{}
\newenvironment{standardfigure}[3][Próprio autor.]{%
\begin{figure}%
\centering%
\caption{#2}\label{#3}%
\renewcommand{\figuresource}{#1}%
}{%
\par\vspace{6pt}\noindent%
\textbf{Fonte:} \figuresource%
\end{figure}%
}
% Tabelas com rótulo e fonte.
\newcommand{\tablesource}{}
\newenvironment{standardtable}[3][Próprio autor.]{%
\begin{table}%
\centering%
\caption{#2}\label{#3}%
\renewcommand{\tablesource}{#1}%
}{%
\par\vspace{12pt}\noindent%
\textbf{Fonte:} \tablesource%
\end{table}%
}
% Campos de configuração de metadados.
\renewcommand{\author}[1]{\newcommand{\theauthor}{#1}}
\renewcommand{\title}[1]{\newcommand{\thetitle}{#1}}
\renewcommand{\date}[1]{\newcommand{\thedate}{#1}}
\newcommand{\firstauthor}[2]{%
\newcommand{\thefirstauthor}{#1}\author{#1}%
\newcommand{\thefirstauthorreference}{#2}%
}
\newcommand{\secondauthor}[2]{%
\newcommand{\thesecondauthor}{#1}%
\newcommand{\thesecondauthorreference}{#2}%
}
\newcommand{\subtitle}[1]{\newcommand{\thesubtitle}{#1}}
\newcommand{\numberofpages}[1]{\newcommand{\thenumberofpages}{#1}}
\newcommand{\type}[1]{\newcommand{\thetype}{#1}}
\newcommand{\program}[1]{\newcommand{\theprogram}{#1}}
\newcommand{\institution}[1]{\newcommand{\theinstitution}{#1}}
\newcommand{\degree}[2]{%
\newcommand{\thedegree}{#1}%
\newcommand{\thefulldegree}{#2}%
}
\newcommand{\focusarea}[1]{\newcommand{\thefocusarea}{#1}}
\newcommand{\supervisor}[2]{%
\newcommand{\thesupervisor}{#1}%
\newcommand{\thesupervisorinstitution}{#2}%
}
\newcommand{\cosupervisor}[2]{%
\newcommand{\thecosupervisor}{#1}%
\newcommand{\thecosupervisorinstitution}{#2}%
}
\newcommand{\city}[1]{\newcommand{\thecity}{#1}}
\newcommand{\deposityear}[1]{\newcommand{\thedeposityear}{#1}}
\newcommand{\catalogcomments}[1]{\newcommand{\thecatalogcomments}{#1}}
\newcommand{\catalogkeywords}[1]{\newcommand{\thecatalogkeywords}{#1}}
\newcommand{\firstcommiteemember}[3]{%
\newcommand{\thefirstcommiteemember}{#1}%
\newcommand{\thefirstcommiteememberinstitution}{#2}%
\newcommand{\thefirstcommiteememberdecision}{#3}%
}
\newcommand{\secondcommiteemember}[3]{%
\newcommand{\thesecondcommiteemember}{#1}%
\newcommand{\thesecondcommiteememberinstitution}{#2}%
\newcommand{\thesecondcommiteememberdecision}{#3}%
}
\newcommand{\thirdcommiteemember}[3]{%
\newcommand{\thethirdcommiteemember}{#1}%
\newcommand{\thethirdcommiteememberinstitution}{#2}%
\newcommand{\thethirdcommiteememberdecision}{#3}%
}
\newcommand{\fourthcommiteemember}[3]{%
\newcommand{\thefourthcommiteemember}{#1}%
\newcommand{\thefourthcommiteememberinstitution}{#2}%
\newcommand{\thefourthcommiteememberdecision}{#3}%
}
\newcommand{\fifthcommiteemember}[3]{%
\newcommand{\thefifthcommiteemember}{#1}%
\newcommand{\thefifthcommiteememberinstitution}{#2}%
\newcommand{\thefifthcommiteememberdecision}{#3}%
}
%
% Folhas e capítulos específicos.
%
% Contra-capa.
\newcommand{\centerrule}[2][0.6pt]{$\vcenter{\hbox{\rule{#2}{#1}}}$}
\newcommand{\authorseparator}{{\small\centerrule{1cm} \textit{\&} \centerrule{1cm}\par}}
\newcommand{\backcover}{{\centering\sc%
{% Autores.
\linespread{1.0}\large\thefirstauthor\par%
\ifdefined\thesecondauthor%
{\authorseparator\thesecondauthor}\par%
\fi%
}%
\vspace{2.5cm}%
{\huge\thetitle}\par%
\ifdefined\thesubtitle{\large\thesubtitle\par}\fi\vfill%
\hfill\parbox{0.60\textwidth}{%
\normalfont\small \thetype\ apresentada ao \emph{\theprogram} da \theinstitution\ para obtenção do título de \emph{\thefulldegree}.\par\vspace{12pt}%
Área de Concentração: \thefocusarea\par\vspace{12pt}%
Orientador: \thesupervisor%
\ifdefined\thecosupervisor%
{\\ Coorientador: \thecosupervisor}\par%
\fi%
}\par\vfill%
\centering\normalfont\thecity\\\thedeposityear\par%
}}
% Errata.
\newcommand{\corrections}[1]{{%
\chapter{Errata}%
\begin{center}%
\begin{tabular}{cccc}%
\toprule%
\bf Página & \bf Linha & \bf Onde se lê & \bf Leia-se \\%
\midrule%
#1%
\bottomrule%
\end{tabular}%
\end{center}%
}}
% Ficha catalográfica.
\newcommand{\catalogframe}{{%
\setlength{\fboxsep}{6pt}%
\begin{center}%
\fbox{\parbox{10cm}{\setlength{\parindent}{12pt}\footnotesize%
\noindent\thefirstauthorreference%
\ifdefined\thesecondauthorreference%
; \thesecondauthorreference%
\fi%
\par%
\thetitle%
\ifdefined\thesubtitle%
: \thesubtitle%
\fi%
\ / \thefirstauthor%
\ifdefined\thesecondauthor%
, \thesecondauthor%
\fi%
\ --- \thecity, \thedeposityear. \par%
\thenumberofpages p. \thecatalogcomments. \par \vspace{12pt}%
\thetype\ (\thedegree). \theinstitution. \par \vspace{12pt}%
Orientador: \thesupervisor.%
\ifdefined\thecosupervisor%
\\ \indent Coorientador: \thecosupervisor.%
\fi%
\par\vspace{12pt}%
\thecatalogkeywords%
}}%
\end{center}%
}}
% Autorização e catalogação.
\newcommand{\authorization}{{%
\chapter{Autorização}%
Autorizo a reprodução total ou parcial deste trabalho, por qualquer meio convencional ou eletrônico, para fins de estudo e pesquisa, desde que citada a fonte.%
\signaturefield{\theauthor}%
\ifdefined\thesecondauthor%
\signaturefield{\thesecondauthor}%
\fi%
\vfill%
\catalogframe%
}}
% Aprovação.
\newcommand{\approval}{{%
\chapter{Aprovação}%
\thetype\ apresentada ao \emph{\theprogram} da \theinstitution\ para obtenção do título de \emph{\thefulldegree}.\par%
Aprovada em \thedate\ pela banca examinadora:%
\signaturefield{\thesupervisor\ (Orientador) \\ \thesupervisorinstitution}%
\ifdefined\thecosupervisor%
\signaturefield{\thecosupervisor\ (Coorientador) \\ \thecosupervisorinstitution}%
\fi%
\ifdefined\thefirstcommiteemember%
\signaturefield{\thefirstcommiteemember \\ \thefirstcommiteememberinstitution. \textit{\thefirstcommiteememberdecision.}}%
\fi%
\ifdefined\thesecondcommiteemember%
\signaturefield{\thesecondcommiteemember \\ \thesecondcommiteememberinstitution. \textit{\thesecondcommiteememberdecision.}}%
\fi%
\ifdefined\thethirdcommiteemember%
\signaturefield{\thethirdcommiteemember \\ \thethirdcommiteememberinstitution. \textit{\thethirdcommiteememberdecision.}}%
\fi%
\ifdefined\thefourthcommiteemember%
\signaturefield{\thefourthcommiteemember \\ \thefourthcommiteememberinstitution. \textit{\thefourthcommiteememberdecision.}}%
\fi%
\ifdefined\thefifthcommiteemember%
\signaturefield{\thefifthcommiteemember \\ \thefifthcommiteememberinstitution. \textit{\thefifthcommiteememberdecision.}}%
\fi%
}}
% Dedicatória.
\newcommand{\inscription}[1]{{%
\chapter{Dedicatória}%
#1%
}}
% Agradecimentos.
\newcommand{\acknowledgement}[1]{{%
\chapter{Agradecimentos}%
#1%
}}
% Epígrafe.
\newcommand{\epigraphchapter}[1]{{%
\chapter{}%
\vfill%
#1%
}}
% Resumo.
\newcommand{\portugueseabstract}[2]{{%
\chapter{Resumo}%
#1%
\portuguesekeywords{#2}%
}}
% Abstract.
\newcommand{\englishabstract}[2]{{%
\chapter{Abstract}%
\begin{english}
#1%
\end{english}
\englishkeywords{\textenglish{#2}}%
}}
% Glossário.
\newcommand{\backglossary}[2][Glossário]{{%
\chapter{#1}%
#2%
}}
% Appêndices.
\newcommand{\appendices}{%
\setcounter{chapter}{1}%
\titleformat{\chapter}[display]{\centering\titlefont\Huge}{}{0pt}{Apêndice \Alph{chapter} \\ \LARGE\mdseries}[\addtocounter{chapter}{1}]%
}
\renewcommand{\appendix}[2]{{%
\chapter[Apêndice \Alph{chapter} --- #1]{#1}%
#2%
}}
% Anexos.
\newcommand{\annexes}{%
\setcounter{chapter}{1}%
\titleformat{\chapter}[display]{\centering\titlefont\Huge}{}{0pt}{Anexo \thechapter \\ \LARGE\mdseries}[\addtocounter{chapter}{1}]%
}
\newcommand{\annex}[2]{{%
\chapter[Anexo \thechapter\ --- #1]{#1}%
#2%
}}
% Índice.
\newcommand{\remissiveindex}[2][Índice]{{%
\titleformat{\chapter}[display]{\centering\titlefont\Huge}{}{0pt}{}%
\linespread{1.0}\normalfont\renewcommand\labelitemi{}\renewcommand\labelitemii{}%
\chapter{#1}%
#2%
}}