Coppe PDF
Coppe PDF
                                        Abstract
          In this work, it is described the coppe document class as well as other
     files distributed by the CoppeTEX project. This class is suitable for writing
     academic dissertations, thesis and qualifying exams according to the format-
     ting rules of the Alberto Luiz Coimbra Institute for Graduate Studies and
     Research in Engineering. The minimalist set of macro commands allows its
     users to concentrate most of their efforts on text composition rather than
     on the document layout.
1    Introduction
Writing documents in LATEX may be a laborious task when the authors have to
prepare their manuscripts rigorously respecting formatting rules imposed by pub-
lishers. Regardless of difficulty, a lot of thesis presented to the Coordination of
Graduate Studies and Research in Engineering of the Federal University of Rio
de Janeiro (COPPE/UFRJ) is typeseted in LATEX. This demand motivated the
creation of the CoppeTEX project, which tries to facilitate and encourage the use
of LATEX within the COPPE/UFRJ scope.
    The coppe document class is the main product of CoppeTEX. It was designed
to be clear and succinct. It enables the creation of dissertations, qualifying exams
and thesis in a simple and automatic way. The main goal of the coppe class is
to maintain authors strictly focused on text composition without worrying about
margins sizes, line spacing, paper size, vertical and horizontal alignment, etc. The
CoppeTEX project comprehends also BibTEX and MakeIndex style files for creat-
ing lists of references, symbols and abbreviations. Although there aren’t official
guidelines to write qualifying exams, we provide this option just for convenience,
as this exam is a requisite to obtain the DSc degree.
    In which follows, it is described the user interface of the coppe class. Some
details about using the style files cited above are also given. We use the term
thesis to generally refer to dissertation, qualifying exam, and thesis itself.
2    License
Each file belonging to this package contains a copyright notice. Its use is protected
by the GNU General Public License (GPL) version 3, so that users are free for
copying, distributing or modifying the source code, among other acts covered by
this license.
    To see the full text of the GNU GPL license, go to the COPYING file attached
to this package.
                                          1
                3     Support
                We maintain a mailing list where users can send questions, comments, and bugs
                to. More details can be found here.
                4     User interface
\frontmatter    A thesis to be approved by the Academic Registry at COPPE/UFRJ must contain
 \mainmatter    three-parts: front, main and back matters [1]. Each one of these parts is started
 \backmatter    by calling its corresponding macro \frontmatter, \mainmatter or \backmatter.
                The front matter of a thesis consists of front cover and face, cataloging page,
                dedication, acknowledgments, abstracts, table of contents, and lists of tables, al-
                gorithms, symbols and abbreviations. The main matter is just composed by chap-
                ters, while the back matter usually consists of bibliographic references, appendices
                and index.
                    You must invoke the \frontmatter macro immediately after the \maketitle
                one. The \mainmatter command comes right before the first chapter, and
                \backmatter must be typed before the list of references.
                Front cover
                This element was recently introduced by the Academic Registry. It is automati-
                cally constructed by the \maketitle command.
                Front face
                The front face is unnumbered. There, it is not allowed to use hyphenation [1]. It
                is constructed by calling \maketitle. Next, it is described the commands used to
                enter the information required to create it.
     \author        The \author command was redefined. Here, it takes two arguments: the
                author’s first names and surname, e.g., \author{First Names}{Surname}. The
                words should be typed with only first letters in uppercase.
       \title       The macros \title and \foreigntitle are used to enter the titles of your
\foreigntitle   monograph in the current and foreign languages. The default languages are
                Brazilian Portuguese and English. The babel package is automatically loaded
                by coppe.cls, so you do not need to load it again. The Brazilian Portuguese is
                the main language and the English is only required for the foreign abstract.
    \advisor        Every COPPE student is coordinated by at least one advisor. M.Sc. and D.Sc.
   \examiner    students can have at most 2 and 3 advisors, respectively. Their names must be
                provided by issuing the command \advisor as below:
                    \advisor{Title}{Advisor’s Name}{Surname}{Degree}
                    \advisor{Title}{Second Advisor’s Name}{Surname}{Degree}
                    \advisor{Title}{Third Advisor’s Name}{Surname}{Degree}
                  The advisors are not necessarily members of the thesis examination board.
                Thus, it is required to enter the names of all examiners using the \examiner
                macro. The examiners’ names are entered differently:
                    \examiner{Title}{First Examiner’s Name Surname}{Degree}
                                                         2
                     \examiner{Title}{Second Examiner’s Name Surname}{Degree}
                     ...
                     \examiner{Title}{N-th Examiner’s Name Surname}{Degree}
                  Cataloging details
                  This page contains cataloging information useful for librarians. Fortunately,
                  it is automatically generated from the data you entered at the time you call
                  \maketitle. It is not needed in qualifying exams, though.
                  Dedication (optional)
   \dedication    This macro was added for convenience. The input text is placed at the right
                  bottom of a blank page. It is emphasized and in normal size.
                  Abstracts
       abstract   As stated by the Academic Registry [1], abstracts must be in one page each, with
foreignabstract   at most 250 words. We recommended that they should be only one paragraph long.
                  They must be defined inside the environments abstract and foreignabstract.
                                                         3
                        commands are called dummy, since they don’t output anything at the place they
                        are executed, just an entry in the correspondent list.
 \makeloabbreviations       These lists are lexicographically sorted by using the MakeIndex program, which
       \makelosymbols   is part of any LATEX implementation. MakeIndex needs two commands to create a
