forked from douglasrizzo/Classe-Latex-FEI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfei.cls
474 lines (382 loc) · 16.5 KB
/
fei.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
%%
%% This is file `fei.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fei.dtx (with options: `class')
%% -----------------------------------------------------------------------------------------------------
%% fei --- Class for the creation of academic works under the typographic rules of FEI University Center
%% Author: Douglas De Rizzo Meneghetti
%% E-mail: douglasrizzo@fei.edu.br
%%
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% -----------------------------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{fei}[2017/07/28 4.0.1 Modelo da FEI]
\DeclareOption{xindy}{
\PassOptionsToPackage{\CurrentOption}{imakeidx}
\PassOptionsToPackage{\CurrentOption}{glossaries}
}
\newif\ifglossaries
\glossariesfalse
\DeclareOption{symbols}{
\glossariestrue
\PassOptionsToPackage{\CurrentOption}{glossaries}
}
\DeclareOption{acronym}{
\glossariestrue
\PassOptionsToPackage{\CurrentOption}{glossaries}
}
\newif\ifsublist
\sublistfalse
\DeclareOption{sublist}{\sublisttrue}
\newif\ifrascunho
\rascunhofalse
\DeclareOption{rascunho}{\rascunhotrue}
\newif\ifarial
\DeclareOption{arial}{\arialtrue}
\DeclareOption{times}{\arialfalse}
\newif\ifoneside
\DeclareOption{oneside}{\onesidetrue}
\DeclareOption{twoside}{\onesidefalse}
\DeclareOption{algo-as-figure}{\PassOptionsToPackage{figure}{algorithm2e}}%
\PassOptionsToClass{a4paper}{memoir}
\ExecuteOptions{oneside,times}
\ProcessOptions\relax % processa todas as opções
\ifoneside
\LoadClass[oneside]{memoir}
\else
\LoadClass{memoir}
\fi
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[english,brazil]{babel}
\RequirePackage{csquotes}
\renewcommand{\normalsize}{\fontsize{12pt}{14.4pt}\selectfont} % fonte do texto
\renewcommand{\footnotesize}{\fontsize{10pt}{12pt}\selectfont} % fonte das notas de rodapé
\setlrmarginsandblock{30mm}{20mm}{*}
\setulmarginsandblock{30mm}{20mm}{*}
\checkandfixthelayout
\linespread{1.25} % espaçamento entre linhas
\setlength{\parindent}{1.25cm} % recuo do paragrafo
\makepagestyle{title} % pagina de titulo
\makepagestyle{plain} % estilo padrão
\makeevenhead{plain}{\footnotesize\thepage}{}{}
\makeoddhead{plain}{}{}{\footnotesize\thepage}
\setlength{\headheight}{14.4pt} % remove warning do memoir
\RequirePackage[font={singlespacing},format=hang, justification=raggedright,labelsep=endash,singlelinecheck=false]{caption} % fontes das legendas
\selectlanguage{brazil} % idioma do documento
\widowpenalty=10000
\clubpenalty=10000
\RequirePackage{mathtools} % matematica
\RequirePackage{lmodern} % Latin Modern, fontes tipográficas mais recentes que as do Knuth (Computer Modern)
\RequirePackage{icomma} % vírgula como separador decimal
\ifarial
\usepackage[scaled]{uarial}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\else
\RequirePackage{times} % usar fonte times no texto todo
\fi
\RequirePackage{graphicx} % figuras
\RequirePackage{morewrites} % permite ao LaTeX escrever em mais de 16 arquivos auxiliares simultaneamente
\RequirePackage[plain,portuguese,algochapter,linesnumbered,inoutnumbered]{algorithm2e}
\SetKwInput{Entrada}{Entrada}
\SetKwInput{Saida}{Sa\'ida}
\SetKwInput{Dados}{Dados}
\SetKwInput{Resultado}{Resultado}
\SetKw{Ate}{at\'e}
\SetKw{Retorna}{retorna}
\SetKwBlock{Inicio}{in\'icio}{fim}
\SetKwIF{Se}{SenaoSe}{Senao}{se}{ent\~ao}{sen\~ao se}{sen\~ao}{fim se}
\SetKwSwitch{Selec}{Caso}{Outro}{selecione}{faça}{caso}{sen\~ao}{fim caso}{fim selec}
\SetKwFor{Para}{para}{fa\c{c}a}{fim para}
\SetKwFor{ParaPar}{para}{fa\c{c}a em paralelo}{fim para}
\SetKwFor{ParaCada}{para cada}{fa\c{c}a}{fim para cada}
\SetKwFor{ParaTodo}{para todo}{fa\c{c}a}{fim para todo}
\SetKwFor{Enqto}{enquanto}{fa\c{c}a}{fim enqto}
\SetKwRepeat{Repita}{repita}{at\'e}
\renewcommand{\@algocf@capt@plain}{above} % legenda acima
\SetAlgoCaptionSeparator{ --} % separador da legenda
\SetAlCapSty{} % estilo da primeira parte da legenda (remove negrito padrão)
\SetAlCapFnt{\normalsize} % fonte da primeira parte da legenda
\let\l@algocf\l@figure
\let\oldlistofalgorithms\listofalgorithms
\renewcommand{\listofalgorithms}{{%
\setlength{\cftfigurenumwidth}{6.2em} % espaço onde a palavra "Algoritmo" é escrita
\renewcommand{\cftfigurepresnum}{Algoritmo } % escrita que precede cada entrada na lista
\renewcommand{\cftfigureaftersnum}{\hfill--\hfill} % traço na frente da escrita que precede as entradas na lista
\part*{\listalgorithmcfname}\pagestyle{empty}\@starttoc{loa}\cleardoublepage % titulo com formato padrão de todas as listas
}}
\RequirePackage{amsthm,thmtools}
\renewcommand{\listtheoremname}{Lista de Teoremas} % traduz nome da lista de teoremas
\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
headfont=\normalfont\bfseries,
notefont=\normalfont\bfseries, notebraces={-- }{},
bodyfont=\normalfont,
postheadspace=1em
]{feistyle}
\declaretheorem[style=feistyle,name=Axioma]{axioma}
\declaretheorem[style=feistyle,name=Teorema]{teorema}
\declaretheorem[style=feistyle,name=Lema]{lema}
\declaretheorem[style=feistyle,name=Hip\'otese]{hipotese}
\declaretheorem[style=feistyle,name=Proposi\c{c}\~ao]{proposicao}
\declaretheorem[style=feistyle,name=Conjectura]{conjectura}
\declaretheorem[style=feistyle,name=Paradoxo]{paradoxo}
\declaretheorem[style=feistyle,name=Corol\'ario]{corolario}
\declaretheorem[style=feistyle,name=Defini\c{c}\~ao]{definicao}
\declaretheorem[style=feistyle,name=Exemplo]{exemplo}
\declaretheorem[style=remark,name=Demonstra\c{c}\~ao,qed=\qedsymbol,numbered=no]{prova}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\counterwithout{algocf}{chapter}
\counterwithout{equation}{chapter}
\renewcommand{\figurename}{\fontsize{10pt}{10pt}\selectfont Figura}
\renewcommand{\tablename}{\fontsize{10pt}{10pt}\selectfont Tabela}
\RequirePackage{enumitem}
\setlist[1]{align=left,leftmargin=2.25cm,labelsep=0.5em,label={\alph*)},ref=\theenumi}
\setlist[2]{align=left,labelwidth=*,labelsep=0.5em,label={--},ref=\theenumii}
\tightlists
\renewenvironment{itemize}{\begin{enumerate}}{\end{enumerate}}
\renewcommand{\floatpagefraction}{.8} % página terá apenas floats se o float ocupar pelo menos 80% da página
\renewcommand{\part}{%
\@startsection{part}{-1}{0pt}{\baselineskip}{\baselineskip}{\cleardoublepage\fontsize{12pt}{14.4pt}\centering\bfseries\MakeUppercase}}
\renewcommand{\chapter}{\cleardoublepage\pagestyle{plain}%
\@startsection{chapter}{0}{0pt}{\baselineskip}{\baselineskip}{\fontsize{12pt}{14.4pt}\bfseries\MakeUppercase}}
\renewcommand{\section}{%
\@startsection{section}{1}{0pt}{\baselineskip}{\baselineskip}{\fontsize{12pt}{14.4pt}\MakeUppercase}}
\renewcommand{\subsection}{%
\@startsection{subsection}{2}{0pt}{\baselineskip}{\baselineskip}{\fontsize{12pt}{14.4pt}\bfseries}}
\renewcommand{\subsubsection}{%
\@startsection{subsubsection}{3}{0pt}{\baselineskip}{\baselineskip}{\fontsize{12pt}{14.4pt}\bfseries\itshape}}
\renewcommand{\paragraph}{%
\@startsection{paragraph}{4}{0pt}{\baselineskip}{\baselineskip}{\fontsize{12pt}{14.4pt}\itshape}}
\setcounter{secnumdepth}{4} % numerar divisões até o quarto nível (paragraph)
\setcounter{tocdepth}{4} % incluir divisões no sumário até o quarto nível (paragraph)
\renewcommand{\cftchapterindent}{0pt}
\renewcommand{\cftsectionindent}{0pt}
\renewcommand{\cftsubsectionindent}{0pt}
\renewcommand{\cftsubsubsectionindent}{0pt}
\renewcommand{\cftparagraphindent}{0pt}
\renewcommand{\cftchapternumwidth}{4em}
\renewcommand{\cftsectionnumwidth}{4em}
\renewcommand{\cftsubsectionnumwidth}{4em}
\renewcommand{\cftsubsubsectionnumwidth}{4em}
\renewcommand{\cftparagraphnumwidth}{4em}
\renewcommand{\cftbeforechapterskip}{0pt} % remove recuo antes de entradas de capítulos no sumário
\renewcommand{\cftchapterfont}{\bfseries} % coloca o titulo de capítulos em negrito
\renewcommand{\cftsubsectionfont}{\bfseries} % coloca o titulo das secoes em negrito
\renewcommand{\cftsubsubsectionfont}{\bfseries\itshape} % coloca o titulo das secoes em negrito
\renewcommand{\cftparagraphfont}{\itshape} % coloca o titulo das secoes em negrito
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % pontos no sumário para partes
\renewcommand{\cftchapterleader}{\cftdotfill{\cftdotsep}} % pontos no sumário para capítulos
\renewcommand{\cftchapterpagefont}{} % o número da página dos capítulos não é em negrito
\setlength{\cftfigurenumwidth}{7.2em} % espaço onde a palavra "Ilustração" é escrita
\setlength{\cfttablenumwidth}{5.7em} % espaço onde a palavra "Tabela" é escrita
\renewcommand{\cftfigurepresnum}{Ilustra\c{c}\~ao } % escrita que precede cada entrada na lista de ilustrações
\renewcommand{\cfttablepresnum}{Tabela } % escrita que precede cada entrada na lista de tabelas
\renewcommand{\cftfigureaftersnum}{\hfill--\hfill} % traço na frente da escrita que precede as entradas na lista de ilustrações
\renewcommand{\cfttableaftersnum}{\hfill--\hfill} % traço na frente da escrita que precede as entradas na lista de tabelas
\renewcommand{\tableofcontents}{\part*{\contentsname}\pagestyle{empty}\@starttoc{toc}\cleardoublepage}
\renewcommand{\listoftables}{\part*{\listtablename}\pagestyle{empty}\@starttoc{lot}\cleardoublepage}
\renewcommand{\listoffigures}{\part*{\listfigurename}\pagestyle{empty}\@starttoc{lof}\cleardoublepage}
\renewcommand{\listoftheorems}{\begingroup%
\let\oldnumberline\numberline%
\renewcommand{\numberline}{Teorema~\oldnumberline}%
\part*{\listtheoremname}\thispagestyle{empty}\@starttoc{loe}\cleardoublepage\endgroup}
\def\and{\\} % modifica função do comando \and para ele ser usado na declaração de múltiplos autores
\renewcommand{\maketitle}{%
\pagestyle{empty}%
\begin{center}%
\MakeUppercase{\@instituicao}\\[\baselineskip]%
\uppercase\expandafter{\@author}%
\vfill%
\textbf{\MakeUppercase{\@title}}\ifthenelse{\isundefined{\@subtitulo}}{}{: \@subtitulo}%
\vfill%
\@cidade\\%
\number\year%
\end{center}%
\cleardoublepage
}
\newenvironment{folhaderosto}{
\setcounter{page}{1}
\thispagestyle{empty}
\begin{center}
\uppercase\expandafter{\@author}\\
\vspace*{0.45\textheight}
\textbf{\MakeUppercase{\@title}}\ifthenelse{\isundefined{\@subtitulo}}{}{: \@subtitulo}
\vfill
\begin{flushright}\begin{SingleSpace}
\begin{minipage}{0.55\textwidth}}{\end{minipage}{}
\end{SingleSpace}\end{flushright}
\vfill
\@cidade\\
\number\year
\end{center}%
\clearpage}
\RequirePackage{pdfpages}
\RequirePackage{ifthen}
\newcommand{\folhadeaprovacao}{
\ifrascunho
\thispagestyle{empty}\mbox{}\vfill\begin{center}\begin{Huge}Folha de aprova\c{c}\~{a}o\end{Huge}\vfill\end{center}\cleardoublepage
\else
\includepdf{ata.pdf}\cleardoublepage
\fi
}
\newcommand{\fichacatalografica}{
\if@twoside
\else
\addtocounter{page}{-1}
\fi
\ifrascunho
\thispagestyle{empty}\mbox{}\vfill\begin{center}\begin{Huge}Ficha catalogr\'{a}fica\end{Huge}\vfill\end{center}\cleardoublepage
\else
\includepdf{ficha.pdf}\cleardoublepage
\fi
}
\newcommand{\subtitulo}[1]{\def\@subtitulo{#1}}
\newcommand{\smallcaption}[1]{\captionsetup{font=small}\caption*{#1}}
\def\@cidade{S\~ao Bernardo do Campo}
\newcommand{\cidade}[1]{\def\@cidade{#1}}
\def\@instituicao{Centro Universit\'ario FEI}
\newcommand{\instituicao}[1]{\def\@instituicao{#1}}
\newcommand{\advisor}[1]{\def\@advisor{#1}}
\def\@curso{Coisa Nenhuma}
\newcommand{\curso}[1]{\def\@curso{#1}}
\newcommand{\dedicatoria}[1]{
\cleardoublepage
\thispagestyle{empty}
\begin{flushleft}
\vspace*{\fill}
\hspace*{0.4\paperwidth\relax}
\begin{minipage}[l]{0.5\textwidth}
#1
\end{minipage}
\end{flushleft}
}
\newcommand{\epigrafe}[2]{
\cleardoublepage
\thispagestyle{empty}
\begin{flushleft}
\vspace*{\fill}
\hspace*{0.4\paperwidth\relax}
\begin{minipage}[l]{0.5\textwidth}
``{#1}''\\#2
\end{minipage}
\end{flushleft}
}
\newenvironment{resumo}{\part*{Resumo}\pagestyle{empty}}{\cleardoublepage\pagestyle{plain}\setlength{\parindent}{1.25cm}}
\renewenvironment{abstract}{\selectlanguage{english}\part*{Abstract}\pagestyle{empty}\setlength{\parindent}{1.25cm}}{\cleardoublepage\pagestyle{plain}\selectlanguage{brazil}}
\newenvironment{agradecimentos}{\part*{Agradecimentos}\pagestyle{empty}}{\cleardoublepage\pagestyle{plain}}
\RequirePackage{imakeidx}
\renewcommand{\indexname}{\'Indice}
\let\oldmakeindex\makeindex
\let\oldprintindex\printindex
\renewcommand{\makeindex}{\oldmakeindex[title=\noindent\hfill\'INDICE\hfill\mbox{}]}
\renewcommand{\printindex}{\addcontentsline{toc}{chapter}{\hspace{\cftchapternumwidth}\'INDICE}%
\renewcommand{\chapter}{%
\@startsection{chapter}{0}{0pt}{0pt}{1.5cm}{\clearpage\fontsize{12pt}{14.4pt}\bfseries\MakeUppercase}}%
\oldprintindex}%
\RequirePackage[pdftex,pdfborder={0 0 0},colorlinks={false}]{hyperref}
\ifglossaries
\ifsublist
\RequirePackage[nomain,nonumberlist]{glossaries}
\setglossarystyle{alttree}
\glssetwidest[0]{}
\glssetwidest[1]{aaaaaaaaaaaa}
\renewcommand*{\glossarypreamble}{\thispagestyle{empty}\pagestyle{empty}\vspace*{-2\baselineskip}}
\else
\RequirePackage[nomain,nonumberlist,nogroupskip]{glossaries}
\newglossarystyle{mylong}{%
\setglossarystyle{long}% base this style on the long style
\renewenvironment{theglossary}{%
\begin{longtable*}{lp{\glsdescwidth}}}%
{\end{longtable*}}%
}%
\setglossarystyle{mylong}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\setlength\glsdescwidth{\linewidth}
\renewcommand*{\glossarypreamble}{\thispagestyle{empty}\pagestyle{empty}}
\fi
\addto\captionsbrazil{%
\renewcommand*{\acronymname}{\noindent\hfill Lista de Abreviaturas \hfill \mbox{}}%
\renewcommand*{\glssymbolsgroupname}{\noindent\hfill Lista de S\'imbolos \hfill \mbox{}}}
\renewcommand*{\glsclearpage}{\pagestyle{empty}}
\renewcommand*{\glossarypostamble}{\pagestyle{empty}\cleardoublepage}
\fi
\addto\captionsbrazil{%
\renewcommand*{\listfigurename}{Lista de Ilustra\c{c}\~oes}%
\renewcommand*{\contentsname}{Sum\'ario}}%
\newcommand{\palavraschave}[1]{\mbox{}\\\noindent Palavras-chave: #1}% o resumo pede palavras chave no final
\newcommand{\keywords}[1]{\mbox{}\\\noindent Keywords: #1}% mesma coisa, mas pro abstract
\renewcommand{\appendix}{%
\renewcommand{\chaptername}{\appendixname}%
\setcounter{chapter}{0}% zera o contador do capítulo
\renewcommand{\thechapter}{\Alph{chapter}}% deixa o contador do capítulo em alfabético
\renewcommand{\chapter}[1]{% redefine o comando do capítulo
\stepcounter{chapter}% soma 1 ao contador do capítulo
\cleardoublepage\phantomsection\thispagestyle{empty}\mbox{}\vfill\begin{center}\MakeUppercase{\textbf{AP\^ENDICE \thechapter\ --} ##1}\end{center}\vfill% adiciona uma folha com a letra e título do apêndice
\addcontentsline{toc}{chapter}{\hspace{\cftchapternumwidth}AP\^ENDICE \Alph{chapter} -- ##1}%
\newpage%
}%
}%
\newcommand{\anexos}{%
\renewcommand{\chaptername}{Anexo}%
\setcounter{chapter}{0}%
\renewcommand{\thechapter}{\Alph{chapter}}%
\renewcommand{\chapter}[1]{%
\stepcounter{chapter}%
\cleardoublepage\phantomsection\thispagestyle{empty}\mbox{}\vfill\begin{center}\MakeUppercase{\textbf{ANEXO \thechapter\ --} ##1}\end{center}\vfill%
\phantomsection%
\addcontentsline{toc}{chapter}{\hspace{\cftchapternumwidth}ANEXO \Alph{chapter} -- ##1}%
\newpage%
}%
}%
\RequirePackage[backend=biber, safeinputenc=true, uniquelist=false, isbn=false, doi=false, style=abnt,extrayear]{biblatex}
\setlength{\bibitemsep}{1.0\baselineskip}
\DefineBibliographyStrings{brazil}{%
bibliography = {REFER\^ENCIAS}
}
\newcommand{\citeonline}[1]{\textcite{#1}}
\defbibheading{bibliography}[\bibname]{%
\clearpage\phantomsection\addcontentsline{toc}{chapter}{\bfseries\hspace{\cftchapternumwidth}REFER\^ENCIAS}% adiciona o titulo ao sumario
\part*{REFER\^ENCIAS}
\urlstyle{same}% URLs nas referências devem ter a mesma fonte do texto
}
\newcommand*{\citefloat}[1]{\citeauthor*{#1}, \citeyear*{#1}}
\renewenvironment{quote}
{\begin{SingleSpace}\list{}{%
\fontsize{10pt}{1em}%
\leftmargin=4cm}%
\item\relax\ignorespaces}
{\endlist\end{SingleSpace}}
\renewenvironment{quotation}
{\begin{SingleSpace}\list{}{%
\fontsize{10pt}{1em}%
\leftmargin=2cm \rightmargin=2cm%
\listparindent .5cm \itemindent}%
\item\relax}
{\endlist\end{SingleSpace}}
%%
%% Copyright (C) 2017 by Douglas De Rizzo Meneghetti <douglasrizzo@fei.edu.br>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in the file:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% This work is "maintained" (as per LPPL maintenance status) by
%% Douglas De Rizzo Meneghetti.
%%
%% This work consists of the file fei.dtx,
%% and the derived files fei.pdf and
%% fei.cls.
%%
%%
%% End of file `fei.cls'.