eletrotupi / tcc/ monografia/textsi.clsd133c5dc25eb543666edec663c5f91ca583f8b32
26.5 KB | 829 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

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

196
\pagestyle{empty}%
197
\let\ps@plain\ps@empty
198

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

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

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

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

234

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

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

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

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

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

286
\newlength{\titlepagewinwidth}\setlength{\titlepagewinwidth}{95mm}
287
\newlength{\titlepagewinheight}\setlength{\titlepagewinheight}{64mm}
288
\newlength{\titlepagewinvoffset}\setlength{\titlepagewinvoffset}{112mm}
289

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

295
\location{Pelotas}{RS}
296

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

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

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

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

518
%==============================================================================
519
% Ajuste do sumário (nada indentado) 
520
%==============================================================================
521

522
% Nível do sumário
523
\setcounter{tocdepth}{4}
524

525
\newlength{\ei@chapnumindent}\setlength{\ei@chapnumindent}{1em}
526

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

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

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

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

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

557
%
558
% Anexos e apêndices
559
%
560

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

746
\counterwithout{figure}{chapter}
747
\counterwithout{equation}{chapter}
748
\counterwithout{table}{chapter}
749

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

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

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

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

789
%
790
% Definições de seções restantes.
791
%
792

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

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

805
% Seção de agradecimentos
806

807
\newenvironment{agradecimentos}{%
808
  \chapter*{Agradecimentos}%
809
}{%
810
}
811

812
% Seção de dedicatória
813

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

821
% Seção de epígrafe
822

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