\printloabbreviations   final sorted list: one which generates a list of entries and the other that indicates
      \printlosymbols   the position where the list will be printed out. To generate the lists of symbols and
                        abbreviations, the coppe class provides the commands \makeloabbreviations
                        and \makelosymbols, respectively. They must be called in the document pream-
                        ble. The commands \printlosymbols and \printloabbreviations have to be
                        invoked at the point where you want these lists appear, e.g., following the list of
                        tables as showed in the example. Once you call latex, it will be created two files
                        with extensions abx and syx, which contain MakeIndex input data. They must be
                        processed with makeindex in order to get the lists correctly produced, redirecting
                        the output to files with extension lab and los respectively:
                            makeindex -s coppe.ist -o example.lab example.abx
                            makeindex -s coppe.ist -o example.los example.syx
                        Note the -s option for specifying the style coppe.ist. Now, rerun latex twice
                        to get the references solved and you are done.
                        References
                        It is well known that bibliography databases can be easily maintained with
                        the aid of BibTEX. Thus, the CoppeTEX project designed two BibTEX styles,
                        coppe-plain.bst and coppe-unsrt.bst. The coppe-plain.bst creates a list of
                        references alphabetically sorted. The later is a numbered style, which sorts refer-
                        ences by the order of citation. To use them, you have to select either coppe-plain
                        or coppe-unsrt as the BibTEX style and include your BibTEX references without
                        the bib extension, as in the following example:
                            \bibliographystyle{coppe-unsrt}
                            \bibliography{example}
                           Run in sequence LATEX, BibTEX, and twice again LATEX to resolve reference.
                        These styles are natbib compatible. This means that you can freely issue the
                        commands \citet and \citep, as well as any other natbib feature.
                        5     Class options
                        There are some options users can specify in order to customize the appearance of
                        the output produced by the coppe class. These options can be passed to coppe
                        as follows: \documentclass[option1, option2]{coppe}. In which follows, we
                        give a brief description of all supported options.
                        dsc, msc, dscexam The coppe class is able to produce thesis, dissertations, and
                             qualifying exams, which are enabled by the dsc, msc, and dscexam options,
                             respectively.
                        doublespacing The default line spacing is one-and-a-half. For enabling double
                             spacing between lines, use the doublespacing option.
                                                                 4
numbers The default citation style is the author-year scheme, which must
     be followed by the use of its corresponding BibTEX style, namely, the
     coppe-plain.bst file. For numbered citations, specify the option numbers
     to the coppe class. In this case, it is mandatory the use of coppe-unsrt.bst,
     as the bibliography style.
Fonts. The default font in LATEX is the Computer Modern. If you would like to
try its enhanced version, consider using the lmodern package. To use Times, it is
recommended to load the package mathptmx, rather than the deprecated times.
There is also an enhanced Times version available with the tgtermes package.
You can still use the Arial font face with the package uarial.
Hyperref. When working with PDF’s, there is the possibility to add extra in-
formation to the file as the author’s name, document title, subject, keywords,
etc. This is easily done with the hyperref package. It is also useful to enable
hyperlinks. Fortunately, the coppe class will do this automatically if hyperref is
loaded.
Printing. To get your work correctly printed, you must ensure that any page
scaling option (e.g., fit or shrink to printable area) isn’t enabled. This kind of
option often comes in print dialogs of document visualization softwares.
7      A simple example
1 hexamplei
2 \documentclass[dsc,numbers]{coppe}
3 \usepackage{amsmath,amssymb}
4 \usepackage{hyperref}
5
6    \makelosymbols
7    \makeloabbreviations
8
9  \begin{document}
10   \title{T\’itulo da Tese}
11   \foreigntitle{Thesis Title}
12   \author{Nome do Autor}{Sobrenome}
13   \advisor{Prof.}{Nome do Primeiro Orientador}{Sobrenome}{D.Sc.}
14   \advisor{Prof.}{Nome do Segundo Orientador}{Sobrenome}{Ph.D.}
15   \advisor{Prof.}{Nome do Terceiro Orientador}{Sobrenome}{D.Sc.}
                                        5
16
17   \examiner{Prof.}{Nome   do   Primeiro Examinador Sobrenome}{D.Sc.}
18   \examiner{Prof.}{Nome   do   Segundo Examinador Sobrenome}{Ph.D.}
19   \examiner{Prof.}{Nome   do   Terceiro Examinador Sobrenome}{D.Sc.}
20   \examiner{Prof.}{Nome   do   Quarto Examinador Sobrenome}{Ph.D.}
21   \examiner{Prof.}{Nome   do   Quinto Examinador Sobrenome}{Ph.D.}
22   \department{PEC}
23   \date{02}{2011}
24
25   \keyword{Primeira palavra-chave}
26   \keyword{Segunda palavra-chave}
27   \keyword{Terceira palavra-chave}
28
29   \maketitle
30
31   \frontmatter
32   \dedication{A algu\’em cujo valor \’e digno desta dedicat\’oria.}
33
34   \chapter*{Agradecimentos}
35
36   Gostaria de agradecer a todos.
37
38   \begin{abstract}
39
40   Apresenta-se, nesta tese, ...
41
42   \end{abstract}
43
44   \begin{foreignabstract}
45
46   In this work, we present ...
47
48   \end{foreignabstract}
49
50   \tableofcontents
51   \listoffigures
52   \listoftables
53   \printlosymbols
54   \printloabbreviations
55
56   \mainmatter
57   \chapter{Introdu{\c c}\~ao}
58
59   Segundo a norma de formata{\c c}\~ao de teses e disserta{\c c}\~oes do
60   Instituto Alberto Luiz Coimbra de P\’os-gradua{\c c}\~ao e Pesquisa de
61   Engenharia (COPPE), toda abreviatura deve ser definida antes de
62   utilizada.\abbrev{COPPE}{Instituto Alberto Luiz Coimbra de P\’os-gradua{\c
63   c}\~ao e Pesquisa de Engenharia}
64
65   Do mesmo modo, \’e imprescind\’ivel definir os s\’imbolos, tal como o
66   conjunto dos n\’umeros reais $\mathbb{R}$ e o conjunto vazio $\emptyset$.
67   \symbl{$\mathbb{R}$}{Conjunto dos n\’umeros reais}
68   \symbl{$\emptyset$}{Conjunto vazio}
69
                                         6
