eletrotupi / tcc/ monografia/textsi.cls204e7cf19d87a7f2cc816beab1279ba854cd1127
30.3 KB | 925 lines Raw
1
%==============================================================================
2
% Identificação
3
%==============================================================================
4
\def\currversion{3/5/2014}
5

6
\typeout{^^J^^J
7
--------------------------------------------------^^J
8
CLASSE textsi^^J
9
Formatação de Documentos LaTeX do TSI^^J
10
--------------------------------------------------^^J
11
Agradecimentos^^J
12
Marilton Aguiar, pela Classe de Formatação de Documentos LaTeX da UFPEL^^J
13
Rafael Krolow, pelo esqueleto de Template para o Documento LaTeX par o TSI^^J
14
--------------------------------------------------^^J
15
Desenvolvimento por Giovane de Oliveira Torres (ggiovaneotorres@gmail.com)^^J
16
--------------------------------------------------^^J
17
Versão: \currversion^^J
18
--------------------------------------------------^^J^^J}
19

20
\NeedsTeXFormat{LaTeX2e}
21
\ProvidesClass{textsi}[\currversion]
22

23
%==============================================================================
24
% Declaração de opções
25
%==============================================================================
26

27
% Órgãos para o cabeçalho do título.
28

29
\newcommand{\ministerio}[1]{\gdef\@ministerio{#1}}
30
\ministerio{Minist{\'e}rio da Educa\c c{\~a}o}
31

32
\newcommand{\secretaria}[1]{\gdef\@secretaria{#1}}
33
\secretaria{Secretaria de Educa\c c{\~a}o Profissional e Tecnol{\'o}gica}
34

35
\newcommand{\instituto}[1]{\gdef\@instituto{#1}}
36
\instituto{Instituto Federal Sul-Rio-Grandense}
37

38
\newcommand{\campus}[1]{\gdef\@campus{#1}}
39
\campus{C{\^a}mpus Pelotas}
40

41
\newcommand{\thecurso}[1]{\gdef\@thecurso{#1}}
42
\thecurso{Curso Superior de Tecnologia em Sistemas para Internet}
43

44
\newcommand{\documento}[1]{\gdef\@documento{#1}}
45
\newcommand{\tipodocumento}[1]{\gdef\@tipodocumento{#1}}
46
\newcommand{\descricaodocumento}[1]{\gdef\@descricaodocumento{#1}}
47

48
% Para a folha de aprovação
49

50
\newcommand{\instituicaoadvisor}[1]{\gdef\@instituicaoadvisor{#1}}
51

52
\newcommand{\membroi}[1]{\gdef\@membroi{#1}}
53
\newcommand{\membroii}[1]{\gdef\@membroii{#1}}
54
\newcommand{\membroiii}[1]{\gdef\@membroiii{#1}}
55

56
\newcommand{\instituicaomembroi}[1]{\gdef\@instituicaomembroi{#1}}
57
\newcommand{\instituicaomembroii}[1]{\gdef\@instituicaomembroii{#1}}
58
\newcommand{\instituicaomembroiii}[1]{\gdef\@instituicaomembroiii{#1}}
59

60
% Para o texto
61

62
\newcommand{\source}[1]{\\ Fonte: #1}
63

64
% Opções
65

66
\DeclareOption{tcc}{
67
\documento{Trabalho de Conclus{\~a}o de Curso}
68
\tipodocumento{Trabalho de Conclus{\~a}o de Curso (\@nomecurso) -- \@unidade}
69
\descricaodocumento{Trabalho de Conclus{\~a}o de Curso apresentado como requisito parcial {\`a} obten\c c{\~a}o ao t{\'i}tulo de tecn{\'o}logo em Sistemas para Internet do Instituto Federal Sul-Rio-Grandense}
70
}
71

72
\newcommand{\capa}[1]{\gdef\@capa{#1}}
73
\DeclareOption{capa}{\capa{1}}
74

75
\newcommand{\nocipinfo}[1]{\gdef\@nocipinfo{#1}}
76
\DeclareOption{nocipinfo}{\nocipinfo{1}}
77

78
\DeclareOption{english}{\@englishtrue\OptionNotUsed}\newif\if@english
79
\DeclareOption{oneside}{\AtEndOfClass{\@twosidefalse}\OptionNotUsed}
80
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
81
\ProcessOptions
82
\relax
83

84
%==============================================================================
85
% Herança da classe `report' e inclusão de pacotes e arquivos necessários
86
%==============================================================================
87
\LoadClass[12pt,a4paper,oneside]{report}
88

89
\RequirePackage[english,brazilian]{babel}
90
\RequirePackage{ulem}
91
\RequirePackage{lastpage}
92
\RequirePackage{indentfirst}
93
\RequirePackage{natbib}
94
\RequirePackage{chngcntr}
95
\RequirePackage{eso-pic}
96
\RequirePackage{xcolor}
97
\RequirePackage{setspace}
98
\RequirePackage{geometry}
99
\RequirePackage{listings}
100

101
\geometry{top=3cm,right=2cm,left=3cm,bottom=2cm}
102

103
\definecolor{laranjaufpel}{rgb}{1,0.6,0}
104
\definecolor{verdeufpel}{rgb}{0.09,0.7,0.44}
105
\definecolor{azulufpel}{rgb}{0.07,0.49,0.72}
106
\definecolor{cinzaufpel}{rgb}{0.85,0.85,0.85}
107

108
%==============================================================================
109
% Configuração de listagens de código (pacote listings)
110
%==============================================================================
111
\lstdefinelanguage{yaml}{
112
  keywords={image,build,context,file,ports,environment,volumes,depends_on,
113
            condition,healthcheck,test,interval,timeout,retries,start_period,
114
            restart,command,shm_size,user,push,tags,labels,services,options},
115
  sensitive=false,
116
  comment=[l]{\#},
117
  morestring=[b]",
118
  morestring=[b]',
119
}
120

121
\lstset{
122
  language=yaml,
123
  basicstyle=\ttfamily\small,
124
  keywordstyle=\color{azulufpel}\bfseries,
125
  commentstyle=\color{verdeufpel}\itshape,
126
  stringstyle=\color{laranjaufpel},
127
  backgroundcolor=\color{cinzaufpel!35},
128
  rulecolor=\color{azulufpel},
129
  frame=single,
130
  framerule=0.6pt,
131
  numbers=left,
132
  numberstyle=\tiny\color{black!60},
133
  numbersep=8pt,
134
  showstringspaces=false,
135
  breaklines=true,
136
  columns=fullflexible,
137
  captionpos=b,
138
  tabsize=2,
139
}
140

141
\renewcommand*{\l@lstlisting}{\@dottedtocline{1}{0em}{5.5em}}
142

143
%
144
% definições para textos em português
145
%
146
\@namedef{captionsbrazilian}{%
147
  \def\bibname{Refer{\^e}ncias}%
148
  \def\abstractname{Resumo}%
149
  \def\appendixname{Ap{\^e}ndice}%
150
  \def\contentsname{Sum{\'a}rio}%
151
  \def\listfigurename{Lista de Ilustra\c{c}{\~o}es}%
152
  \def\listtablename{Lista de Tabelas}%
153
  \def\figurename{Figura}%
154
  \def\tablename{Tabela}%
155
  \def\advisorname{Orientador}%
156
  \def\coadvisorname{Coorientador}%
157
  \def\collaboratorname{Colaborador}%
158
  \def\listabbrvname{Lista de Abreviaturas e Siglas}%
159
  \def\listsymbolname{Lista de S{\'\i}mbolos}%
160
  \def\annexname{Anexo}%
161
  \def\keywordsname{Palavras-chave}%
162
  \def\lstlistingname{C{\'o}digo}%
163
  \def\lstlistlistingname{Lista de C{\'o}digos}%
164
}
165

166
\@namedef{datebrazilian}{%
167
  \def\monthname{%
168
    \ifcase\month\or%
169
    janeiro\or fevereiro\or mar{\c{c}}o\or abril\or maio\or junho\or
170
    julho\or agosto\or setembro\or outubro\or novembro\or dezembro%
171
    \fi%
172
  }%
173
  \def\ei@date{\@publyear}%
174
  % \def\ei@date{\@publmonth\ de~\@publyear}%
175
}
176

177
%
178
% definições para textos em inglês
179
%
180
\@namedef{captionsenglish}{%
181
  \def\bibname{References}%
182
  \def\abstractname{Abstract}%
183
  \def\appendixname{Appendix}%
184
  \def\contentsname{Contents}%
185
  \def\listfigurename{List of Figures}%
186
  \def\listtablename{List of Tables}%
187
  \def\figurename{Figure}%
188
  \def\tablename{Table}%
189
  \def\advisorname{Advisor}%
190
  \def\coadvisorname{Coadvisor}%
191
  \def\collaboratorname{Collaborator}%
192
  \def\listabbrvname{List of Abbreviations and Acronyms}%
193
  \def\listsymbolname{List of Symbols}%
194
  \def\annexname{Annex}%
195
  \def\keywordsname{Keywords}%
196
  \def\lstlistingname{Listing}%
197
  \def\lstlistlistingname{List of Listings}%
198
}
199

200
\@namedef{dateenglish}{%
201
  \def\monthname{%
202
    \ifcase\month\or%
203
    January\or February\or March\or April\or May\or June\or July\or
204
    August\or September\or October\or November\or December%
205
    \fi%
206
  }%
207
  \def\ei@date{\@publyear}%
208
  % \def\ei@date{\@publmonth~\@publyear}%
209
}
210

211
\if@english%
212
\selectlanguage{english}%
213
\AtBeginDocument{\selectlanguage{english}}%
214
\fi
215

216
%==============================================================================
217
% O uso de fonte Arial, 12 pt, é mandatório
218
%==============================================================================
219
\renewcommand*\familydefault{\sfdefault}%
220
\renewcommand{\rmdefault}{phv}%
221
\renewcommand{\sfdefault}{phv}
222

223
% Definição do espaçamento de texto
224
\setlength{\baselineskip}{1.5cm}
225

226
%----------------------------------------
227
% PARÁGRAFOS
228
%----------------------------------------
229
% Tamanho da endentação do parágrafo
230
\setlength{\parindent}{1.3cm}
231
% Espaçamento entre um parágrafo e outro
232
\setlength{\parskip}{1.5pt}
233

234

235
%==============================================================================
236
% Numeração das páginas
237
%==============================================================================
238
\def\ps@texufpel{%
239
  \let\@oddfoot\@empty%
240
  \let\@evenfoot\@empty%
241
  \def\@oddhead{\hspace*{\fill}{\small\thepage}}%
242
  \def\@evenhead{\hspace*{\fill}{\small\thepage}}%
243
}
244

245
\pagestyle{empty}%
246
\let\ps@plain\ps@empty
247

248
%==============================================================================
249
% Definição de autor(es), orientador e co-orientador
250
%==============================================================================
251
\newcounter{ei@authorcount}
252
\renewcommand{\author}[2]{
253
        \addtocounter{ei@authorcount}{1}
254
        \expandafter\gdef\csname @author\alph{ei@authorcount}last\endcsname{#1}
255
        \expandafter\gdef\csname @author\alph{ei@authorcount}first\endcsname{#2}
256
        \expandafter\gdef\csname @author\alph{ei@authorcount}\endcsname{#2 #1}
257
}
258

259
\newcounter{ei@advisorcount}
260
\DeclareRobustCommand{\advisor}[3][]{
261
        \addtocounter{ei@advisorcount}{1}
262
        \expandafter\gdef\csname @advisor\alph{ei@advisorcount}last\endcsname{#2}
263
        \expandafter\gdef\csname @advisor\alph{ei@advisorcount}first\endcsname{#3}
264
        \expandafter\gdef\csname @advisor\alph{ei@advisorcount}\endcsname{#1~#3 #2}
265
}
266

267
\newcounter{ei@coadvisorcount}
268
\DeclareRobustCommand{\coadvisor}[3][]{
269
        \addtocounter{ei@coadvisorcount}{1}
270
        \expandafter\gdef\csname @coadvisor\alph{ei@coadvisorcount}last\endcsname{#2}
271
        \expandafter\gdef\csname @coadvisor\alph{ei@coadvisorcount}first\endcsname{#3}
272
        \expandafter\gdef\csname @coadvisor\alph{ei@coadvisorcount}\endcsname{#1~#3 #2}
273
}
274

275
\newcounter{ei@collaboratorcount}
276
\DeclareRobustCommand{\collaborator}[3][]{
277
        \addtocounter{ei@collaboratorcount}{1}
278
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}last\endcsname{#2}
279
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}first\endcsname{#3}
280
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}\endcsname{#1~#3 #2}
281
}
282

283

284
%==============================================================================
285
% Definição das palavras-chave (máx. 10)
286
%==============================================================================
287
\newcounter{kwcounter}
288
\newcommand{\keyword}[1]{
289
        \addtocounter{kwcounter}{1}
290
        \expandafter\gdef\csname keyw\alph{kwcounter}\endcsname{#1}
291
}
292

293
\newcommand{\@cipkw}{%
294
        \@ifundefined{keywa}{}{1.~\expandafter\MakeUppercase\keywa\@. }%
295
        \@ifundefined{keywb}{}{2.~\expandafter\MakeUppercase\keywb\@. }%
296
        \@ifundefined{keywc}{}{3.~\expandafter\MakeUppercase\keywc\@. }%
297
        \@ifundefined{keywd}{}{4.~\expandafter\MakeUppercase\keywd\@. }%
298
        \@ifundefined{keywe}{}{5.~\expandafter\MakeUppercase\keywe\@. }%
299
        \@ifundefined{keywf}{}{6.~\expandafter\MakeUppercase\keywf\@. }%
300
        \@ifundefined{keywg}{}{7.~\expandafter\MakeUppercase\keywg\@. }%
301
        \@ifundefined{keywh}{}{8.~\expandafter\MakeUppercase\keywh\@. }%
302
        \@ifundefined{keywi}{}{9.~\expandafter\MakeUppercase\keywi\@. }%
303
        \@ifundefined{keywj}{}{10.~\expandafter\MakeUppercase\keywj\@. }%
304
}
305

306
\newcommand{\@abstractkw}{%
307
        \@ifundefined{keywa}{}{\expandafter\MakeUppercase\keywa}%
308
        \@ifundefined{keywb}{}{, \keywb}%
309
        \@ifundefined{keywc}{}{, \keywc}%
310
        \@ifundefined{keywd}{}{, \keywd}%
311
        \@ifundefined{keywe}{}{, \keywe}%
312
        \@ifundefined{keywf}{}{, \keywf}%
313
        \@ifundefined{keywg}{}{, \keywg}%
314
        \@ifundefined{keywh}{}{, \keywh}%
315
        \@ifundefined{keywi}{}{, \keywi}%
316
        \@ifundefined{keywj}{}{, \keywj}%
317
}
318

319
%==============================================================================
320
% Redefinição da data (para ter mês e ano separados)
321
%==============================================================================
322
\renewcommand{\date}[2]{
323
        \gdef\@publmonth{#1}
324
        \gdef\@publyear{#2}
325
}
326
\date{\monthname}{\number\year}
327

328
%==============================================================================
329
% Definição padrão da folha de rosto.
330
% Os dados específicos do tipo de trabalho (dissertação, tese, etc.) são
331
% informados definindo-se o comando \titlepagespecificinfo. Veja os
332
% arquivos .def incluídos com a classe.
333
%==============================================================================
334

335
\newlength{\titlepagewinwidth}\setlength{\titlepagewinwidth}{95mm}
336
\newlength{\titlepagewinheight}\setlength{\titlepagewinheight}{64mm}
337
\newlength{\titlepagewinvoffset}\setlength{\titlepagewinvoffset}{112mm}
338

339
\newcommand{\location}[2]{
340
        \gdef\@city{#1}
341
        \gdef\@state{#2}
342
}
343

344
\location{Pelotas}{RS}
345

346
\renewcommand{\maketitle}{
347
\@ifundefined{@capa}{%
348
\begin{titlepage}
349
\thetitlepage
350
\end{titlepage}
351
\clearpage
352
\setcounter{page}{1}
353
}{%
354
\begin{titlepage}
355
\thecoverpage
356
\newpage
357
\thetitlepage
358
\end{titlepage}
359
\clearpage
360
\setcounter{page}{2}
361
}
362
}
363

364
\newcommand{\thecoverpage}{%
365
  \noindent%
366
  \parbox[b]{0.1\textwidth}{%
367
    \hspace{-2cm}%
368
    \includegraphics[width=3cm]{if}%
369
  }%
370
  \noindent%
371
    \parbox[b]{0.8\textwidth}{%
372
      \centering%
373
      \vskip 1cm%
374
      \MakeUppercase{\textbf{\@ministerio}}\\%
375
      \MakeUppercase{\textbf{\@secretaria}}\\%
376
      \MakeUppercase{\textbf{\@instituto}}\\%
377
      \MakeUppercase{\textbf{\@campus}}\\%
378
      \MakeUppercase{\textbf{\@thecurso}}\\%
379
      %\@unidade\\%
380
      %\@ifundefined{@nomecurso}{\@programa}{Curso de \@nomecurso}\\%
381
      \vskip 1cm%
382
      %\@documento\\%
383
      %\vskip 1cm%
384
    }%
385
  \parbox[b][][t]{0.1\textwidth}{%
386
    \includegraphics[scale=0.175]{tsi.png}%
387
  }%
388
  \noindent%
389
  \vskip 1cm%
390
  \noindent%
391
    \parbox[b]{\textwidth}{%
392
      \centering%
393
      \vskip .5cm%
394
      \textbf{{\@authora}\\
395
      \@ifundefined{@authorb}{}{\@authorb\\}%
396
      \@ifundefined{@authorc}{}{\@authorc\\}%
397
      \@ifundefined{@authord}{}{\@authord\\}}%
398
      \vskip .5cm%
399
    }%
400
  \vskip 3cm%
401
  \noindent%
402
    \parbox[b]{\textwidth}{%
403
      \centering%
404
      \vskip .5cm%
405
      \textbf{\@title}
406
      \vskip .5cm%
407
    }%
408
  \vskip 3cm%
409
  \noindent%
410
    \parbox[b]{\textwidth}{%
411
      \centering%
412
      \vskip .5cm%
413
      \textbf{\@documento}
414
      \vskip .5cm%
415
    }%
416
  \vfill%
417
  \noindent%
418
    \parbox[b]{\textwidth}{%
419
      \centering%
420
      \vskip .1cm%
421
      \textbf{\@city}\\
422
      \textbf{\ei@date}%
423
      \vskip .1cm%
424
    }%
425
}
426

427
\newcommand{\thetitlepage}{%
428
  \noindent%
429
  \parbox[b]{\textwidth}{%
430
    \centering%
431
    \@authora\\
432
    \@ifundefined{@authorb}{}{\@authorb\\}%
433
    \@ifundefined{@authorc}{}{\@authorc\\}%
434
    \@ifundefined{@authord}{}{\@authord\\}%
435
    \vskip 5cm%
436
    {\textbf{\@title}}%
437
  }
438
  \vskip 8cm%
439
  %\@ifundefined{titlepagespecificinfo}{}{%
440
    \hspace*{\fill}\makebox[.5\textwidth][l]{%
441
      \parbox[b]{8.5cm}{%
442
        \@descricaodocumento%
443
        \@ifundefined{@advisora}{}{%
444
          \vskip 1cm%
445
          \hspace{-0.25cm}
446
          \begin{tabular}{lp{.3675\textwidth}}
447
            \@ifundefined{@advisora}{}{
448
              \@ifundefined{@advisorb}{\advisorname:}{\advisorname es:} &
449
              \@ifundefined{@advisora}{}{\@advisora\\}
450
              \@ifundefined{@advisorb}{}{\ &}
451
              \@ifundefined{@advisorb}{}{\@advisorb\\}
452
              \@ifundefined{@advisorc}{}{\ &}
453
              \@ifundefined{@advisorc}{}{\@advisorc\\}
454
              \@ifundefined{@advisord}{}{\ &}
455
              \@ifundefined{@advisord}{}{\@advisord\\}}
456
            \@ifundefined{@coadvisora}{}{
457
               \@ifundefined{@coadvisorb}{\coadvisorname:}{\coadvisorname es:} &
458
               \@ifundefined{@coadvisora}{}{\@coadvisora\\}
459
              \@ifundefined{@coadvisorb}{}{\ &}
460
              \@ifundefined{@coadvisorb}{}{\@coadvisorb\\}
461
              \@ifundefined{@coadvisorc}{}{\ &}
462
              \@ifundefined{@coadvisorc}{}{\@coadvisorc\\}
463
              \@ifundefined{@coadvisord}{}{\ &}
464
              \@ifundefined{@coadvisord}{}{\@coadvisord\\}}
465
            \@ifundefined{@collaboratora}{}{
466
              \@ifundefined{@collaboratorb}{\collaboratorname:}{\collaboratorname es:} &
467
              \@ifundefined{@collaboratora}{}{\@collaboratora\\}
468
              \@ifundefined{@collaboratorb}{}{\ &}
469
              \@ifundefined{@collaboratorb}{}{\@collaboratorb\\}
470
              \@ifundefined{@collaboratorc}{}{\ &}
471
              \@ifundefined{@collaboratorc}{}{\@collaboratorc\\}
472
              \@ifundefined{@collaboratord}{}{\ &}
473
              \@ifundefined{@collaboratord}{}{\@collaboratord\\}}
474
          \end{tabular}
475
        }
476
      }
477
    }%
478
    \vfill%
479
  %}%
480
  \vfill%
481
  \centerline{\@city}%
482
  \centerline{\ei@date}%
483
}
484

485
\newcommand{\folhadeaprovacao}{%
486
  \clearpage%
487
  \noindent%
488
  \parbox[b]{\textwidth}{%
489
    \centering%
490
    \MakeUppercase{\@authora}\\%
491
    \vskip 5cm%
492
    \textbf{\MakeUppercase{\@title}}\\%
493
    \vskip 4cm%
494
  }
495
  \hspace*{\fill}\makebox[.5\textwidth][l]{%
496
    \parbox[b]{8.5cm}{%
497
      \@descricaodocumento%
498
      \@ifundefined{@advisora}{}{%
499
        \vskip 1cm%
500
        \hspace{-0.3cm}
501
        \begin{tabular}{lp{.3675\textwidth}}
502
          \@ifundefined{@advisora}{}{
503
            \@ifundefined{@advisorb}{\advisorname:}{\advisorname es:} &
504
            \@ifundefined{@advisora}{}{\@advisora\\}
505
            \@ifundefined{@advisorb}{}{\ &}
506
            \@ifundefined{@advisorb}{}{\@advisorb\\}
507
            \@ifundefined{@advisorc}{}{\ &}
508
            \@ifundefined{@advisorc}{}{\@advisorc\\}
509
            \@ifundefined{@advisord}{}{\ &}
510
            \@ifundefined{@advisord}{}{\@advisord\\}}
511
          \@ifundefined{@coadvisora}{}{
512
             \@ifundefined{@coadvisorb}{\coadvisorname:}{\coadvisorname es:} &
513
             \@ifundefined{@coadvisora}{}{\@coadvisora\\}
514
            \@ifundefined{@coadvisorb}{}{\ &}
515
            \@ifundefined{@coadvisorb}{}{\@coadvisorb\\}
516
            \@ifundefined{@coadvisorc}{}{\ &}
517
            \@ifundefined{@coadvisorc}{}{\@coadvisorc\\}
518
            \@ifundefined{@coadvisord}{}{\ &}
519
            \@ifundefined{@coadvisord}{}{\@coadvisord\\}}
520
          \@ifundefined{@collaboratora}{}{
521
            \@ifundefined{@collaboratorb}{\collaboratorname:}{\collaboratorname es:} &
522
            \@ifundefined{@collaboratora}{}{\@collaboratora\\}
523
            \@ifundefined{@collaboratorb}{}{\ &}
524
            \@ifundefined{@collaboratorb}{}{\@collaboratorb\\}
525
            \@ifundefined{@collaboratorc}{}{\ &}
526
            \@ifundefined{@collaboratorc}{}{\@collaboratorc\\}
527
            \@ifundefined{@collaboratord}{}{\ &}
528
            \@ifundefined{@collaboratord}{}{\@collaboratord\\}}
529
        \end{tabular}
530
      }
531
    }
532
  }
533
  \vskip 1cm%
534
  \hspace{-0.75cm}
535
  \parbox[b]{\textwidth}{%
536
    \centering
537
    Aprovado pela banca examinadora em: \uline{\hspace{0.75cm}}/\uline{\hspace{0.75cm}}/\uline{\hspace{1.5cm}}
538
  }
539
  \vfill%
540
  \hspace{-0.75cm}
541
  \parbox[b]{\textwidth}{%
542
    \centering%
543
    ~\uline{\hspace{0.75\textwidth}}~\\%
544
    \@advisora~-~\@instituicaoadvisor\\%
545
    \@ifundefined{orientadora}{Prof.\textordmasculine}{Prof.\textordfeminine}~\advisorname%
546
    \@ifundefined{@membroi}{}{
547
      \vskip 0.5cm%
548
      ~\uline{\hspace{0.75\textwidth}}~\\%
549
      \@membroi~-~\@instituicaomembroi\\%
550
      Membro titular\\%
551
    }
552
    \@ifundefined{@membroii}{}{
553
      \vskip 0.5cm%
554
      ~\uline{\hspace{0.75\textwidth}}~\\%
555
      \@membroii~-~\@instituicaomembroii\\%
556
      Membro titular\\%
557
    }
558
    \@ifundefined{@membroiii}{}{
559
      \vskip 0.5cm%
560
      ~\uline{\hspace{0.75\textwidth}}~\\%
561
      \@membroiii~-~\@instituicaomembroiii\\%
562
      Membro titular\\%
563
    }
564
  }
565
}
566

567
%==============================================================================
568
% Ajuste do sumário (nada indentado)
569
%==============================================================================
570

571
% Nível do sumário
572
\setcounter{tocdepth}{4}
573

574
\newlength{\ei@chapnumindent}\setlength{\ei@chapnumindent}{1em}
575

576
\renewcommand*{\l@chapter}[2]{
577
        \addpenalty{-\@highpenalty}
578
        \vskip -1ex \@plus\p@
579
        \setlength\@tempdima{1.5em}
580
        \begingroup
581
        \parindent \z@ \rightskip \@pnumwidth
582
        \parfillskip -\@pnumwidth
583
        \leavevmode\bfseries\sffamily
584
        \advance\leftskip\@tempdima
585
        \hskip -\leftskip
586
        \@dottedtocline{0}{0em}{\ei@chapnumindent}{\MakeUppercase{#1}}{#2}
587
        \penalty\@highpenalty
588
        \endgroup
589
}
590
\renewcommand*{\l@section}[2]
591
              {\@dottedtocline{1}{0em}{1.8em}{\MakeUppercase{#1}}{\hss #2}}
592

593
\renewcommand*{\l@subsection}[2]{\@dottedtocline{2}{0em}{2.5em}{\textbf{#1}}{#2}}
594

595
\renewcommand*{\l@subsubsection}[2]{\@dottedtocline{3}{0em}{3.5em}{\textit{#1}}{#2}}
596

597
\renewcommand*{\l@paragraph}[2]{\@dottedtocline{4}{0em}{4.25em}{\uline{#1}}{#2}}
598

599
\newif\if@aftertoc
600
\@aftertocfalse
601
\renewcommand{\tableofcontents}{%
602
        \chapter*{\contentsname}
603
        \@starttoc{toc}\@aftertoctrue%
604
}
605

606
%
607
% Anexos e apêndices
608
%
609

610
% Seção anexo
611
\newcounter{annex}% add counter
612
\renewcommand\theannex{\annexname~\@Alph\c@annex \space --}
613

614
\newcommand*\l@annex[2]{
615
        \addpenalty{-\@highpenalty}
616
        \vskip -1ex \@plus\p@
617
        \setlength\@tempdima{1.5em}
618
        \begingroup
619
        \parindent \z@ \rightskip \@pnumwidth
620
        \parfillskip -\@pnumwidth
621
        \leavevmode\bfseries\sffamily
622
        \advance\leftskip\@tempdima
623
        \hskip -\leftskip
624
        \@dottedtocline{0}{0em}{5.75em}{\MakeUppercase{#1}}{#2}
625
        \penalty\@highpenalty
626
        \endgroup
627
}
628

629
\newcommand\annexmark[1]{} % define header/footer
630
\newcommand\annex{
631
  \clearpage%
632
  \vspace*{50pt}%
633
  \@startsection{annex}{0}{0pt}{0pt}{42pt}{\centering\reset@font\ei@chapterfont\sffamily\bfseries\MakeUppercase}%
634
}
635

636
% Seção apêndice
637
\newcounter{append}% add counter
638
\renewcommand\theappend{\appendixname~\@Alph\c@append \space --}
639

640
\newcommand*\l@append[2]{
641
        \addpenalty{-\@highpenalty}
642
        \vskip -1ex \@plus\p@
643
        \setlength\@tempdima{1.5em}
644
        \begingroup
645
        \parindent \z@ \rightskip \@pnumwidth
646
        \parfillskip -\@pnumwidth
647
        \leavevmode\bfseries\sffamily
648
        \advance\leftskip\@tempdima
649
        \hskip -\leftskip
650
        \@dottedtocline{0}{0em}{7.25em}{\MakeUppercase{#1}}{#2}
651
        \penalty\@highpenalty
652
        \endgroup
653
}
654

655
\newcommand\appendmark[1]{} % define header/footer
656
\newcommand\append{
657
  \clearpage%
658
  \vspace*{50pt}%
659
  \@startsection{append}{0}{0pt}{0pt}{42pt}{\centering\reset@font\ei@chapterfont\sffamily\bfseries\MakeUppercase}%
660
}
661

662
%==============================================================================
663
% Definição das listas de abreviaturas e siglas e de símbolos
664
%==============================================================================
665
\newenvironment{listofabbrv}[1]{
666
  \chapter*{\listabbrvname}
667
  \begin{list}{\textbf{??}}{%
668
      \settowidth{\labelwidth}{#1}%
669
      \setlength{\labelsep}{1em}%
670
      \setlength{\itemindent}{0mm}%
671
      \setlength{\leftmargin}{\labelwidth}%
672
      \addtolength{\leftmargin}{\labelsep}%
673
      \setlength{\rightmargin}{0mm}%
674
      \setlength{\itemsep}{.1\baselineskip}%
675
      \renewcommand{\makelabel}[1]{\makebox[\labelwidth][l]{##1}}%
676
    }
677
  }{
678
  \end{list}
679
}
680

681
\newenvironment{listofsymbols}[1]{
682
  \chapter*{\listsymbolname}
683
  \begin{list}{\textbf{??}}{%
684
      \settowidth{\labelwidth}{#1}%
685
      \setlength{\labelsep}{1em}%
686
      \setlength{\itemindent}{0mm}%
687
      \setlength{\leftmargin}{\labelwidth}%
688
      \addtolength{\leftmargin}{\labelsep}%
689
      \setlength{\rightmargin}{0mm}%
690
      \setlength{\itemsep}{.1\baselineskip}%
691
      \renewcommand{\makelabel}[1]{\makebox[\labelwidth][l]{##1}}%
692
    }
693
  }{
694
  \end{list}
695
}
696

697
%==============================================================================
698
% Resumo (abstract) e Abstract (englishabstract)
699
%==============================================================================
700
\renewenvironment{abstract}{%
701
  \chapter*{\abstractname}
702
}{%
703
  \par\vskip 0.5cm%
704
  \noindent\textbf{\keywordsname:} \@abstractkw.
705
}
706

707
\newenvironment{englishabstract}[1]{%
708
  \if@openright\cleardoublepage\else\clearpage\fi%
709
  \gdef\@englishkeywords{#1}%
710
  \iflanguage{english}{
711
    \begin{otherlanguage}{brazilian}
712
    }{
713
      \begin{otherlanguage}{english}
714
      }
715
      \chapter*{\abstractname}
716
    }{
717
      \par\vskip 0.5cm%
718
      \noindent\textbf{\keywordsname:} \@englishkeywords.
719
    \end{otherlanguage}
720
}
721

722
%==============================================================================
723
% Formatação dos capítulos.
724
% Os comandos \@chapter e \@schapter são redefinidos para que a
725
% numeração de páginas seja correta (deve aparecer somente a partir do
726
% primeiro capítulo do texto, mas não nas páginas iniciais de
727
% capítulos).
728
% Os comandos \@makechapterhead e \@makeschapterhead fazem a
729
% formatação dos títulos propriamente ditos.
730
%==============================================================================
731
\newcommand{\ei@chapterfont}{\@setfontsize\Large{16}{20}}
732
\def\@chapapp{}
733

734
\def\@chapter[#1]#2{%
735
	\onehalfspacing
736
  \refstepcounter{chapter}%
737
  \addcontentsline{toc}{chapter}{\protect\numberline{\@chapapp\thechapter}#1}%
738
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
739
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
740
  \pagestyle{texufpel}\let\ps@plain\ps@texufpel%
741
  \@makechapterhead{#2}\@afterheading%
742
}
743

744
\def\@makechapterhead#1{%
745
  \vspace*{50pt}%
746
  \reset@font\noindent{\ei@chapterfont\sffamily\textbf{\@chapapp\thechapter\hspace{1em}\MakeUppercase{#1}}\par}%
747
  \addvspace{42pt}%
748
  \thispagestyle{empty}%
749
}
750

751
\def\@schapter#1{%
752
  \if@aftertoc\addcontentsline{toc}{chapter}{#1}\fi%
753
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
754
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
755
  \@makeschapterhead{#1}\@afterheading%
756
}
757

758
\def\@makeschapterhead#1{%
759
  \vspace*{50pt}%
760
  \reset@font\centerline{\ei@chapterfont\sffamily\textbf{\MakeUppercase{#1}}}%
761
  \addvspace{42pt}%
762
}
763

764
%==============================================================================
765
% Formatação das seções
766
%==============================================================================
767
\setcounter{secnumdepth}{4}
768

769
\renewcommand{\section}{%
770
  \@startsection{section}{1}{0pt}{18pt}{9pt}{\reset@font\large\MakeUppercase}
771
}
772

773
\renewcommand{\subsection}{%
774
  \@startsection{subsection}{2}{0pt}{12pt}{6pt}{\reset@font\bfseries}
775
}
776

777
\renewcommand{\subsubsection}{%
778
  \@startsection{subsubsection}{3}{0pt}{12pt}{6pt}{\reset@font\itshape}
779
}
780

781
\renewcommand{\paragraph}{%
782
  \@startsection{paragraph}{4}{0pt}{12pt}{6pt}{\reset@font\uline}
783
}
784

785
\renewcommand{\subparagraph}{%
786
  \@startsection{subparagraph}{5}{0pt}{1ex}{-1em}{\reset@font\bfseries}
787
}
788

789
%==============================================================================
790
% Formatação das legendas
791
%==============================================================================
792
\renewcommand{\thefigure}{\@arabic\c@figure}
793
\renewcommand{\thetable}{\@arabic\c@table}
794

795
\counterwithout{figure}{chapter}
796
\counterwithout{equation}{chapter}
797
\counterwithout{table}{chapter}
798
% O pacote listings só cria o contador "lstlisting" dentro de um
799
% \AtBeginDocument próprio (ele decide o formato de numeração nesse
800
% momento verificando se a classe tem capítulos). Por isso o
801
% \counterwithout também precisa ser adiado da mesma forma, e registrado
802
% depois de \RequirePackage{listings} para entrar na fila após o hook
803
% do próprio pacote.
804
\AtBeginDocument{\counterwithout{lstlisting}{chapter}}
805

806
%==============================================================================
807
% Redefinição do conteúdo das listas de figuras e tabelas
808
%==============================================================================
809
\newif\if@captionlisting\@captionlistingtrue
810
\long\def\@caption#1[#2]#3{%
811
  \par
812
  \if@captionlisting%
813
    \addcontentsline{\csname ext@#1\endcsname}{#1}%
814
        {\protect\numberline{\csname fnum@#1\endcsname}{\ignorespaces #2}}%
815
  \fi%
816
  \begingroup
817
    \@parboxrestore
818
    \if@minipage
819
      \@setminipage
820
    \fi
821
    \normalsize
822
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
823
  \endgroup%
824
}
825

826
\renewcommand*{\l@figure}{\@dottedtocline{1}{0em}{5.5em}}
827
\let\l@table\l@figure
828
\let\l@lstlisting\l@figure
829

830
%==============================================================================
831
% Compatibilização do "longtable" com a Lista de Tabelas
832
%------------------------------------------------------------------------------
833
% O pacote longtable define seu próprio mecanismo de legenda (\LT@c@ption),
834
% que grava a entrada na Lista de Tabelas usando \thetable (só o número),
835
% em vez de \fnum@table ("Tabela"~+~número), diferentemente do \@caption
836
% padrão usado pelo ambiente "table" (redefinido acima). É por isso que uma
837
% "tabela normal" mostra o prefixo "Tabela" na lista, mas uma "longtable"
838
% mostra só o número, criando alinhamento/espaçamento diferente entre as
839
% entradas. O trecho abaixo corrige isso, trocando \thetable por
840
% \fnum@table para igualar ao comportamento das tabelas normais.
841
%==============================================================================
842
\RequirePackage{longtable}
843
\def\LT@c@ption#1[#2]#3{%
844
  \LT@makecaption#1\fnum@table{#3}%
845
  \def\@tempa{#2}%
846
  \ifx\@tempa\@empty\else
847
     {\let\\\space
848
     \addcontentsline{\ext@table}{table}{\protect\numberline{\fnum@table}{\ignorespaces #2}}}%
849
  \fi}
850

851
%==============================================================================
852
% Compatibilização do "listings" com a Lista de Códigos
853
%------------------------------------------------------------------------------
854
% Pelo mesmo motivo acima: o pacote listings grava sua própria entrada na
855
% Lista de Códigos usando apenas \thelstlisting (o número puro), sem passar
856
% pelo \@caption customizado da classe, então o prefixo "Código" definido em
857
% \lstlistingname nunca aparece nessa lista (só no corpo do texto). Aqui
858
% forçamos o prefixo também na lista, análogo ao que já ocorre com Figura/
859
% Tabela.
860
%==============================================================================
861
\let\oldlstlistoflistings\lstlistoflistings
862
\renewcommand{\lstlistoflistings}{%
863
  \begingroup
864
    \let\oldnumberline\numberline
865
    \renewcommand{\numberline}[1]{\lstlistingname\space\oldnumberline{##1}}%
866
    \oldlstlistoflistings
867
  \endgroup
868
}
869

870
%==============================================================================
871
% Redefinição do formato de citações longas
872
%==============================================================================
873
\renewenvironment{quote}{%
874
  \small%
875
  \begin{list}{}{\setlength{\leftmargin}{40mm}\item\relax}
876
  }{%
877
  \end{list}
878
}
879

880
%==============================================================================
881
% Ajuste do formato das citações e referências
882
%==============================================================================
883
\setlength{\bibhang}{0pt}
884
\let\cite\citep
885

886
%
887
% Definições de seções restantes.
888
%
889

890
% Ficha catalográfica: Uma página temporária, somente indicando que é necessário ter a ficha catalográfica
891

892
\newcommand{\fichacatalografica}{%
893
  \clearpage%
894
  \mbox{}%
895
  \vfill
896
  \begin{center}
897
    \textbf{Insira AQUI a ficha catalogr\'afica\\(solicitada na p\'agina da biblioteca)}
898
\end{center}
899
\vfill%
900
}
901

902
% Seção de agradecimentos
903

904
\newenvironment{agradecimentos}{%
905
  \chapter*{Agradecimentos}%
906
}{%
907
}
908

909
% Seção de dedicatória
910

911
\newenvironment{dedicatoria}{%
912
  \clearpage%
913
  \mbox{}\vfill\begin{flushright}%
914
  }{%
915
  \end{flushright}%
916
}
917

918
% Seção de epígrafe
919

920
\newenvironment{epigrafe}{%
921
  \clearpage%
922
  \mbox{}\vfill\begin{flushright}%
923
  }{%
924
  \end{flushright}%
925
}