eletrotupi / tcc/ monografia/textsi.clscd79c8980d51787d2f9187eb56e28c591ed395bd
26.5 KB | 831 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{color}
97
\RequirePackage{setspace}
98
\RequirePackage{geometry}
99

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

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

107
%
108
% definições para textos em português
109
%
110
\@namedef{captionsbrazilian}{%
111
  \def\bibname{Refer{\^e}ncias}%
112
  \def\abstractname{Resumo}%
113
  \def\appendixname{Ap{\^e}ndice}%
114
  \def\contentsname{Sum{\'a}rio}%
115
  \def\listfigurename{Lista de Ilustra\c{c}{\~o}es}%
116
  \def\listtablename{Lista de Tabelas}%
117
  \def\figurename{Figura}%
118
  \def\tablename{Tabela}%
119
  \def\advisorname{Orientador}%
120
  \def\coadvisorname{Coorientador}%
121
  \def\collaboratorname{Colaborador}%
122
  \def\listabbrvname{Lista de Abreviaturas e Siglas}%
123
  \def\listsymbolname{Lista de S{\'\i}mbolos}%
124
  \def\annexname{Anexo}%
125
  \def\keywordsname{Palavras-chave}%
126
}
127

128
\@namedef{datebrazilian}{%
129
  \def\monthname{%
130
    \ifcase\month\or%
131
    janeiro\or fevereiro\or mar{\c{c}}o\or abril\or maio\or junho\or
132
    julho\or agosto\or setembro\or outubro\or novembro\or dezembro%
133
    \fi%
134
  }%
135
  \def\ei@date{\@publyear}%
136
  % \def\ei@date{\@publmonth\ de~\@publyear}%
137
}
138

139
%
140
% definições para textos em inglês
141
%
142
\@namedef{captionsenglish}{%
143
  \def\bibname{References}%
144
  \def\abstractname{Abstract}%
145
  \def\appendixname{Appendix}%
146
  \def\contentsname{Contents}%
147
  \def\listfigurename{List of Figures}%
148
  \def\listtablename{List of Tables}%
149
  \def\figurename{Figure}%
150
  \def\tablename{Table}%
151
  \def\advisorname{Advisor}%
152
  \def\coadvisorname{Coadvisor}%
153
  \def\collaboratorname{Collaborator}%
154
  \def\listabbrvname{List of Abbreviations and Acronyms}%
155
  \def\listsymbolname{List of Symbols}%
156
  \def\annexname{Annex}%
157
  \def\keywordsname{Keywords}%
158
}
159

160
\@namedef{dateenglish}{%
161
  \def\monthname{%
162
    \ifcase\month\or%
163
    January\or February\or March\or April\or May\or June\or July\or
164
    August\or September\or October\or November\or December%
165
    \fi%
166
  }%
167
  \def\ei@date{\@publyear}%
168
  % \def\ei@date{\@publmonth~\@publyear}%
169
}
170

171
\if@english%
172
\selectlanguage{english}%
173
\AtBeginDocument{\selectlanguage{english}}%
174
\fi
175

176
%==============================================================================
177
% O uso de fonte Arial, 12 pt, é mandatório
178
%==============================================================================
179
\renewcommand*\familydefault{\sfdefault}%
180
\renewcommand{\rmdefault}{phv}%
181
\renewcommand{\sfdefault}{phv}
182

183
% Definição do espaçamento de texto
184
\setlength{\baselineskip}{1.5cm}
185
% TODO: seems incorrect without it
186
\setlength{\parskip}{0.2 cm}
187

188
%==============================================================================
189
% Numeração das páginas
190
%==============================================================================
191
\def\ps@texufpel{%
192
  \let\@oddfoot\@empty%
193
  \let\@evenfoot\@empty%
194
  \def\@oddhead{\hspace*{\fill}{\small\thepage}}%
195
  \def\@evenhead{\hspace*{\fill}{\small\thepage}}%
196
} 
197

198
\pagestyle{empty}%
199
\let\ps@plain\ps@empty
200

201
%==============================================================================
202
% Definição de autor(es), orientador e co-orientador
203
%==============================================================================
204
\newcounter{ei@authorcount}
205
\renewcommand{\author}[2]{
206
        \addtocounter{ei@authorcount}{1}
207
        \expandafter\gdef\csname @author\alph{ei@authorcount}last\endcsname{#1}
208
        \expandafter\gdef\csname @author\alph{ei@authorcount}first\endcsname{#2}
209
        \expandafter\gdef\csname @author\alph{ei@authorcount}\endcsname{#2 #1}
210
}
211

212
\newcounter{ei@advisorcount}
213
\DeclareRobustCommand{\advisor}[3][]{
214
        \addtocounter{ei@advisorcount}{1}
215
        \expandafter\gdef\csname @advisor\alph{ei@advisorcount}last\endcsname{#2}
216
        \expandafter\gdef\csname @advisor\alph{ei@advisorcount}first\endcsname{#3}
217
        \expandafter\gdef\csname @advisor\alph{ei@advisorcount}\endcsname{#1~#3 #2}
218
}
219

220
\newcounter{ei@coadvisorcount}
221
\DeclareRobustCommand{\coadvisor}[3][]{
222
        \addtocounter{ei@coadvisorcount}{1}
223
        \expandafter\gdef\csname @coadvisor\alph{ei@coadvisorcount}last\endcsname{#2}
224
        \expandafter\gdef\csname @coadvisor\alph{ei@coadvisorcount}first\endcsname{#3}
225
        \expandafter\gdef\csname @coadvisor\alph{ei@coadvisorcount}\endcsname{#1~#3 #2}
226
}
227

228
\newcounter{ei@collaboratorcount}
229
\DeclareRobustCommand{\collaborator}[3][]{
230
        \addtocounter{ei@collaboratorcount}{1}
231
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}last\endcsname{#2}
232
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}first\endcsname{#3}
233
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}\endcsname{#1~#3 #2}
234
}
235

236

237
%==============================================================================
238
% Definição das palavras-chave (máx. 10)
239
%==============================================================================
240
\newcounter{kwcounter}
241
\newcommand{\keyword}[1]{
242
        \addtocounter{kwcounter}{1}
243
        \expandafter\gdef\csname keyw\alph{kwcounter}\endcsname{#1}
244
}
245

246
\newcommand{\@cipkw}{%
247
        \@ifundefined{keywa}{}{1.~\expandafter\MakeUppercase\keywa\@. }%
248
        \@ifundefined{keywb}{}{2.~\expandafter\MakeUppercase\keywb\@. }%
249
        \@ifundefined{keywc}{}{3.~\expandafter\MakeUppercase\keywc\@. }%
250
        \@ifundefined{keywd}{}{4.~\expandafter\MakeUppercase\keywd\@. }%
251
        \@ifundefined{keywe}{}{5.~\expandafter\MakeUppercase\keywe\@. }%
252
        \@ifundefined{keywf}{}{6.~\expandafter\MakeUppercase\keywf\@. }%
253
        \@ifundefined{keywg}{}{7.~\expandafter\MakeUppercase\keywg\@. }%
254
        \@ifundefined{keywh}{}{8.~\expandafter\MakeUppercase\keywh\@. }%
255
        \@ifundefined{keywi}{}{9.~\expandafter\MakeUppercase\keywi\@. }%
256
        \@ifundefined{keywj}{}{10.~\expandafter\MakeUppercase\keywj\@. }%
257
}
258

259
\newcommand{\@abstractkw}{%
260
        \@ifundefined{keywa}{}{\expandafter\MakeUppercase\keywa}%
261
        \@ifundefined{keywb}{}{, \keywb}%
262
        \@ifundefined{keywc}{}{, \keywc}%
263
        \@ifundefined{keywd}{}{, \keywd}%
264
        \@ifundefined{keywe}{}{, \keywe}%
265
        \@ifundefined{keywf}{}{, \keywf}%
266
        \@ifundefined{keywg}{}{, \keywg}%
267
        \@ifundefined{keywh}{}{, \keywh}%
268
        \@ifundefined{keywi}{}{, \keywi}%
269
        \@ifundefined{keywj}{}{, \keywj}%
270
}
271

272
%==============================================================================
273
% Redefinição da data (para ter mês e ano separados)
274
%==============================================================================
275
\renewcommand{\date}[2]{
276
        \gdef\@publmonth{#1}
277
        \gdef\@publyear{#2}
278
}
279
\date{\monthname}{\number\year}
280

281
%==============================================================================
282
% Definição padrão da folha de rosto.
283
% Os dados específicos do tipo de trabalho (dissertação, tese, etc.) são
284
% informados definindo-se o comando \titlepagespecificinfo. Veja os
285
% arquivos .def incluídos com a classe.
286
%==============================================================================
287

288
\newlength{\titlepagewinwidth}\setlength{\titlepagewinwidth}{95mm}
289
\newlength{\titlepagewinheight}\setlength{\titlepagewinheight}{64mm}
290
\newlength{\titlepagewinvoffset}\setlength{\titlepagewinvoffset}{112mm}
291

292
\newcommand{\location}[2]{
293
        \gdef\@city{#1}
294
        \gdef\@state{#2}
295
}
296

297
\location{Pelotas}{RS}
298

299
\renewcommand{\maketitle}{
300
\@ifundefined{@capa}{%
301
\begin{titlepage}
302
\thetitlepage
303
\end{titlepage}
304
\clearpage
305
\setcounter{page}{1}
306
}{%
307
\begin{titlepage}
308
\thecoverpage
309
\newpage
310
\thetitlepage
311
\end{titlepage}
312
\clearpage
313
\setcounter{page}{2}
314
}
315
}
316

317
\newcommand{\thecoverpage}{%
318
  \noindent%
319
  \parbox[b]{0.1\textwidth}{%
320
    \hspace{-2cm}%
321
    \includegraphics[width=3cm]{if}%
322
  }%
323
  \noindent%
324
    \parbox[b]{0.8\textwidth}{%    
325
      \centering%
326
      \vskip 1cm%
327
      \MakeUppercase{\textbf{\@ministerio}}\\%
328
      \MakeUppercase{\textbf{\@secretaria}}\\%
329
      \MakeUppercase{\textbf{\@instituto}}\\%
330
      \MakeUppercase{\textbf{\@campus}}\\%
331
      \MakeUppercase{\textbf{\@thecurso}}\\%
332
      %\@unidade\\%
333
      %\@ifundefined{@nomecurso}{\@programa}{Curso de \@nomecurso}\\%
334
      \vskip 1cm%
335
      %\@documento\\%
336
      %\vskip 1cm%
337
    }%
338
  \parbox[b][][t]{0.1\textwidth}{%
339
    \includegraphics[scale=0.175]{tsi.png}%
340
  }%      
341
  \noindent%
342
  \vskip 1cm%
343
  \noindent%
344
    \parbox[b]{\textwidth}{%
345
      \centering%
346
      \vskip .5cm%
347
      \textbf{{\@authora}\\
348
      \@ifundefined{@authorb}{}{\@authorb\\}%
349
      \@ifundefined{@authorc}{}{\@authorc\\}%
350
      \@ifundefined{@authord}{}{\@authord\\}}%      
351
      \vskip .5cm%
352
    }%
353
  \vskip 3cm%
354
  \noindent%
355
    \parbox[b]{\textwidth}{%
356
      \centering%
357
      \vskip .5cm%
358
      \textbf{\@title}
359
      \vskip .5cm%
360
    }%
361
  \vskip 3cm%
362
  \noindent%
363
    \parbox[b]{\textwidth}{%
364
      \centering%
365
      \vskip .5cm%
366
      \textbf{\@documento}   
367
      \vskip .5cm%
368
    }%    
369
  \vfill%
370
  \noindent%
371
    \parbox[b]{\textwidth}{%
372
      \centering%
373
      \vskip .1cm%
374
      \textbf{\@city}\\
375
      \textbf{\ei@date}%
376
      \vskip .1cm%
377
    }%
378
}
379

380
\newcommand{\thetitlepage}{%
381
  \noindent%
382
  \parbox[b]{\textwidth}{%
383
    \centering%
384
    \@authora\\
385
    \@ifundefined{@authorb}{}{\@authorb\\}%
386
    \@ifundefined{@authorc}{}{\@authorc\\}%
387
    \@ifundefined{@authord}{}{\@authord\\}%
388
    \vskip 5cm%
389
    {\textbf{\@title}}%
390
  }
391
  \vskip 8cm%
392
  %\@ifundefined{titlepagespecificinfo}{}{%
393
    \hspace*{\fill}\makebox[.5\textwidth][l]{%
394
      \parbox[b]{8.5cm}{%
395
        \@descricaodocumento%
396
        \@ifundefined{@advisora}{}{%
397
          \vskip 1cm%
398
          \hspace{-0.25cm}
399
          \begin{tabular}{lp{.3675\textwidth}}
400
            \@ifundefined{@advisora}{}{
401
              \@ifundefined{@advisorb}{\advisorname:}{\advisorname es:} &
402
              \@ifundefined{@advisora}{}{\@advisora\\}
403
              \@ifundefined{@advisorb}{}{\ &}
404
              \@ifundefined{@advisorb}{}{\@advisorb\\}
405
              \@ifundefined{@advisorc}{}{\ &}
406
              \@ifundefined{@advisorc}{}{\@advisorc\\}
407
              \@ifundefined{@advisord}{}{\ &}
408
              \@ifundefined{@advisord}{}{\@advisord\\}}
409
            \@ifundefined{@coadvisora}{}{
410
               \@ifundefined{@coadvisorb}{\coadvisorname:}{\coadvisorname es:} &
411
               \@ifundefined{@coadvisora}{}{\@coadvisora\\}
412
              \@ifundefined{@coadvisorb}{}{\ &}
413
              \@ifundefined{@coadvisorb}{}{\@coadvisorb\\}
414
              \@ifundefined{@coadvisorc}{}{\ &}
415
              \@ifundefined{@coadvisorc}{}{\@coadvisorc\\}
416
              \@ifundefined{@coadvisord}{}{\ &}
417
              \@ifundefined{@coadvisord}{}{\@coadvisord\\}}
418
            \@ifundefined{@collaboratora}{}{
419
              \@ifundefined{@collaboratorb}{\collaboratorname:}{\collaboratorname es:} &
420
              \@ifundefined{@collaboratora}{}{\@collaboratora\\}
421
              \@ifundefined{@collaboratorb}{}{\ &}
422
              \@ifundefined{@collaboratorb}{}{\@collaboratorb\\}
423
              \@ifundefined{@collaboratorc}{}{\ &}
424
              \@ifundefined{@collaboratorc}{}{\@collaboratorc\\}
425
              \@ifundefined{@collaboratord}{}{\ &}
426
              \@ifundefined{@collaboratord}{}{\@collaboratord\\}}
427
          \end{tabular}
428
        }                
429
      }
430
    }%
431
    \vfill%
432
  %}%
433
  \vfill%
434
  \centerline{\@city}%
435
  \centerline{\ei@date}%
436
}
437

438
\newcommand{\folhadeaprovacao}{%
439
  \clearpage%
440
  \noindent%
441
  \parbox[b]{\textwidth}{%
442
    \centering%
443
    \MakeUppercase{\@authora}\\%
444
    \vskip 5cm%
445
    \textbf{\MakeUppercase{\@title}}\\%
446
    \vskip 4cm%
447
  }
448
  \hspace*{\fill}\makebox[.5\textwidth][l]{%
449
    \parbox[b]{8.5cm}{%
450
      \@descricaodocumento%
451
      \@ifundefined{@advisora}{}{%
452
        \vskip 1cm%
453
        \hspace{-0.3cm}
454
        \begin{tabular}{lp{.3675\textwidth}}
455
          \@ifundefined{@advisora}{}{
456
            \@ifundefined{@advisorb}{\advisorname:}{\advisorname es:} &
457
            \@ifundefined{@advisora}{}{\@advisora\\}
458
            \@ifundefined{@advisorb}{}{\ &}
459
            \@ifundefined{@advisorb}{}{\@advisorb\\}
460
            \@ifundefined{@advisorc}{}{\ &}
461
            \@ifundefined{@advisorc}{}{\@advisorc\\}
462
            \@ifundefined{@advisord}{}{\ &}
463
            \@ifundefined{@advisord}{}{\@advisord\\}}
464
          \@ifundefined{@coadvisora}{}{
465
             \@ifundefined{@coadvisorb}{\coadvisorname:}{\coadvisorname es:} &
466
             \@ifundefined{@coadvisora}{}{\@coadvisora\\}
467
            \@ifundefined{@coadvisorb}{}{\ &}
468
            \@ifundefined{@coadvisorb}{}{\@coadvisorb\\}
469
            \@ifundefined{@coadvisorc}{}{\ &}
470
            \@ifundefined{@coadvisorc}{}{\@coadvisorc\\}
471
            \@ifundefined{@coadvisord}{}{\ &}
472
            \@ifundefined{@coadvisord}{}{\@coadvisord\\}}
473
          \@ifundefined{@collaboratora}{}{
474
            \@ifundefined{@collaboratorb}{\collaboratorname:}{\collaboratorname es:} &
475
            \@ifundefined{@collaboratora}{}{\@collaboratora\\}
476
            \@ifundefined{@collaboratorb}{}{\ &}
477
            \@ifundefined{@collaboratorb}{}{\@collaboratorb\\}
478
            \@ifundefined{@collaboratorc}{}{\ &}
479
            \@ifundefined{@collaboratorc}{}{\@collaboratorc\\}
480
            \@ifundefined{@collaboratord}{}{\ &}
481
            \@ifundefined{@collaboratord}{}{\@collaboratord\\}}
482
        \end{tabular}
483
      }        
484
    }
485
  }
486
  \vskip 1cm%
487
  \hspace{-0.75cm}
488
  \parbox[b]{\textwidth}{%
489
    \centering
490
    Aprovado pela banca examinadora em: \uline{\hspace{0.75cm}}/\uline{\hspace{0.75cm}}/\uline{\hspace{1.5cm}}
491
  }
492
  \vfill%
493
  \hspace{-0.75cm}
494
  \parbox[b]{\textwidth}{%
495
    \centering%
496
    ~\uline{\hspace{0.75\textwidth}}~\\%
497
    \@advisora~-~\@instituicaoadvisor\\%
498
    \@ifundefined{orientadora}{Prof.\textordmasculine}{Prof.\textordfeminine}~\advisorname%
499
    \@ifundefined{@membroi}{}{
500
      \vskip 0.5cm%
501
      ~\uline{\hspace{0.75\textwidth}}~\\%
502
      \@membroi~-~\@instituicaomembroi\\%
503
      Membro titular\\%    
504
    }
505
    \@ifundefined{@membroii}{}{
506
      \vskip 0.5cm%
507
      ~\uline{\hspace{0.75\textwidth}}~\\%
508
      \@membroii~-~\@instituicaomembroii\\%
509
      Membro titular\\%    
510
    }
511
    \@ifundefined{@membroiii}{}{
512
      \vskip 0.5cm%
513
      ~\uline{\hspace{0.75\textwidth}}~\\%
514
      \@membroiii~-~\@instituicaomembroiii\\%
515
      Membro titular\\%    
516
    }    
517
  }
518
}
519

520
%==============================================================================
521
% Ajuste do sumário (nada indentado) 
522
%==============================================================================
523

524
% Nível do sumário
525
\setcounter{tocdepth}{4}
526

527
\newlength{\ei@chapnumindent}\setlength{\ei@chapnumindent}{1em}
528

529
\renewcommand*{\l@chapter}[2]{
530
        \addpenalty{-\@highpenalty}
531
        \vskip -1ex \@plus\p@
532
        \setlength\@tempdima{1.5em}
533
        \begingroup
534
        \parindent \z@ \rightskip \@pnumwidth
535
        \parfillskip -\@pnumwidth
536
        \leavevmode\bfseries\sffamily
537
        \advance\leftskip\@tempdima
538
        \hskip -\leftskip
539
        \@dottedtocline{0}{0em}{\ei@chapnumindent}{\MakeUppercase{#1}}{#2}
540
        \penalty\@highpenalty
541
        \endgroup
542
}
543
\renewcommand*{\l@section}[2]
544
              {\@dottedtocline{1}{0em}{1.8em}{\MakeUppercase{#1}}{\hss #2}}
545

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

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

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

552
\newif\if@aftertoc
553
\@aftertocfalse
554
\renewcommand{\tableofcontents}{%
555
        \chapter*{\contentsname}
556
        \@starttoc{toc}\@aftertoctrue%
557
}
558

559
%
560
% Anexos e apêndices
561
%
562

563
% Seção anexo
564
\newcounter{annex}% add counter
565
\renewcommand\theannex{\annexname~\@Alph\c@annex \space --}
566

567
\newcommand*\l@annex[2]{
568
        \addpenalty{-\@highpenalty}
569
        \vskip -1ex \@plus\p@
570
        \setlength\@tempdima{1.5em}
571
        \begingroup
572
        \parindent \z@ \rightskip \@pnumwidth
573
        \parfillskip -\@pnumwidth
574
        \leavevmode\bfseries\sffamily
575
        \advance\leftskip\@tempdima
576
        \hskip -\leftskip
577
        \@dottedtocline{0}{0em}{5.75em}{\MakeUppercase{#1}}{#2}
578
        \penalty\@highpenalty
579
        \endgroup
580
}
581

582
\newcommand\annexmark[1]{} % define header/footer                            
583
\newcommand\annex{
584
  \clearpage%
585
  \vspace*{90pt}%
586
  \@startsection{annex}{0}{0pt}{0pt}{42pt}{\centering\reset@font\ei@chapterfont\sffamily\bfseries\MakeUppercase}%
587
}
588

589
% Seção apêndice
590
\newcounter{append}% add counter
591
\renewcommand\theappend{\appendixname~\@Alph\c@append \space --}
592

593
\newcommand*\l@append[2]{
594
        \addpenalty{-\@highpenalty}
595
        \vskip -1ex \@plus\p@
596
        \setlength\@tempdima{1.5em}
597
        \begingroup
598
        \parindent \z@ \rightskip \@pnumwidth
599
        \parfillskip -\@pnumwidth
600
        \leavevmode\bfseries\sffamily
601
        \advance\leftskip\@tempdima
602
        \hskip -\leftskip
603
        \@dottedtocline{0}{0em}{7.25em}{\MakeUppercase{#1}}{#2}
604
        \penalty\@highpenalty
605
        \endgroup
606
}
607

608
\newcommand\appendmark[1]{} % define header/footer                            
609
\newcommand\append{
610
  \clearpage%
611
  \vspace*{90pt}%
612
  \@startsection{append}{0}{0pt}{0pt}{42pt}{\centering\reset@font\ei@chapterfont\sffamily\bfseries\MakeUppercase}%
613
}
614

615
%==============================================================================
616
% Definição das listas de abreviaturas e siglas e de símbolos
617
%==============================================================================
618
\newenvironment{listofabbrv}[1]{
619
  \chapter*{\listabbrvname}
620
  \begin{list}{\textbf{??}}{%
621
      \settowidth{\labelwidth}{#1}%
622
      \setlength{\labelsep}{1em}%
623
      \setlength{\itemindent}{0mm}%
624
      \setlength{\leftmargin}{\labelwidth}%
625
      \addtolength{\leftmargin}{\labelsep}%
626
      \setlength{\rightmargin}{0mm}%
627
      \setlength{\itemsep}{.1\baselineskip}%
628
      \renewcommand{\makelabel}[1]{\makebox[\labelwidth][l]{##1}}%
629
    }
630
  }{
631
  \end{list}
632
} 
633

634
\newenvironment{listofsymbols}[1]{
635
  \chapter*{\listsymbolname}
636
  \begin{list}{\textbf{??}}{%
637
      \settowidth{\labelwidth}{#1}%
638
      \setlength{\labelsep}{1em}%
639
      \setlength{\itemindent}{0mm}%
640
      \setlength{\leftmargin}{\labelwidth}%
641
      \addtolength{\leftmargin}{\labelsep}%
642
      \setlength{\rightmargin}{0mm}%
643
      \setlength{\itemsep}{.1\baselineskip}%
644
      \renewcommand{\makelabel}[1]{\makebox[\labelwidth][l]{##1}}%
645
    }
646
  }{
647
  \end{list}
648
}
649

650
%==============================================================================
651
% Resumo (abstract) e Abstract (englishabstract)
652
%==============================================================================
653
\renewenvironment{abstract}{%
654
  \chapter*{\abstractname}
655
}{%
656
  \par\vskip 0.5cm%
657
  \noindent\textbf{\keywordsname:} \@abstractkw.
658
}
659

660
\newenvironment{englishabstract}[1]{%
661
  \if@openright\cleardoublepage\else\clearpage\fi%
662
  \gdef\@englishkeywords{#1}%
663
  \iflanguage{english}{
664
    \begin{otherlanguage}{brazilian}
665
    }{
666
      \begin{otherlanguage}{english}
667
      }
668
      \chapter*{\abstractname}
669
    }{
670
      \par\vskip 0.5cm%
671
      \noindent\textbf{\keywordsname:} \@englishkeywords.
672
    \end{otherlanguage}
673
}
674

675
%==============================================================================
676
% Formatação dos capítulos.
677
% Os comandos \@chapter e \@schapter são redefinidos para que a
678
% numeração de páginas seja correta (deve aparecer somente a partir do
679
% primeiro capítulo do texto, mas não nas páginas iniciais de
680
% capítulos).
681
% Os comandos \@makechapterhead e \@makeschapterhead fazem a
682
% formatação dos títulos propriamente ditos.
683
%==============================================================================
684
\newcommand{\ei@chapterfont}{\@setfontsize\Large{16}{20}}
685
\def\@chapapp{}
686

687
\def\@chapter[#1]#2{%
688
	\onehalfspacing
689
  \refstepcounter{chapter}%
690
  \addcontentsline{toc}{chapter}{\protect\numberline{\@chapapp\thechapter}#1}%
691
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
692
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
693
  \pagestyle{texufpel}\let\ps@plain\ps@texufpel%
694
  \@makechapterhead{#2}\@afterheading%
695
}
696

697
\def\@makechapterhead#1{%
698
  \vspace*{90pt}%
699
  \reset@font\noindent{\ei@chapterfont\sffamily\textbf{\@chapapp\thechapter\hspace{1em}\MakeUppercase{#1}}\par}%
700
  \addvspace{42pt}%
701
  \thispagestyle{empty}%
702
}
703

704
\def\@schapter#1{%
705
  \if@aftertoc\addcontentsline{toc}{chapter}{#1}\fi%
706
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
707
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
708
  \@makeschapterhead{#1}\@afterheading%
709
}
710

711
\def\@makeschapterhead#1{%
712
  \vspace*{90pt}%
713
  \reset@font\centerline{\ei@chapterfont\sffamily\textbf{\MakeUppercase{#1}}}%
714
  \addvspace{42pt}%
715
}
716

717
%==============================================================================
718
% Formatação das seções
719
%==============================================================================
720
\setcounter{secnumdepth}{4} 
721

722
\renewcommand{\section}{%
723
  \@startsection{section}{1}{0pt}{18pt}{9pt}{\reset@font\large\MakeUppercase}
724
} 
725

726
\renewcommand{\subsection}{%
727
  \@startsection{subsection}{2}{0pt}{12pt}{6pt}{\reset@font\bfseries}
728
} 
729

730
\renewcommand{\subsubsection}{%
731
  \@startsection{subsubsection}{3}{0pt}{12pt}{6pt}{\reset@font\itshape}
732
} 
733

734
\renewcommand{\paragraph}{%
735
  \@startsection{paragraph}{4}{0pt}{12pt}{6pt}{\reset@font\uline} 
736
}
737

738
\renewcommand{\subparagraph}{%
739
  \@startsection{subparagraph}{5}{0pt}{1ex}{-1em}{\reset@font\bfseries}
740
}
741

742
%==============================================================================
743
% Formatação das legendas
744
%==============================================================================
745
\renewcommand{\thefigure}{\@arabic\c@figure}
746
\renewcommand{\thetable}{\@arabic\c@table}
747

748
\counterwithout{figure}{chapter}
749
\counterwithout{equation}{chapter}
750
\counterwithout{table}{chapter}
751

752
%==============================================================================
753
% Redefinição do conteúdo das listas de figuras e tabelas
754
%==============================================================================
755
\newif\if@captionlisting\@captionlistingtrue
756
\long\def\@caption#1[#2]#3{%
757
  \par
758
  \if@captionlisting%
759
    \addcontentsline{\csname ext@#1\endcsname}{#1}%
760
        {\protect\numberline{\csname fnum@#1\endcsname}{\ignorespaces #2}}%
761
  \fi%
762
  \begingroup
763
    \@parboxrestore
764
    \if@minipage
765
      \@setminipage
766
    \fi
767
    \normalsize
768
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
769
  \endgroup%
770
}
771

772
\renewcommand*{\l@figure}{\@dottedtocline{1}{0em}{5.5em}}
773
\let\l@table\l@figure
774

775
%==============================================================================
776
% Redefinição do formato de citações longas
777
%==============================================================================
778
\renewenvironment{quote}{%
779
  \small%
780
  \begin{list}{}{\setlength{\leftmargin}{40mm}\item\relax}
781
  }{%
782
  \end{list}
783
}
784

785
%==============================================================================
786
% Ajuste do formato das citações e referências
787
%==============================================================================
788
\setlength{\bibhang}{0pt}
789
\let\cite\citep
790

791
%
792
% Definições de seções restantes.
793
%
794

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

797
\newcommand{\fichacatalografica}{%
798
  \clearpage%
799
  \mbox{}%
800
  \vfill
801
  \begin{center}
802
    \textbf{Insira AQUI a ficha catalogr\'afica\\(solicitada na p\'agina da biblioteca)}
803
\end{center}
804
\vfill%
805
}
806

807
% Seção de agradecimentos
808

809
\newenvironment{agradecimentos}{%
810
  \chapter*{Agradecimentos}%
811
}{%
812
}
813

814
% Seção de dedicatória
815

816
\newenvironment{dedicatoria}{%
817
  \clearpage%
818
  \mbox{}\vfill\begin{flushright}%
819
  }{%
820
  \end{flushright}%
821
}
822

823
% Seção de epígrafe
824

825
\newenvironment{epigrafe}{%
826
  \clearpage%
827
  \mbox{}\vfill\begin{flushright}%
828
  }{%
829
  \end{flushright}%
830
}
831