70    \chapter{Revis\~ao Bibliogr\’afica}
71
72    Para ilustrar a completa ades\~ao ao estilo de cita{\c c}\~oes e listagem de
73    refer\^encias bibliogr\’aficas, a Tabela~\ref{tab:citation} apresenta cita{\c
74    c}\~oes de alguns dos trabalhos contidos na norma fornecida pela CPGP da
75    COPPE, utilizando o estilo num\’erico.
76
77    \begin{table}[h]
78    \caption{Exemplos de cita{\c c}\~oes utilizando o comando padr\~ao
79      \texttt{\textbackslash cite} do \LaTeX\ e
80      o comando \texttt{\textbackslash citet},
81      fornecido pelo pacote \texttt{natbib}.}
82    \label{tab:citation}
83    \centering
84    {\footnotesize
85    \begin{tabular}{|c|c|c|}
86      \hline
87      Tipo da Publica{\c c}\~ao & \verb|\cite| & \verb|\citet|\\
88      \hline
89      Livro & \cite{book-example} & \citet{book-example}\\
90      Artigo & \cite{article-example} & \citet{article-example}\\
91      Relat\’orio & \cite{techreport-example} & \citet{techreport-example}\\
92      Relat\’orio & \cite{techreport-exampleIn} & \citet{techreport-exampleIn}\\
93      Anais de Congresso & \cite{inproceedings-example} &
94        \citet{inproceedings-example}\\
95      S\’eries & \cite{incollection-example} & \citet{incollection-example}\\
96      Em Livro & \cite{inbook-example} & \citet{inbook-example}\\
97      Disserta{\c c}\~ao de mestrado & \cite{mastersthesis-example} &
98        \citet{mastersthesis-example}\\
99      Tese de doutorado & \cite{phdthesis-example} & \citet{phdthesis-example}\\
100     \hline
101   \end{tabular}}
102   \end{table}
103
104   \chapter{M\’etodo Proposto}
105   \chapter{Resultados e Discuss\~oes}
106   \chapter{Conclus\~oes}
107
108   \backmatter
109   \bibliographystyle{coppe-unsrt}
110   \bibliography{example}
111
112   \appendix
113   \chapter{Algumas Demonstra{\c c}\~oes}
114 \end{document}
115 h=examplei
8     Implementation
8.1     The ‘coppe.cls’ file
116 hclassi
117 \def\filename{coppe.dtx}
118 \def\fileversion{v2.2}
                                        7
