eletrotupi / tcc/ monografia/textsi.cls4afa6690e7fdf56346236182ffc75bb984eb9441
26.7 KB | 838 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
% PARÁGRAFOS
188
%----------------------------------------
189
% Tamanho da endentação do parágrafo
190
\setlength{\parindent}{1.3cm}
191
% Espaçamento entre um parágrafo e outro
192
\setlength{\parskip}{1.5pt}
193

194

195
%==============================================================================
196
% Numeração das páginas
197
%==============================================================================
198
\def\ps@texufpel{%
199
  \let\@oddfoot\@empty%
200
  \let\@evenfoot\@empty%
201
  \def\@oddhead{\hspace*{\fill}{\small\thepage}}%
202
  \def\@evenhead{\hspace*{\fill}{\small\thepage}}%
203
} 
204

205
\pagestyle{empty}%
206
\let\ps@plain\ps@empty
207

208
%==============================================================================
209
% Definição de autor(es), orientador e co-orientador
210
%==============================================================================
211
\newcounter{ei@authorcount}
212
\renewcommand{\author}[2]{
213
        \addtocounter{ei@authorcount}{1}
214
        \expandafter\gdef\csname @author\alph{ei@authorcount}last\endcsname{#1}
215
        \expandafter\gdef\csname @author\alph{ei@authorcount}first\endcsname{#2}
216
        \expandafter\gdef\csname @author\alph{ei@authorcount}\endcsname{#2 #1}
217
}
218

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

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

235
\newcounter{ei@collaboratorcount}
236
\DeclareRobustCommand{\collaborator}[3][]{
237
        \addtocounter{ei@collaboratorcount}{1}
238
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}last\endcsname{#2}
239
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}first\endcsname{#3}
240
        \expandafter\gdef\csname @collaborator\alph{ei@collaboratorcount}\endcsname{#1~#3 #2}
241
}
242

243

244
%==============================================================================
245
% Definição das palavras-chave (máx. 10)
246
%==============================================================================
247
\newcounter{kwcounter}
248
\newcommand{\keyword}[1]{
249
        \addtocounter{kwcounter}{1}
250
        \expandafter\gdef\csname keyw\alph{kwcounter}\endcsname{#1}
251
}
252

253
\newcommand{\@cipkw}{%
254
        \@ifundefined{keywa}{}{1.~\expandafter\MakeUppercase\keywa\@. }%
255
        \@ifundefined{keywb}{}{2.~\expandafter\MakeUppercase\keywb\@. }%
256
        \@ifundefined{keywc}{}{3.~\expandafter\MakeUppercase\keywc\@. }%
257
        \@ifundefined{keywd}{}{4.~\expandafter\MakeUppercase\keywd\@. }%
258
        \@ifundefined{keywe}{}{5.~\expandafter\MakeUppercase\keywe\@. }%
259
        \@ifundefined{keywf}{}{6.~\expandafter\MakeUppercase\keywf\@. }%
260
        \@ifundefined{keywg}{}{7.~\expandafter\MakeUppercase\keywg\@. }%
261
        \@ifundefined{keywh}{}{8.~\expandafter\MakeUppercase\keywh\@. }%
262
        \@ifundefined{keywi}{}{9.~\expandafter\MakeUppercase\keywi\@. }%
263
        \@ifundefined{keywj}{}{10.~\expandafter\MakeUppercase\keywj\@. }%
264
}
265

266
\newcommand{\@abstractkw}{%
267
        \@ifundefined{keywa}{}{\expandafter\MakeUppercase\keywa}%
268
        \@ifundefined{keywb}{}{, \keywb}%
269
        \@ifundefined{keywc}{}{, \keywc}%
270
        \@ifundefined{keywd}{}{, \keywd}%
271
        \@ifundefined{keywe}{}{, \keywe}%
272
        \@ifundefined{keywf}{}{, \keywf}%
273
        \@ifundefined{keywg}{}{, \keywg}%
274
        \@ifundefined{keywh}{}{, \keywh}%
275
        \@ifundefined{keywi}{}{, \keywi}%
276
        \@ifundefined{keywj}{}{, \keywj}%
277
}
278

279
%==============================================================================
280
% Redefinição da data (para ter mês e ano separados)
281
%==============================================================================
282
\renewcommand{\date}[2]{
283
        \gdef\@publmonth{#1}
284
        \gdef\@publyear{#2}
285
}
286
\date{\monthname}{\number\year}
287

288
%==============================================================================
289
% Definição padrão da folha de rosto.
290
% Os dados específicos do tipo de trabalho (dissertação, tese, etc.) são
291
% informados definindo-se o comando \titlepagespecificinfo. Veja os
292
% arquivos .def incluídos com a classe.
293
%==============================================================================
294

295
\newlength{\titlepagewinwidth}\setlength{\titlepagewinwidth}{95mm}
296
\newlength{\titlepagewinheight}\setlength{\titlepagewinheight}{64mm}
297
\newlength{\titlepagewinvoffset}\setlength{\titlepagewinvoffset}{112mm}
298

299
\newcommand{\location}[2]{
300
        \gdef\@city{#1}
301
        \gdef\@state{#2}
302
}
303

304
\location{Pelotas}{RS}
305

306
\renewcommand{\maketitle}{
307
\@ifundefined{@capa}{%
308
\begin{titlepage}
309
\thetitlepage
310
\end{titlepage}
311
\clearpage
312
\setcounter{page}{1}
313
}{%
314
\begin{titlepage}
315
\thecoverpage
316
\newpage
317
\thetitlepage
318
\end{titlepage}
319
\clearpage
320
\setcounter{page}{2}
321
}
322
}
323

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

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

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

527
%==============================================================================
528
% Ajuste do sumário (nada indentado) 
529
%==============================================================================
530

531
% Nível do sumário
532
\setcounter{tocdepth}{4}
533

534
\newlength{\ei@chapnumindent}\setlength{\ei@chapnumindent}{1em}
535

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

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

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

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

559
\newif\if@aftertoc
560
\@aftertocfalse
561
\renewcommand{\tableofcontents}{%
562
        \chapter*{\contentsname}
563
        \@starttoc{toc}\@aftertoctrue%
564
}
565

566
%
567
% Anexos e apêndices
568
%
569

570
% Seção anexo
571
\newcounter{annex}% add counter
572
\renewcommand\theannex{\annexname~\@Alph\c@annex \space --}
573

574
\newcommand*\l@annex[2]{
575
        \addpenalty{-\@highpenalty}
576
        \vskip -1ex \@plus\p@
577
        \setlength\@tempdima{1.5em}
578
        \begingroup
579
        \parindent \z@ \rightskip \@pnumwidth
580
        \parfillskip -\@pnumwidth
581
        \leavevmode\bfseries\sffamily
582
        \advance\leftskip\@tempdima
583
        \hskip -\leftskip
584
        \@dottedtocline{0}{0em}{5.75em}{\MakeUppercase{#1}}{#2}
585
        \penalty\@highpenalty
586
        \endgroup
587
}
588

589
\newcommand\annexmark[1]{} % define header/footer                            
590
\newcommand\annex{
591
  \clearpage%
592
  \vspace*{90pt}%
593
  \@startsection{annex}{0}{0pt}{0pt}{42pt}{\centering\reset@font\ei@chapterfont\sffamily\bfseries\MakeUppercase}%
594
}
595

596
% Seção apêndice
597
\newcounter{append}% add counter
598
\renewcommand\theappend{\appendixname~\@Alph\c@append \space --}
599

600
\newcommand*\l@append[2]{
601
        \addpenalty{-\@highpenalty}
602
        \vskip -1ex \@plus\p@
603
        \setlength\@tempdima{1.5em}
604
        \begingroup
605
        \parindent \z@ \rightskip \@pnumwidth
606
        \parfillskip -\@pnumwidth
607
        \leavevmode\bfseries\sffamily
608
        \advance\leftskip\@tempdima
609
        \hskip -\leftskip
610
        \@dottedtocline{0}{0em}{7.25em}{\MakeUppercase{#1}}{#2}
611
        \penalty\@highpenalty
612
        \endgroup
613
}
614

615
\newcommand\appendmark[1]{} % define header/footer                            
616
\newcommand\append{
617
  \clearpage%
618
  \vspace*{90pt}%
619
  \@startsection{append}{0}{0pt}{0pt}{42pt}{\centering\reset@font\ei@chapterfont\sffamily\bfseries\MakeUppercase}%
620
}
621

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

641
\newenvironment{listofsymbols}[1]{
642
  \chapter*{\listsymbolname}
643
  \begin{list}{\textbf{??}}{%
644
      \settowidth{\labelwidth}{#1}%
645
      \setlength{\labelsep}{1em}%
646
      \setlength{\itemindent}{0mm}%
647
      \setlength{\leftmargin}{\labelwidth}%
648
      \addtolength{\leftmargin}{\labelsep}%
649
      \setlength{\rightmargin}{0mm}%
650
      \setlength{\itemsep}{.1\baselineskip}%
651
      \renewcommand{\makelabel}[1]{\makebox[\labelwidth][l]{##1}}%
652
    }
653
  }{
654
  \end{list}
655
}
656

657
%==============================================================================
658
% Resumo (abstract) e Abstract (englishabstract)
659
%==============================================================================
660
\renewenvironment{abstract}{%
661
  \chapter*{\abstractname}
662
}{%
663
  \par\vskip 0.5cm%
664
  \noindent\textbf{\keywordsname:} \@abstractkw.
665
}
666

667
\newenvironment{englishabstract}[1]{%
668
  \if@openright\cleardoublepage\else\clearpage\fi%
669
  \gdef\@englishkeywords{#1}%
670
  \iflanguage{english}{
671
    \begin{otherlanguage}{brazilian}
672
    }{
673
      \begin{otherlanguage}{english}
674
      }
675
      \chapter*{\abstractname}
676
    }{
677
      \par\vskip 0.5cm%
678
      \noindent\textbf{\keywordsname:} \@englishkeywords.
679
    \end{otherlanguage}
680
}
681

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

694
\def\@chapter[#1]#2{%
695
	\onehalfspacing
696
  \refstepcounter{chapter}%
697
  \addcontentsline{toc}{chapter}{\protect\numberline{\@chapapp\thechapter}#1}%
698
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
699
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
700
  \pagestyle{texufpel}\let\ps@plain\ps@texufpel%
701
  \@makechapterhead{#2}\@afterheading%
702
}
703

704
\def\@makechapterhead#1{%
705
  \vspace*{90pt}%
706
  \reset@font\noindent{\ei@chapterfont\sffamily\textbf{\@chapapp\thechapter\hspace{1em}\MakeUppercase{#1}}\par}%
707
  \addvspace{42pt}%
708
  \thispagestyle{empty}%
709
}
710

711
\def\@schapter#1{%
712
  \if@aftertoc\addcontentsline{toc}{chapter}{#1}\fi%
713
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
714
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
715
  \@makeschapterhead{#1}\@afterheading%
716
}
717

718
\def\@makeschapterhead#1{%
719
  \vspace*{90pt}%
720
  \reset@font\centerline{\ei@chapterfont\sffamily\textbf{\MakeUppercase{#1}}}%
721
  \addvspace{42pt}%
722
}
723

724
%==============================================================================
725
% Formatação das seções
726
%==============================================================================
727
\setcounter{secnumdepth}{4} 
728

729
\renewcommand{\section}{%
730
  \@startsection{section}{1}{0pt}{18pt}{9pt}{\reset@font\large\MakeUppercase}
731
} 
732

733
\renewcommand{\subsection}{%
734
  \@startsection{subsection}{2}{0pt}{12pt}{6pt}{\reset@font\bfseries}
735
} 
736

737
\renewcommand{\subsubsection}{%
738
  \@startsection{subsubsection}{3}{0pt}{12pt}{6pt}{\reset@font\itshape}
739
} 
740

741
\renewcommand{\paragraph}{%
742
  \@startsection{paragraph}{4}{0pt}{12pt}{6pt}{\reset@font\uline} 
743
}
744

745
\renewcommand{\subparagraph}{%
746
  \@startsection{subparagraph}{5}{0pt}{1ex}{-1em}{\reset@font\bfseries}
747
}
748

749
%==============================================================================
750
% Formatação das legendas
751
%==============================================================================
752
\renewcommand{\thefigure}{\@arabic\c@figure}
753
\renewcommand{\thetable}{\@arabic\c@table}
754

755
\counterwithout{figure}{chapter}
756
\counterwithout{equation}{chapter}
757
\counterwithout{table}{chapter}
758

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

779
\renewcommand*{\l@figure}{\@dottedtocline{1}{0em}{5.5em}}
780
\let\l@table\l@figure
781

782
%==============================================================================
783
% Redefinição do formato de citações longas
784
%==============================================================================
785
\renewenvironment{quote}{%
786
  \small%
787
  \begin{list}{}{\setlength{\leftmargin}{40mm}\item\relax}
788
  }{%
789
  \end{list}
790
}
791

792
%==============================================================================
793
% Ajuste do formato das citações e referências
794
%==============================================================================
795
\setlength{\bibhang}{0pt}
796
\let\cite\citep
797

798
%
799
% Definições de seções restantes.
800
%
801

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

804
\newcommand{\fichacatalografica}{%
805
  \clearpage%
806
  \mbox{}%
807
  \vfill
808
  \begin{center}
809
    \textbf{Insira AQUI a ficha catalogr\'afica\\(solicitada na p\'agina da biblioteca)}
810
\end{center}
811
\vfill%
812
}
813

814
% Seção de agradecimentos
815

816
\newenvironment{agradecimentos}{%
817
  \chapter*{Agradecimentos}%
818
}{%
819
}
820

821
% Seção de dedicatória
822

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

830
% Seção de epígrafe
831

832
\newenvironment{epigrafe}{%
833
  \clearpage%
834
  \mbox{}\vfill\begin{flushright}%
835
  }{%
836
  \end{flushright}%
837
}
838