119 \def\filedate{2011/02/08}
120 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
121 \ProvidesClass{coppe}[\filedate\ \fileversion\ COPPE Dissertations and Thesis]
122 \LoadClass[12pt,a4paper,oneside]{book}
123 \RequirePackage[sort&compress]{natbib}
124 \RequirePackage{hyphenat}
125 \RequirePackage{lastpage}
126 \RequirePackage[english,brazil]{babel}
127 \RequirePackage{ifthen}
128 \RequirePackage{graphicx}
129 \RequirePackage{setspace}
130 \RequirePackage{tabularx}
131 \RequirePackage{eqparbox}
132 \RequirePackage{ltxcmds}
133 \RequirePackage[a4paper,bindingoffset=0.0cm,vcentering=true,%
134 top=2.5cm,bottom=2.5cm,left=3.0cm,right=3.0cm]{geometry}
135 \def\CoppeTeX{{\rm C\kern-.05em{\sc o\kern-.025em p\kern-.025em
136 p\kern-.025em e}}\kern-.08em
137 T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\spacefactor1000}
138 \newboolean{maledoc}
139 \setboolean{maledoc}{false}
140 %
141 % Definiton of class options.
142 \DeclareOption{msc}{%
143   \newcommand{\@degree}{M.Sc.}
144   \newcommand{\@degreename}{Mestrado}
145   \newcommand{\local@degname}{Mestre}
146   \newcommand{\foreign@degname}{Master}
147   \newcommand\local@doctype{Disserta{\c c}{\~ a}o}
148   \newcommand\foreign@doctype{Dissertation}
149 }
150 \DeclareOption{dscexam}{%
151   \newcommand{\@degree}{D.Sc.}
152   \newcommand{\@degreename}{Doutorado}
153   \newcommand{\local@degname}{Doutor}
154   \newcommand{\foreign@degname}{Doctor}
155   \setboolean{maledoc}{true}
156   \newcommand\local@doctype{Exame de Qualifica{\c c}{\~ a}o}
157   \newcommand\foreign@doctype{Qualifying Exam}
158 }
159 \DeclareOption{dsc}{%
160   \newcommand{\@degree}{D.Sc.}
161   \newcommand{\@degreename}{Doutorado}
162   \newcommand{\local@degname}{Doutor}
163   \newcommand{\foreign@degname}{Doctor}
164   \newcommand\local@doctype{Tese}
165   \newcommand\foreign@doctype{Thesis}
166 }
167 \DeclareOption{numbers}{%
168   \PassOptionsToPackage{numbers}{natbib}
169 }
Here is the default one-and-a-half line spacing. Users can change to double spacing
by passing the doublespacing option.
                                        8
                170 \onehalfspacing
                171 \DeclareOption{doublespacing}{%
                172   \doublespacing
                173 }
                174   \ProcessOptions\relax
  \department   This macro is used to set the author’s affiliation. There are twelve options which
                correspond to all academic units at COPPE/UFRJ. It defines the current and the
                foreign names of these units.
                175 \newcommand\department[1]{%
                176   \ifthenelse{\equal{#1}{PEB}}
                177     {\global\def\local@deptname{Engenharia Biom{\’ e}dica}
                178      \global\def\foreign@deptname{Biomedical Engineering}}{}
                179   \ifthenelse{\equal{#1}{PEC}}
                180     {\global\def\local@deptname{Engenharia Civil}
                181      \global\def\foreign@deptname{Civil Engineering}}{}
                182   \ifthenelse{\equal{#1}{PEE}}
                183     {\global\def\local@deptname{Engenharia El{\’ e}trica}
                184      \global\def\foreign@deptname{Electrical Engineering}}{}
                185   \ifthenelse{\equal{#1}{PEM}}
                186     {\global\def\local@deptname{Engenharia Mec{\^ a}nica}
                187      \global\def\foreign@deptname{Mechanical Engineering}}{}
                188   \ifthenelse{\equal{#1}{PEMM}}
                189     {\global\def\local@deptname{Engenharia Metal{\’ u}rgica e de Materiais}
                190 \global\def\foreign@deptname{Metallurgical and Materials Engineering}}{}
                191   \ifthenelse{\equal{#1}{PEN}}
                192     {\global\def\local@deptname{Engenharia Nuclear}
                193      \global\def\foreign@deptname{Nuclear Engineering}}{}
                194   \ifthenelse{\equal{#1}{PENO}}
                195     {\global\def\local@deptname{Engenharia Oce{\^ a}nica}
                196      \global\def\foreign@deptname{Ocean Engineering}}{}
                197   \ifthenelse{\equal{#1}{PPE}}
                198     {\global\def\local@deptname{Planejamento Energ{\’ e}tico}
                199      \global\def\foreign@deptname{Energy Planning}}{}
                200   \ifthenelse{\equal{#1}{PEP}}
                201     {\global\def\local@deptname{Engenharia de Produ{\c c}{\~ a}o}
                202      \global\def\foreign@deptname{Production Engineering}}{}
                203   \ifthenelse{\equal{#1}{PEQ}}
                204     {\global\def\local@deptname{Engenharia Qu{\’ i}mica}
                205      \global\def\foreign@deptname{Chemical Engineering}}{}
                206   \ifthenelse{\equal{#1}{PESC}}
                207     {\global\def\local@deptname{Engenharia de Sistemas e Computa{\c c}{\~ a}o}
                208      \global\def\foreign@deptname{Systems Engineering and Computer Science}}{}
                209   \ifthenelse{\equal{#1}{PET}}
                210     {\global\def\local@deptname{Engenharia de Transportes}
                211      \global\def\foreign@deptname{Transportation Engineering}}{}
                212 }
                                                        9
                     216 \newcommand\foreigntitle[1]{%
                     217   \global\def\foreign@title{#1}%
                     218 }
         \advisor    Defines globally the title, name and academic degree of the advisors.
                     219 \newcount\@advisor\@advisor0
                     220 \newcommand\advisor[4]{%
                     221   \global\@namedef{CoppeAdvisorTitle:\expandafter\the\@advisor}{#1}
                     222   \global\@namedef{CoppeAdvisorName:\expandafter\the\@advisor}{#2}
                     223   \global\@namedef{CoppeAdvisorSurname:\expandafter\the\@advisor}{#3}
                     224   \global\@namedef{CoppeAdvisorDegree:\expandafter\the\@advisor}{#4}
                     225   \global\advance\@advisor by 1
                     226   \ifnum\@advisor>1
                     227     \renewcommand\local@advisorstring{Orientadores}
                     228     \renewcommand\foreign@advisorstring{Advisors}
                     229   \fi
                     230 }
        \examiner
                     231 \newcount\@examiner\@examiner0
                     232 \newcommand\examiner[3]{%
                     233   \global\@namedef{CoppeExaminer:\expandafter\the\@examiner}{#1\ #2, #3}
                     234   \global\advance\@examiner by 1
                     235 }
          \author    It was redefined to allow the identification of the author’s first names and surname.
                     236 \renewcommand\author[2]{%
                     237   \global\def\@authname{#1}
                     238   \global\def\@authsurn{#2}
                     239 }
            \date    This code makes easy to switch from dates in different languages.
                     240 \renewcommand\date[2]{%
                     241   \month=#1
                     242   \year=#2
                     243 }
  \local@monthname
                     244 \newcommand\local@monthname{\ifcase\month\or
                     245   Janeiro\or Fevereiro\or Mar{\c c}o\or Abril\or Maio\or Junho\or
                     246   Julho\or Agosto\or Setembro\or Outubro\or Novembro\or Dezembro\fi}
\foreign@monthname
                     247 \newcommand\foreign@monthname{\ifcase\month\or
                     248   January\or February\or March\or April\or May\or June\or
                     249   July\or August\or September\or October\or November\or December\fi}
         \keyword
                     250 \newcounter{keywords}
                     251 \newcommand\keyword[1]{%
                     252   \global\@namedef{CoppeKeyword:\expandafter\the\c@keywords}{#1}
                     253   \global\addtocounter{keywords}{1}
                     254 }
                                                              10
\frontmatter   The number of pages for both frontmatter and mainmatter printed in the cata-
               loging details page is computed by means of simple LATEX labels.
               255 \renewcommand\frontmatter{%
               256   \cleardoublepage
               257   \@mainmatterfalse
               258   \pagenumbering{roman}
               259   \thispagestyle{empty}
               260   \setcounter{page}{2}
               261   \makefrontpage
               262   \clearpage
               263   \pagestyle{plain}
               264   \ifthenelse{\boolean{maledoc}}{}{\makecatalog}%
               265 }
 \mainmatter
               266 \renewcommand\mainmatter{%
               267   \coppe@mainBegin
               268   \cleardoublepage
               269   \@mainmattertrue
               270   \pagestyle{plain}
               271   \pagenumbering{arabic}}
 \backmatter
               272 \renewcommand\backmatter{%
               273   \if@openright
               274     \cleardoublepage
               275   \else
               276     \clearpage
               277   \fi}
               278 %
  \maketitle
               279 \renewcommand\maketitle{%
               280   \pagenumbering{alph}
               281   \ltx@ifpackageloaded{hyperref}{\coppe@hypersetup}{}%
               282   \begin{titlepage}
               283   \begin{flushleft}
               284   \vspace*{1.5mm}
               285   \setlength\baselineskip{0pt}
               286   \setlength\parskip{1mm}
               287   \makebox[20mm][c]{\hspace{4.8cm}\includegraphics{coppe-logo}}
               288   \end{flushleft}
               289   \vspace{1.05cm}
               290   \begin{center}
               291   \nohyphens{\MakeUppercase\local@title}\par
               292   \vspace*{3cm}
               293   \nohyphens{\@authname\ \@authsurn}\par
               294   \end{center}
               295   \vspace*{2.1cm}
               296   \begin{flushright}
               297   \begin{minipage}{8.45cm}
               298   \frontcover@maintext
               299   \end{minipage}\par
                                                     11
300   \vspace*{7.5mm}
301   \nohyphens{%
302   \begin{tabularx}{8.45cm}[b]{@{}l@{ }>{\raggedright\arraybackslash}X@{}}
303     \local@advisorstring: &
304     \count1=0
305     \toks@={}
306     \@whilenum \count1<\@advisor \do{%
307     \ifcase\count1 % same as \ifnum0=\count1
308       \toks@=\expandafter{\csname CoppeAdvisorName:\the\count1%
309          \expandafter\endcsname\expandafter\space%
310          \csname CoppeAdvisorSurname:\the\count1\endcsname\\}
311     \else
312       \toks@=\expandafter\expandafter\expandafter{%
313          \expandafter\the\expandafter\toks@%
314          \expandafter&\expandafter\space%
315          \csname CoppeAdvisorName:\the\count1\expandafter\endcsname%
316          \expandafter\space\csname CoppeAdvisorSurname:\the\count1\endcsname\\
317       }%
318     \fi
319     \advance\count1 by 1}
320     \the\toks@
321   \end{tabularx}}\par
322   \end{flushright}
323   \vspace*{\fill}
324   \begin{center}
325   \local@cityname\par
326   \local@monthname\ de \number\year
327   \end{center}
328   \end{titlepage}
329   \global\let\maketitle\relax%
330   \global\let\and\relax}
331 \newcommand\makefrontpage{%
332   \begin{center}
333     \sloppy\nohyphens{\MakeUppercase\local@title}\par
334     \vspace*{7mm}
335     {\@authname\ \@authsurn}\par
336   \end{center}\par
337   \vspace*{4mm}
338   \frontpage@maintext
339   \vspace*{8mm}
340   \noindent\local@approvedname:\par
341      \begin{center}
342   \begin{flushright}
343         \count1=0
344         \@whilenum \count1<\@examiner \do {
345             \vskip26\p@ \baselineskip12pt
346         \eqmakebox[signture@list][c]{\hrulefill}\\
347         \eqmakebox[signture@list][c]{%
348             \ \ \ \protect\csname CoppeExaminer:\the\count1 \endcsname\ \ \ }\\
349             \advance\count1 by 1}
350   \end{flushright}
351      \end{center}
352   \vspace*{\fill}
                                      12
               353   \frontpage@bottomtext}
               354 \newcommand\coppe@hypersetup{%
               355 \begingroup
               356    % changes to \toks@ and \count@ are kept local;
               357    % it’s not necessary for them, but it is usually the case
               358    % for \count1, because the first ten counters are written
               359    % to the DVI file, thus you got lucky because of PDF output
               360    \toks@={}% in this special case not necessary
               361    \count@=0 %
               362    \@whilenum\count@<\value{keywords}\do{%
               363      % * a keyword separator is not necessary,
               364      %     if there is just one keyword
               365      % * \csname CoppeKeyword:\the\count@\endcsname must be expanded
               366      %     at least once, to get rid of the loop depended \count@
               367      \ifcase\count@ % same as \ifnum0=\count@
               368        \toks@=\expandafter{\csname CoppeKeyword:\the\count@\endcsname}%
               369      \else
               370        \toks@=\expandafter\expandafter\expandafter{%
               371           \expandafter\the\expandafter\toks@
               372           \expandafter;\expandafter\space
               373           \csname CoppeKeyword:\the\count@\endcsname
               374        }%
               375      \fi
               376      \advance\count@ by 1 %
               377    }%
               378    \edef\x{\endgroup
               379      \noexpand\hypersetup{%
               380         pdfkeywords={\the\toks@}%
               381      }%
               382    }%
               383 \x
               384 \hypersetup{%
               385    pdfauthor={\@authname\ \@authsurn},
               386    pdftitle={\local@title},
               387    pdfsubject={\local@doctype\ de \@degreename\ em \local@deptname\ da COPPE/UFRJ},
               388    pdfcreator={LaTeX with CoppeTeX toolkit},
               389    breaklinks={true},
               390    raiselinks={true},
               391    pageanchor={true},
               392 }}
\makecatalog   When the document has illustrations, it is required to insert “: il.;” between the
               number of pages of the textual part and the page dimension. We have created a
               label to flag the existence of lists of figures. It is checked to be undefined using
               the plain TEX command \@isundefined [7].
               393 \newcommand\makecatalog{%
               394   \vspace*{\fill}
               395   \begin{center}
               396     \setlength{\fboxsep}{5mm}
               397     \framebox[120mm][c]{\makebox[5mm][c]{}%
               398       \begin{minipage}[c]{105mm}
               399       \setlength{\parindent}{5mm}
               400       \noindent\sloppy\nohyphens\@authsurn,
                                                       13
              401       \nohyphens\@authname\par
              402       \nohyphens{\local@title/\@authname\ \@authsurn. -- \local@cityname:
              403       UFRJ/COPPE, \number\year.}\par
              404       \pageref{front:pageno},
              405       \pageref{LastPage}
              406       p.\@ifundefined{r@cat:lofflag}{}{\pageref{cat:lofflag}} $29,7$cm.\par
              407       % There is an issue here. When the last entry must be split between lines,
              408       % the spacing between it and the next paragraph becomes smaller.
              409       % Should we manually introduce a fixed space? But how could we know that
              410       % a name was split? Is this happening yet?
              411       \nohyphens{%
              412       \begin{tabularx}{100mm}[b]{@{}l@{ }>{\raggedright\arraybackslash}X@{}}
              413         \local@advisorstring: &
              414         \count1=0
              415         \toks@={}
              416         \@whilenum \count1<\@advisor \do{%
              417         \ifcase\count1 % same as \ifnum0=\count1
              418           \toks@=\expandafter{\csname CoppeAdvisorName:\the\count1%
              419           \expandafter\endcsname\expandafter\space%
              420           \csname CoppeAdvisorSurname:\the\count1\endcsname\\}
              421         \else
              422           \toks@=\expandafter\expandafter\expandafter{%
              423              \expandafter\the\expandafter\toks@
              424              \expandafter&\expandafter\space
              425              \csname CoppeAdvisorName:\the\count1\expandafter\endcsname%
              426              \expandafter\space\csname CoppeAdvisorSurname:\the\count1\endcsname\\
              427           }%
              428         \fi
              429         \advance\count1 by 1}
              430         \the\toks@
              431       \end{tabularx}}\par
              432       \nohyphens{\local@doctype\ ({\MakeLowercase\@degreename}) --
              433       UFRJ/COPPE/Programa de \local@deptname, \number\year.}\par
              434       \bibname: p. \pageref{bib:begin} -- \pageref{bib:end}.\par
              435       \count1=0
              436       \count2=1
              437       \nohyphens{\@whilenum \count1<\value{keywords} \do {%
              438         \number\count2. \csname CoppeKeyword:\the\count1 \endcsname.
              439         \advance\count1 by 1
              440         \advance\count2 by 1}
              441       I. \csname CoppeAdvisorSurname:0\endcsname,%
              442       \ \csname CoppeAdvisorName:0\endcsname%
              443       \ifthenelse{\@advisor>1}{\ \emph{et~al.}{}}.
              444       II. \local@universityname, COPPE, Programa de \local@deptname.
              445       III. T{\’ i}tulo.}
              446     \end{minipage}}
              447   \end{center}
              448   \vspace*{\fill}}
\dedication
              449 \newcommand\dedication[1]{
              450   \gdef\@dedic{#1}
              451     \cleardoublepage
              452     \vspace*{\fill}
                                                    14
                  453    \begin{flushright}
                  454      \begin{minipage}{60mm}
                  455        \raggedleft \it \normalsize \@dedic
                  456      \end{minipage}
                  457    \end{flushright}}
foreignabstract
                  495 \newenvironment{foreignabstract}{%
                  496   \clearpage
                  497   \thispagestyle{plain}
                  498   \begin{otherlanguage}{english}
                  499   \foreignabstract@toptext\par
                  500   \vspace*{8.6mm}
                  501   \begin{center}
                  502     \sloppy\nohyphens{\MakeUppercase\foreign@title}\par
                                                           15
                 503     \vspace*{13.2mm}
                 504     \@authname\ \@authsurn \par
                 505     \vspace*{7mm}
                 506     \foreign@monthname/\number\year
                 507   \end{center}\par
                 508   \vspace*{\fill}
                 509   \noindent%
                 510   \begin{tabularx}{\textwidth}[b]{@{}l@{ }>{\raggedright\arraybackslash}X@{}}
                 511     \foreign@advisorstring: &
                 512     \count1=0
                 513     \toks@={}
                 514     \@whilenum \count1<\@advisor \do{%
                 515     \ifcase\count1 % same as \ifnum0=\count1
                 516       \toks@=\expandafter{\csname CoppeAdvisorName:\the\count1%
                 517       \expandafter\endcsname\expandafter\space%
                 518       \csname CoppeAdvisorSurname:\the\count1\endcsname\\}
                 519     \else
                 520       \toks@=\expandafter\expandafter\expandafter{%
                 521         \expandafter\the\expandafter\toks@
                 522         \expandafter&\expandafter\space
                 523         \csname CoppeAdvisorName:\the\count1\expandafter\endcsname%
                 524         \expandafter\space\csname CoppeAdvisorSurname:\the\count1\endcsname\\
                 525       }%
                 526     \fi
                 527     \advance\count1 by 1}
                 528     \the\toks@
                 529   \end{tabularx}\par
                 530   \vspace*{2mm}
                 531   \noindent\foreign@deptstring: \foreign@deptname\par
                 532   \vspace*{7mm}}{%
                 533   \end{otherlanguage}
                 534   \vspace*{\fill}
                 535   \global\let\@author\@empty
                 536   \global\let\@date\@empty
                 537   \global\let\foreign@title\@empty
                 538   \global\let\foreign@title\relax
                 539   \global\let\local@title\@empty
                 540   \global\let\local@title\relax
                 541   \global\let\author\relax
                 542   \global\let\author\relax
                 543   \global\let\date\relax}
\listoffigures
                 544 \renewcommand\listoffigures{%
                 545     \coppe@hasLof
                 546     \if@twocolumn
                 547       \@restonecoltrue\onecolumn
                 548     \else
                 549       \@restonecolfalse
                 550     \fi
                 551     \chapter*{\listfigurename}%
                 552       \addcontentsline{toc}{chapter}{\listfigurename}%
                 553       \@mkboth{\MakeUppercase\listfigurename}%
                 554               {\MakeUppercase\listfigurename}%
                                                       16
                        555    \@starttoc{lof}%
                        556    \if@restonecol\twocolumn\fi
                        557    }
        \listoftables
                        558 \renewcommand\listoftables{%
                        559     \if@twocolumn
                        560       \@restonecoltrue\onecolumn
                        561     \else
                        562       \@restonecolfalse
                        563     \fi
                        564     \chapter*{\listtablename}%
                        565       \addcontentsline{toc}{chapter}{\listtablename}%
                        566       \@mkboth{%
                        567           \MakeUppercase\listtablename}%
                        568          {\MakeUppercase\listtablename}%
                        569     \@starttoc{lot}%
                        570     \if@restonecol\twocolumn\fi
                        571     }
      \printlosymbols
                        572 \newcommand\printlosymbols{%
                        573 \renewcommand\glossaryname{\listsymbolname}%
                        574 \@input@{\jobname.los}}
       \makelosymbols
                        575 \def\makelosymbols{%
                        576   \newwrite\@losfile
                        577   \immediate\openout\@losfile=\jobname.syx
                        578   \def\symbl{\@bsphack\begingroup
                        579              \@sanitize
                        580              \@wrlos}\typeout
                        581   {Writing index of symbols file \jobname.syx}%
                        582   \let\makelosymbols\@empty
                        583 }
                        584 \@onlypreamble\makelosymbols
                        585 \AtBeginDocument{%
                        586 \@ifpackageloaded{hyperref}{%
                        587   \def\@wrlos#1#2{%
                        588     \protected@write\@losfile{}%
                        589       {\string\indexentry{[#1] #2|hyperpage}{\thepage}}%
                        590     \endgroup
                        591     \@esphack}}{%
                        592   \def\@wrlos#1#2{%
                        593     \protected@write\@losfile{}%
                        594       {\string\indexentry{[#1] #2}{\thepage}}%
                        595     \endgroup
                        596     \@esphack}}}
\printloabbreviations
                        597 \newcommand\printloabbreviations{%
                        598 \renewcommand\glossaryname{\listabbreviationname}%
                        599 \@input@{\jobname.lab}}
                                                              17
\makeloabbreviations
                       600 \def\makeloabbreviations{%
                       601   \newwrite\@labfile
                       602   \immediate\openout\@labfile=\jobname.abx
                       603   \def\abbrev{\@bsphack\begingroup
                       604               \@sanitize
                       605               \@wrlab}\typeout
                       606   {Writing index of abbreviations file \jobname.abx}%
                       607   \let\makeloabbreviations\@empty
                       608 }
                       609 \@onlypreamble\makeloabbreviations
                       610 \AtBeginDocument{%
                       611 \@ifpackageloaded{hyperref}{%
                       612   \def\@wrlab#1#2{%
                       613     \protected@write\@labfile{}%
                       614       {\string\indexentry{[#1] #2|hyperpage}{\thepage}}%
                       615     \endgroup
                       616     \@esphack}}{%
                       617   \def\@wrlab#1#2{%
                       618     \protected@write\@labfile{}%
                       619       {\string\indexentry{[#1] #2}{\arabic{page}}}%
                       620     \endgroup
                       621     \@esphack}}}
                       622 % Some macros used to generate cataloging information.
                       623 \AtBeginDocument{%
                       624   \ltx@ifpackageloaded{hyperref}{
                       625     \def\coppe@bibEnd{%
                       626       \immediate\write\@auxout{%
                       627         \string\newlabel{bib:end}{{}{\arabic{page}}{}{page.\arabic{page}}{}}}}%
                       628     \def\coppe@bibBegin{%
                       629       \immediate\write\@auxout{%
                       630         \string\newlabel{bib:begin}{{}{\arabic{page}}{}{page.\arabic{page}}{}}}}%
                       631     \def\coppe@mainBegin{%
                       632       \immediate\write\@auxout{%
                       633         \string\newlabel{front:pageno}{{}{\Roman{page}}{}{page.\roman{page}}{}}}}%
                       634     \def\coppe@hasLof{%
                       635       \immediate\write\@auxout{%
                       636         \string\newlabel{cat:lofflag}{{}{:~il.;}{}{page.\roman{page}}{}}}}%
                       637   }{%
                       638     \def\coppe@bibEnd{%
                       639       \immediate\write\@auxout{%
                       640       \string\newlabel{bib:end}{{}{\arabic{page}}{}}}}%
                       641     \def\coppe@bibBegin{%
                       642       \immediate\write\@auxout{%
                       643       \string\newlabel{bib:begin}{{}{\arabic{page}}{}}}}%
                       644     \def\coppe@mainBegin{%
                       645       \immediate\write\@auxout{%
                       646         \string\newlabel{front:pageno}{{}{\Roman{page}}{}}}}%
                       647     \def\coppe@hasLof{%
                       648       \immediate\write\@auxout{%
                       649         \string\newlabel{cat:lofflag}{{}{:~il.;}{}}}}%
                       650   }%
                       651 }
                                                            18
652 \newdimen\bibindent%
653 \setlength\bibindent{1.5em}%
654 \renewenvironment{thebibliography}[1]%
655      {\onehalfspacing%
656       \chapter*{\bibname}%
657       \addcontentsline{toc}{chapter}{\bibname}%
658       \coppe@bibBegin
659       \list{\@biblabel{\@arabic\c@enumiv}}%
660            {\setlength{\labelwidth}{0ex}%
661             \setlength{\leftmargin}{9.0ex}%
662             \setlength{\itemindent}{-9.0ex}%
663             \advance\leftmargin\labelsep%
664             \@openbib@code%
665             \usecounter{enumiv}%
666             \let\p@enumiv\@empty%
667             \renewcommand\theenumiv{\@arabic\c@enumiv}}%
668       \sloppy%
669       \clubpenalty4000%
670       \@clubpenalty \clubpenalty%
671       \widowpenalty4000%
672       \sfcode‘\.\@m}%
673      {\def\@noitemerr%
674        {\@latex@warning{Empty ‘thebibliography’ environment}}%
675        \coppe@bibEnd
676       \endlist}
677 \newenvironment{theglossary}{%
678   \if@twocolumn%
679     \@restonecoltrue\onecolumn%
680   \else%
681     \@restonecolfalse%
682   \fi%
683   \@mkboth{\MakeUppercase\glossaryname}%
684   {\MakeUppercase\glossaryname}%
685   \chapter*{\glossaryname}%
686   \addcontentsline{toc}{chapter}{\glossaryname}
687   \list{}
688   {\setlength{\listparindent}{0in}%
689    \setlength{\labelwidth}{1.0in}%
690    \setlength{\leftmargin}{1.5in}%
691    \setlength{\labelsep}{0.5in}%
692    \setlength{\itemindent}{0in}}%
693    \sloppy}%
694   {\if@restonecol\twocolumn\fi%
695 \endlist}
696 %
697 \renewenvironment{theindex}{%
698   \if@twocolumn
699     \@restonecolfalse
700   \else
701     \@restonecoltrue
702   \fi
703   \twocolumn[\@makeschapterhead{\indexname}]%
704   \@mkboth{\MakeUppercase\indexname}%
705   {\MakeUppercase\indexname}%
                                      19
706   \thispagestyle{plain}\parindent\z@
707   \addcontentsline{toc}{chapter}{\indexname}
708   \parskip\z@ \@plus .3\p@\relax
709   \columnseprule \z@
710   \columnsep 35\p@
711   \let\item\@idxitem}
712   {\if@restonecol\onecolumn\else\clearpage\fi}
713 \newcommand\glossaryname{Glossary}
714 \newcommand\listabbreviationname{Lista de Abreviaturas}
715 \newcommand\listsymbolname{Lista de S{\’ i}mbolos}
716 %
717 \newcommand\local@advisorstring{Orientador}
718 \newcommand\foreign@advisorstring{Advisor}
719 \ifthenelse{\boolean{maledoc}}{%
720   \newcommand\local@approvedname{Examinado por}%
721 }{%
722   \newcommand\local@approvedname{Examinada por}%
723 }
724 \newcommand\local@universityname{Universidade Federal do Rio de Janeiro}
725 \newcommand\local@deptstring{Programa}
726 \newcommand\foreign@deptstring{Department}
727 \newcommand\local@cityname{Rio de Janeiro}
728 \newcommand\local@statename{RJ}
729 \newcommand\local@countryname{Brasil}
730 %
731 \newcommand\frontcover@maintext{
732   \sloppy\nohyphens{\local@doctype\ de \@degreename\
733   \ifthenelse{\boolean{maledoc}}{apresentado}{apresentada}
734   ao Programa de P{\’ o}s-gradua{\c c}{\~ a}o em \local@deptname,
735   COPPE, da \local@universityname, como parte dos requisitos
736   necess{\’ a}rios {\‘ a} obten{\c c}{\~ a}o do t{\’ i}tulo de
737   \local@degname\ em \local@deptname.}
738 }
739 %
740 \newcommand\frontpage@maintext{
741   \noindent {\MakeUppercase\local@doctype}
742   \ifthenelse{\boolean{maledoc}}{SUBMETIDO}{SUBMETIDA}
743   \sloppy\nohyphens{AO CORPO DOCENTE DO INSTITUTO ALBERTO LUIZ COIMBRA
744   DE P{\’ O}S-GRADUA{\c C}{\~ A}O E PESQUISA DE ENGENHARIA (COPPE) DA
745   UNIVERSIDADE FEDERAL DO RIO DE JANEIRO COMO PARTE DOS REQUISITOS
746   NECESS{\’ A}RIOS PARA A OBTEN{\c C}{\~ A}O DO GRAU DE
747   {\MakeUppercase\local@degname} EM CI{\^E}NCIAS EM
748   {\MakeUppercase\local@deptname.\par}}%
749 }
750 %
751 \newcommand\frontpage@bottomtext{%
752   \begin{center}
753   {\MakeUppercase{\local@cityname, \local@statename\ -- \local@countryname}}\par
754   {\MakeUppercase\local@monthname\ DE \number\year}
755   \end{center}%
756 }
757 %
758 \newcommand\abstract@toptext{%
759   \noindent Resumo \ifthenelse{\boolean{maledoc}}{do}{da}
                                     20
760     \local@doctype\ \ifthenelse{\boolean{maledoc}}{apresentado}{apresentada}
761     \sloppy\nohyphens{{\‘ a} COPPE/UFRJ como parte dos requisitos
762     necess{\’ a}rios para a obten{\c c}{\~ a}o do grau de
763     \local@degname\ em Ci{\^ e}ncias (\@degree)}
764 }
765 \newcommand\foreignabstract@toptext{%
766   \noindent \sloppy\nohyphens{Abstract of \foreign@doctype\ presented to
767   COPPE/UFRJ as a partial fulfillment of the requirements for the
768   degree of \foreign@degname\ of Science (\@degree)}
769 }
770 %
771   h=classi
772 hglossaryi
773 actual ’=’
774 quote ’!’
775 level ’>’
776 delim_0     ", p. "
777 lethead_flag 0
778 headings_flag 0
779 preamble
780 "\n\\begin{theglossary}\n \\makeatletter"
781 postamble
782 "\n \\end{theglossary}\n"
783 h=glossaryi
Acknowledgments
Thanks to all CoppeTEX users who have reported their experience with this class.
We also thank to professor Fernando Lizarralde and Heiko Oberdiek for their
helpful comments. The authors would like to thank the National Council for
Scientific and Technological Development (CNPq) of Brazil.
References
[1] CPGP/COPPE/UFRJ. Norma para a Elaboração Gráfica de Teses. Rio de
    Janeiro, RJ, Brasil, Julho 2008. Revisada em 10/09/2010.
[2] Donald E. Knuth. The TEXbook. Addison-Wesley, Reading, MA, 1984.
[3] Leslie Lamport. LATEX: A Document Preparation System. Addison-Wesley,
    Reading, MA, 1986.
[4] Oren Patashnik. Bibtexing. Documentation for general BibTEX users, Febru-
    ary 1988.
[5] Oren Patashnik. Designing bibtex styles. The part of BibTeX ’s documentation
    that’s not meant for general users, February 1988.
[6] William Strunk, Jr. and E. B. White. The Elements of Style. Macmillan, 3
    edition, 1979.
[7] TEX Frequently Asked Questions.
                                        21
Index
Numbers written in italic refer to the page where the corresponding entry is de-
scribed; numbers underlined refer to the code line of the definition; numbers in
roman refer to the code lines where the entry is used.
                                                 22
\local@deptname . . .                      . . . . . . . . 728, 753                    P
       . 177, 180, 183,             \local@title . . 214,               \printloabbreviations
      186, 189, 192,                      291, 333, 386,                       . . . . . . . . 54, 597
      195, 198, 201,                      402, 464, 539, 540            \printlosymbols 53, 572
      204, 207, 210,                \local@universityname
      387, 433, 444,                       . . . . 444, 724, 735                    R
      493, 734, 737, 748                                                \raggedright . . . . . .
\local@deptstring .                               M                            . 302, 412, 472, 510
       . . . . . . . . 493, 725     \mainmatter . . . . 56,       266
\local@doctype         147,         \makecatalog . . 264,         393                 S
      156, 164, 387,                \makefrontpage 261,           331   \symbl . . . . . 67, 68, 578
      432, 732, 741, 760            \makeloabbreviations
\local@monthname . .                       . . . . . . . . . 7,   600                T
       . 244, 326, 468, 754         \makelosymbols . . 6,         575   \tableofcontents . . 50
\local@statename . .                \maketitle . . . . 29,        279   \title . . . . . . . . 10, 213
Change History
23