Commit d44927e1 authored by Phelype Oleinik's avatar Phelype Oleinik

Initial commit; First public release :)

parent a85e2fa8
%%
%% This is file `eotex.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% eotex.dtx (with options: `class')
%%
%% Copyright (C) 2018
%% by Phelype Oleinik <phe d@t h d@t o1 at gmail d@t com>
%%
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
%% your option) any later version. The latest version of this license is in
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
%% The fact that this class was created for the postgraduate program in
%% Ocean Engineering of the Universidade Federal do Rio Grande does entail
%% exclusivity, by any means, to the referred university or any related
%% party, thus allowing anyone to use it within the terms of the LPPL.
%%
%% This work is "maintained" (as per the LPPL maintenance status)
%% by Phelype Oleinik.
%%
\def\eotexdate{2018/04/26}
\def\eotexversion{v0.1}
\def\eotexbase{book}
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesClass{eotex}
[\eotexdate\space\eotexversion\space
EoTeX --- LaTeX document class for FURG's Ocean Engineering]
\RequirePackage{etoolbox}
\RequirePackage[patch]{kvoptions}
\SetupKeyvalOptions{family=eotex@,prefix=eotex@}
\DeclareStringOption{interface}
\ProcessKeyvalOptions{eotex@}
\def\eotex@prefix{@eotex@}
\SetupKeyvalOptions{family=eotex,prefix=\eotex@prefix}
\def\Newif#1#2{%
\expandafter\newif\csname if\eotex@prefix#1\endcsname
\global\csletcs{if\eotex@prefix#1}{if#2}}
\DeclareBoolOption[true]{master}
\DeclareComplementaryOption{doctor}{master}
\DeclareBoolOption[false]{project}
\DeclareStringOption[\z@]{titlestretch}[2cm]
\DeclareBoolOption[true]{auto}
\DeclareComplementaryOption{manual}{auto}
\def\eotex@ptsize{12pt}
\DeclareVoidOption{10pt}{\def\eotex@ptsize{10pt}}
\DeclareVoidOption{11pt}{\def\eotex@ptsize{11pt}}
\DeclareVoidOption{12pt}{\def\eotex@ptsize{12pt}}
\DeclareStringOption[brazil]{mainlang}[brazil]
\DeclareStringOption[english]{otherlang}[english]
\DeclareBoolOption[true]{BibLaTeX}
\DeclareComplementaryOption{BibTeX}{BibLaTeX}
\@for\pkg:=\eotex@interface\do{%
\DeclareStringOption{\pkg}%
\DeclareStringOption{force\pkg}}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\eotexbase}}
\ProcessKeyvalOptions*
\PassOptionsToClass{%
\eotex@ptsize,a4paper,oneside,onecolumn,final,openright}{\eotexbase}
\LoadClass{\eotexbase}
\@for\pkg:=\eotex@interface\do{%
\expandafter\ifx\csname\eotex@prefix\pkg\endcsname\relax% Unused
\else
\edef\eotex@tempa{\csname\eotex@prefix\pkg\endcsname}%
\expandafter\PassOptionsToPackage\expandafter{\eotex@tempa}{\pkg}%
\fi}
\PassOptionsToPackage{utf8}{inputenc}
\PassOptionsToPackage{T1}{fontenc}
\PassOptionsToPackage{left=5cm,right=3cm,top=3.5cm,bottom=3.0cm}{geometry}
\PassOptionsToPackage{lining}{ebgaramond}
\PassOptionsToPackage{bookmarks=true}{hyperref}
\PassOptionsToPackage{\@eotex@otherlang,main=\@eotex@mainlang}{babel}
\@ifpackagelater{etoolbox}{2015/08/02}% Using etoolbox to check :P
{\def\eotex@blx@inits{giveninits}}%
{\def\eotex@blx@inits{firstinits}}%
\PassOptionsToPackage{%
backend=biber,
maxcitenames=2,
maxbibnames=99,
language=auto,
autolang=other,
block=space,
bibstyle=authoryear,
citestyle=authoryear-comp,
dashed=false,
\eotex@blx@inits=true,
uniquename=init,
useprefix=false,
isbn=false,
url=true,
doi=true,
eprint=false,
refsegment=chapter,
natbib=true,
}{biblatex}
\@for\pkg:=\eotex@interface\do{%
\expandafter\ifx\csname\eotex@prefix force\pkg\endcsname\relax% Unused
\else
\edef\eotex@tempa{\csname\eotex@prefix force\pkg\endcsname}%
\expandafter\PassOptionsToPackage\expandafter{\eotex@tempa}{\pkg}%
\fi}
\if@eotex@master
\let\eotex@names\@firstoftwo
\else
\let\eotex@names\@secondoftwo
\fi
\newbox\eotex@box
\newtoks\eotex@tok
\newdimen\eotex@dim
\newcount\eotex@cnta
\newcount\eotex@cntb
\newcount\eotex@nadvs
\newcount\eotex@examcnt
\RequirePackage{environ}
\RequirePackage{iftex}
\RequirePackage{ifpdf}
\ifLuaTeX \def\eotex@engine{LuaTeX}%
\else
\ifXeTeX \def\eotex@engine{XeTeX}%
\else \def\eotex@engine{pdfTeX}%
\fi
\fi
\ifpdf \def\eotex@outmode{PDF}%
\else \def\eotex@outmode{DVI}%
\fi% Why???
\ifPDFTeX
\RequirePackage{inputenc}%[utf8]
\RequirePackage{fontenc}
\else
\RequirePackage{fontspec}
\DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ }
\fi
\RequirePackage{geometry}%[left=5cm,right=4cm,top=4cm,bottom=3.5cm]
\IfFileExists{garamondx.sty}%
{% Loads fourier for maths then garamondx
\RequirePackage{garamondx}
\undef\hbar% fourier complains about this one
\RequirePackage{fourier}
\def\rmdefault{zgmx}%
}{% Loads mathdesign with garamond then fourier
\RequirePackage[mdugm]{mathdesign}
\def\hrulefill{%
\leavevmode\leaders\hrule\@height\rulethickness\hfill\kern\z@}
% These two substitutions are convenient because
% mdugm doesn't have real small caps (sc), but fake small caps (fsc)
\DeclareFontShape{T1}{mdugm}{m}{sc}{ <-> ssub * mdugm/m/fsc }{}
\DeclareFontShape{T1}{mdugm}{b}{sc}{ <-> ssub * mdugm/b/fsc }{}
\undef\mathcal
\RequirePackage{fourier}
\def\rmdefault{mdugm}%
}
\def\ttdefault{lmtt}% Latin modern for ttafmily
\def\sfdefault{lmss}% and Sans-Serif
\RequirePackage{babel}%[\@eotex@otherlang,main=\@eotex@mainlang]
\RequirePackage{tikz}
\usetikzlibrary{svg.path}
\IfFileExists{tikzlibrarybabel.code.tex}
{\usetikzlibrary{babel}}
{\ClassWarningNoLine{EoTeX}{%
I couldn't find the `babel' TikZ library.\MessageBreak
Maybe you'll run unto trouble with shorthands.\MessageBreak
If that's the case, you may want to use, for example:\MessageBreak
\string\AtBeginEnvironment{tikzpicture}{\string\shorthandoff{;}}}}
\RequirePackage{lastpage}
\RequirePackage{epigraph}
\RequirePackage{varwidth}
\RequirePackage{moresize}
\RequirePackage{nomencl}
\RequirePackage{xstring}
\RequirePackage{enumitem}
\RequirePackage{ragged2e}
\RequirePackage{graphicx}
\if@eotex@BibLaTeX
\RequirePackage{csquotes}% BibLaTeX Recommended
\RequirePackage{xpatch}% BibLaTeX Recommended
\RequirePackage{biblatex}
\fi
\if@eotex@BibLaTeX\else
You shouldn't be here... Go back to BibLaTeX. NOW!\fi
\newdimen\@nex\@nex1ex
\newdimen\@nem\@nem1em
\def\h@lf{0.5}
\AtBeginDocument{%
\def\today{%
\ifcase\month
\or Janeiro\or Fevereiro\or Março\or Abril\or Maio\or Junho%
\or Julho\or Agosto\or Setembro\or Outubro\or Novembro\or Dezmbro%
\fi\space de \the\year}}
\begingroup\lccode`\|=`\\
\lowercase{\endgroup\def\eotex@removebs#1{\if#1|\else#1\fi}}
\def\eotex@macroname#1{\expandafter\eotex@removebs\string#1}
\def\eotex@defpten#1#2#3{%
\expandafter\protected@edef\csname\eotex@macroname#1@main\endcsname{#2}%
\expandafter\protected@edef\csname\eotex@macroname#1@other\endcsname{#3}}
\eotex@names{%
\eotex@defpten\eotex@title{Mestre}{Master}%
\eotex@defpten\eotex@degree{Mestrado}{Master's}%
\eotex@defpten\eotex@docname{Dissertação}{Master's thesis}%
}{%
\eotex@defpten\eotex@title{Doutor}{Doctor}%
\eotex@defpten\eotex@degree{Doutorado}{Doctor's}%
\eotex@defpten\eotex@docname{Tese}{Doctor's thesis}%
}
\eotex@defpten\eotex@article{Artigo}{Article}%
\if@eotex@project
\edef\eotex@docname@main{Projeto de \eotex@docname@main}
\def\eotex@oa{o}
\else
\def\eotex@oa{a}
\fi
\RequirePackage{ltxcmds}
\def\g@ifnextchar#1#2#3{%
\begingroup
\ltx@LocToksA{\endgroup#2}%
\ltx@LocToksB{\endgroup#3}%
\ltx@ifnextchar{#1}{%
\def\next{\the\ltx@LocToksA}%
\afterassignment\next
\let\scratch= %
}{%
\the\ltx@LocToksB
}%
}
\def\eotex@use{\@ifnextchar(%)
{\eotex@@use}{\eotex@@use(Use)}}
\def\eotex@@use(#1){\@ifnextchar[%]
{\eotex@@@use(#1)}{\eotex@@@use(#1)[...]}}
\def\eotex@@@use(#1)[#2]#3{#1 {\ttfamily\textbackslash#3\{#2\}}}
\robustify\eotex@use% If not made robust it breaks when there's no author
\if@eotex@auto
\def\eotex@befbegdoc#1{{\ttfamily\textbackslash#1} deve ser
usado antes de {\ttfamily\textbackslash begin\{document\}}}
\else
\def\eotex@befbegdoc#1{}
\fi
\def\eotex@dft@advisor{Orientador:}
\def\eotex@dft@coadvisor{Coorientador:}
\def\title#1{\gdef\@title@main{#1}}
\def\@title@main{\eotex@use{title}}
\def\othertitle#1{\gdef\@title@other{#1}}
\def\@title@other{\eotex@use{othertitle}}
\def\author{\@dblarg\author@}
\def\author@[#1]#2{%
\gdef\@shortauthor{#1}%
\gdef\@author{#2}}
\def\@author{\eotex@use{author}}
\def\@shortauthor{\eotex@use{author}}
\def\coordinator#1{\gdef\@coordinator{#1}}
\def\@coordinator{\eotex@use{coordinator}}
\def\keywords#1{\gdef\@keywords@main{#1}}
\def\@keywords@main{\eotex@use{keywords}}
\def\otherkeywords#1{\gdef\@keywords@other{#1}}
\def\@keywords@other{\eotex@use{otherkeywords}}
\def\latestdegree#1{\gdef\@latestdegree{#1}}
\def\@latestdegree{\eotex@use[último título obtido]{latestdegree}}
\def\date#1{\gdef\@date{#1}}
\def\@date{\eotex@use{date} \eotex@use(ou)[\string\today]{date}}
\def\city#1{\gdef\@city{#1}}
\def\@city{Rio Grande}
\def\eotex@bibtype{bibtex}
\def\eotex@bibtex{bibtex}% This is for checking BiTeX source type
\def\bibsource{\@ifnextchar[%]
{\bibsource@}{\bibsource@[\eotex@bibtype]}}
\def\bibsource@[#1]#2{%
\xdef\@bibsource{:={{{#1},{#2}}}}%
\gdef\bibsource@[##1]##2{%
\xdef\@bibsource{\@bibsource,{{{##1},{##2}}}}}}
\def\@bibsource{}
\def\advisor{%
\advance\eotex@nadvs\@ne
\gdef\@advsmacro{advisor}%
\gdef\@advstext{\eotex@dft@advisor}%
\eotex@cnta\eotex@nadvs
\@advisor\z@}
\def\coadvisor{%
\advance\eotex@nadvs\@ne
\gdef\@advsmacro{advisor}%
\gdef\@advstext{\eotex@dft@coadvisor}%
\eotex@cnta\eotex@nadvs
\@advisor\z@}
\def\examiner{%
\advance\eotex@examcnt\@ne
\gdef\@advsmacro{examiner}%
\gdef\@advstext{}%
\eotex@cnta\eotex@examcnt
\@advisor\@ne}
\def\@advisor#1{\@ifnextchar[%]
{\@@advisor{#1}}{\@@advisor{#1}[\@advstext]}}
\def\@@advisor#1[#2]#3#4{%
\let\olda\a
\def\a{%
\kern-0.03em.\kern-0.18em\noexpand\textordfeminine
\noexpand\g@ifnextchar.{}{\ \ignorespaces}}%
\protected@csxdef{@\@advsmacro type\the\eotex@cnta}{#2}%
\protected@csxdef{@\@advsmacro title\the\eotex@cnta}{#3}%
\protected@csxdef{@\@advsmacro \the\eotex@cnta}{#4}%
\ifodd#1
\let\next\@@@advisor
\else
\let\next\relax
\fi
\let\a\olda
\next}
\def\@@@advisor#1{%
\protected@csxdef{@\@advsmacro school\the\eotex@cnta}{#1}}
\@for\@advsmacro:=advisor,examiner\do{%
\@for\eotex@tempb:=1,2\do{%
\protected@csedef{@\@advsmacro\eotex@tempb}{%
\noexpand\eotex@use[Prof. Dr. Mestre Jedi\}\{...]{\@advsmacro}}
\protected@csedef{@\@advsmacro type\eotex@tempb}{\eotex@dft@advisor}}}
\protected@csedef{@advisor2}{%
\noexpand\eotex@use[Prof. Dr. Mestre Jedi\}\{...]{coadvisor}}
\protected@csedef{@advisortype2}{\eotex@dft@coadvisor}
\def\hfskip{\@ifnextchar[%]
{\@hfskip}{\@hfskip[1]}}
\def\@hfskip[#1]#2{\null\hskip#2\@plus#1fill\null}
\def\vfskip{\@ifnextchar[%]
{\@vfskip}{\@vfskip[1]}}
\def\@vfskip[#1]#2{\null\vskip#2\@plus#1fill\null}
\def\eotex@mainlogo{%
\definecolor{clr@tempa}{HTML}{C70027}%
\definecolor{clr@tempb}{HTML}{DF6301}%
\definecolor{clr@tempc}{HTML}{F6A303}%
\begin{tikzpicture}[line width=1pt,line join=round,scale=0.3]
\begin{scope}[yscale=-1]
% Replaced {} by "" to make the code work with TeXLive 2013
% (did not test earlier versions though)
\draw [fill=clr@tempa] svg
"M60-92v172h-120v-172a120 120 0 0 0-28
17v180h176v-180a120 120 0 0 0-28-17z";
\foreach \xs in {-1,1}\draw [fill=clr@tempb,xscale=\xs] svg
"M-108 102v-158a120 120 0 0 0 0 158z";
\draw [fill=clr@tempb] svg
"M79 125h-158a120 120 0 0 0 158 0z";
\draw [fill=clr@tempc] svg
"M-45-116v181h90v-181a120 120 0 0 0-90 0z";
\end{scope}
\end{tikzpicture}}
\def\eotex@brokentitle{\begingroup\color{red}\large\bfseries
Os conteúdos da capa não couberam. Reduza o título%
\ifnum\eotex@nadvs>3\ ou o número de orientadores/coorientadores\fi,
ou use a opção {\ttfamily titlestretch} em
{\ttfamily\string\documentclass\{eotex\}}.\par
\endgroup}
\def\eotex@preambleonly#1{%
\begingroup\color{red}\large\bfseries#1 só pode ser
utilizado antes de \string\begin\{document\}\par\endgroup}
\def\eotex@backcovertext{%
\eotex@docname@main\space submetid\eotex@oa\space ao \eotex@full{prog}
\hbox{(\eotex@acro{prog})} da \eotex@full{dept} da \eotex@full{univ}
\hbox{(\eotex@acro{univ})}, como parte dos requisitos necessários para
a obtenção do Título de \eotex@title@main\space em Engenharia Oceânica.}
\def\eotex@scaleddot{\scalebox{\h@lf}{.}}%
\def\eotex@namesep{\@nem}
\def\EoTeX{{%
\normalfont\reflectbox{E}\kern-.28em\lower.5ex\hbox{O}\kern-.44em\TeX}}
\def\eotex@full#1{\expandafter\expandafter
\expandafter\@secondoftwo\csname eotex@#1\endcsname}
\def\eotex@acro#1{\expandafter\expandafter
\expandafter\@firstoftwo\csname eotex@#1\endcsname}
\def\eotex@prog{{PPGEO}{Programa de Pós-Graduação em Engenharia Oceânica}}
\def\eotex@univ{{FURG}{Universidade Federal do Rio Grande}}
\def\eotex@dept{{EE}{Escola de Engenharia}}
\def\eotex@prefacename{Prefácio}
\def\eotex@thanksname{Agradecimentos}
\def\eotex@epigraphname{Epígrafe}
\def\eotex@examinerboard{Banca examinadora:}
\eotex@defpten\eotex@abstractname{Resumo}{Abstract}
\eotex@defpten\eotex@keywordsname{Palavras-chave}{Keywords}
\def\bibname{Referências}
\if@eotex@BibLaTeX
\DefineBibliographyStrings{\@eotex@mainlang}{%
bibliography={Referências}}%
\DefineBibliographyStrings{\@eotex@otherlang}{%
bibliography={References}}%
\fi
\def\eotex@thesisby{\eotex@docname@main\space de:\par}
\def\eotex@coordinatorof{Coordenador do \eotex@full{prog}\par}
\newcount\eotex@gpage\eotex@gpage\@ne
\apptocmd\@outputpage
{\global\advance\eotex@gpage\@ne}%
{}{}
\def\eotex@makefrontpage{%
\frenchspacing
\null\vskip\@nem
{\centering
\eotex@mainlogo\par\vskip2.5\@nex
\setbox\eotex@box\hbox{\eotex@full{univ}}
\eotex@dim\wd\eotex@box
\usebox\eotex@box\vskip\z@
\hfill\hb@xt@\eotex@dim{%
\hrulefill\space\eotex@full{dept}\space\hrulefill}%
\hfill\null\vskip\@nex
{\large\eotex@full{prog}\par}%
\hrulefill
\vfill
{\LARGE\vskip\@nex
\makebox[\linewidth][c]{%
\begin{minipage}[t]{\dimexpr\@eotex@titlestretch+\linewidth}%
\begin{center}%
\nonfrenchspacing% Normal spacing in the title
\LARGE\@title@main\par
\end{center}%
\end{minipage}}%
\vskip\h@lf\@nem}%
\global\let\thanks\@gobble\@thanks
\vfill
{\raggedleft\eotex@thesisby
\bfseries\large\@shortauthor\par}%
\vfill
{\raggedright
\eotex@cnta\z@
\loop\ifnum\eotex@cnta<\eotex@nadvs
\advance\eotex@cnta \@ne
{\csname @advisortype\the\eotex@cnta\endcsname\par
\bfseries\csname @advisor\the\eotex@cnta\endcsname\par\vskip1.5\@nex}%
\repeat}
\vfill
{\centering\large\strut\@date\par%
\vskip\@nem\eject\global\eotex@cnta\c@page}}%
\cleardoublepage
\global\let\eotex@makefrontpage\relax}
\def\eotex@makesignaturepage{%
{\centering
\nonfrenchspacing
{\large\@title@main\par}
\vfskip{\@nex}{\bfseries\@author}\par\vskip\@nex\@latestdegree\par}%
\vfskip{\@nex}%
\noindent
\begin{minipage}[t]{\dimexpr0.56\textwidth-\eotex@namesep}%
\raggedright
\eotex@cnta\z@
\loop\ifnum\eotex@cnta<\eotex@nadvs
\advance\eotex@cnta\@ne
\csname @advisortype\the\eotex@cnta\endcsname\par
{\setlength{\leftskip}{\@nem}%
\csname @advisortitle\the\eotex@cnta\endcsname\space
\csname @advisor\the\eotex@cnta\endcsname\par\vskip\@nex}%
\repeat
\end{minipage}\hfill% Manually tweaked to avoid an Undefull \hbox
\begin{minipage}[t]{\dimexpr0.44\textwidth-\eotex@namesep}%
\small\eotex@backcovertext\par
\end{minipage}%
\vfskip{\@nex}%
{\raggedright
\eotex@examinerboard\par
\eotex@processnames
\@for\eotex@add:=\z@,\@ne\do{%
\begin{minipage}[t]{\dimexpr\h@lf\textwidth-\eotex@namesep}%
\raggedright
\eotex@cnta\numexpr\@ne+\eotex@add
\loop\ifnum\eotex@cnta<\numexpr\eotex@examcnt+\@ne
\eotex@write@boardmember[\eotex@dim]{\eotex@cnta}{\linewidth}
\advance\eotex@cnta\tw@
\repeat
\end{minipage}%
\ifodd\eotex@add\relax\else\hfill\fi
}\par
\vfskip{\@nex}%
\raggedleft\@coordinator\par
\eotex@coordinatorof}%
\vfskip{\@nex}%
{\large\hfill\strut\@city, \@date\hfill\null\par}%
\if@eotex@project\cleardoublepage\else\clearpage\fi
\global\let\eotex@makesignaturepage\relax}
\def\e@scs{\@ifnextchar[\@e@scs{\@e@scs[/]}}
\def\@e@scs[#1]{\unskip\space#1\space}
\def\eotex@makecatalogpage{%
\null\vfill
\thispagestyle{plain}%
\begin{center}
\fboxsep\h@lf cm
\framebox[12cm][c]{\hfill
\begin{minipage}[c]{10.5cm}%
\small
\parskip0.2\baselineskip
\parindent\h@lf cm
\eotex@namesplit\eotex@firstname\eotex@surname\@author
\noindent\eotex@surname, \eotex@firstname\par
\@title@main\e@scs\@author\e@scs[--]\@city:
\eotex@acro{univ}\e@scs\eotex@acro{dept}, \the\year.\par
\pageref{eotex:endfrontmatter}, \pageref{LastPage} p.\par
\eotex@cnta\z@
\loop\ifnum\eotex@cnta<\eotex@nadvs
\advance\eotex@cnta\@ne
\csname @advisortype\the\eotex@cnta\endcsname\unskip\space
\csname @advisor\the\eotex@cnta\endcsname\par
\repeat
\eotex@docname@main\space
(\expandafter\lowercase\expandafter{\eotex@degree@main})\e@scs
\eotex@acro{univ}\e@scs
\eotex@acro{dept}\e@scs
\eotex@full{prog}, \the\year.\par
\expandafter\ifx\csname r@eotex:endbib\endcsname\relax\else
\bibname: p. \pageref{eotex:beginbib}
\e@scs[--]\pageref{eotex:endbib}.\par
\fi
\eotex@cnta\z@
\@for\@kwd@:=\@keywords@main\do{%
\advance\eotex@cnta\@ne
\the\eotex@cnta.\space\@kwd@.\space}\par
\@Romankern{\@ne}. \eotex@surname, \eotex@firstname.
\@Romankern{\tw@}.
\eotex@full{univ}, \eotex@acro{univ}, \eotex@full{prog}.
\@Romankern{\thr@@}. \@title@main.
% \@Romankern{\thr@@}. Título.% What? I refuse to accept this...
\end{minipage}}%
\end{center}%
\undef\e@scs
\let\eotex@makecatalogpage\relax
\vfill}
\def\eotex@maketitle{%
\pagenumbering{Alph}%
\pagestyle{empty}%
\ifnum\eotex@nadvs=\z@\eotex@nadvs\tw@\fi
\ifnum\eotex@examcnt=\z@\eotex@examcnt\tw@\fi
\newgeometry{margin=4.5cm}%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\eotex@makefrontpage
\restoregeometry
\newgeometry{margin=\thr@@ cm}%
\expandafter\ifnum\the\eotex@cnta>\tw@\eotex@brokentitle\fi
\eotex@makesignaturepage
\if@restonecol
\twocolumn
\else
\newpage
\fi
\restoregeometry
\pagenumbering{Romankern}%
\setcounter{page}\eotex@gpage
\pagestyle{headings}%
\if@eotex@project\else
\eotex@makecatalogpage
\cleardoublepage
\fi
\setcounter{footnote}\z@}
\def\eotex@getexam#1{%
\gdef\eotex@tempa{%
\csname @examinertitle\the#1\endcsname\space
\csname @examiner\the#1\endcsname\hskip\@nex}%
\gdef\eotex@tempb{\hskip\@nex\csname @examinerschool\the#1\endcsname}}
\def\eotex@write@boardmember{%
\@ifnextchar[%]
{\@eotex@write@boardmember}{\@eotex@write@boardmember[]}}
\def\@eotex@write@boardmember[#1]#2#3{%
\begin{minipage}[t][#1]{#3}%
\vphantom{\rule{\z@}{\@nem}}%
\eotex@scaleddot\xleaders\hbox{\eotex@scaleddot}\hfill\null\par
\eotex@getexam{#2}%
\setbox\@tempboxa\hbox{\eotex@tempa---\eotex@tempb}%
\ifdim\wd\@tempboxa>\linewidth
\eotex@tempa\hfill\null\penalty\m@ne
\null\hfill\eotex@tempb
\else
\eotex@tempa\hfill\eotex@tempb
\fi
\end{minipage}}
\def\eotex@processnames{%
\eotex@dim\z@
\eotex@cnta\@ne
\loop\ifnum\eotex@cnta<\numexpr\eotex@examcnt+\@ne\relax
\setbox\@tempboxa\hbox{%
\eotex@write@boardmember
{\eotex@cnta}%
{\dimexpr\h@lf\textwidth-\eotex@namesep}}%
\@tempdima\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax
\ifdim\@tempdima>\eotex@dim
\global\eotex@dim\@tempdima
\fi
\advance\eotex@cnta \@ne
\repeat
\global\let\eotex@processnames\relax}
\def\eotex@namesplit#1#2#3{%
\let#1\@empty\protected@edef\eotex@tempa{#3}%
\expandafter\@namesplit\expandafter#1\expandafter#2\eotex@tempa{} \@nil}
\def\@namesplit#1#2#3 #4\@nil{%
\expandafter\ifx\space#4
\gdef#2{#3}%
\protected@xdef#1{%
\romannumeral-\expandafter`\expandafter\.#1}%
\expandafter\@gobble
\else
\protected@xdef#1{#1 #3}%
\expandafter\@firstofone
\fi
{\@namesplit#1#2#4\@nil}}
\def\setstretch#1{\def\baselinestretch{#1}\@currsize}
\def\Romankern#1{\expandafter\@Romankern\csname c@#1\endcsname}
\def\romankern#1{\expandafter\@romankern\csname c@#1\endcsname}
\def\@Romankern#1{%
\texorpdfstring{%
\expandafter\@@Romankern\expandafter{\number#1}}
{\@Roman{#1}}}
\def\@romankern#1{%
\texorpdfstring{%
\expandafter\@@romankern\expandafter{\number#1}}
{\@Roman{#1}}}
\protected\def\@@Romankern#1{%
\texorpdfstring{%
\edef\eotex@rmntemp{\@Roman{#1}}%
\expandafter\eotex@romkern\eotex@rmntemp\@empty\@empty}%
{\@Roman{#1}}}
\protected\def\@@romankern#1{%
\texorpdfstring{%
\edef\eotex@rmntemp{\@roman{#1}}%
\expandafter\eotex@romkern\eotex@rmntemp\@empty\@empty}
{\@roman{#1}}}
\def\eotex@romkern#1#2{#1%
\ifx#2\@empty
\expandafter\relax
\else
\kern-0.07em%
\expandafter\eotex@romkern
\fi#2}
\Newif{preface}{false}
\NewEnviron{preface}[1][(\bigskipamount)\raggedleft
\@shortauthor\endgraf
\@city\endgraf
\@date]{%
\global\let\eotex@preface@content\BODY
\long\gdef\eotex@preface@signature{#1}%
\global\@eotex@prefacetrue}
\Newif{thanks}{false}% easier to write :P
\NewEnviron{acknowledgement}{%
\global\let\eotex@thanks@content\BODY
\global\@eotex@thankstrue}
\let\acknowledgment\acknowledgement
\let\endacknowledgment\endacknowledgement
\def\epigraphsize{\small}
\def\textflush{flushepinormal}
\def\sourceflush{flushright}
\def\epitextfont{\itshape}
\def\episourcefont{\scshape}
\epigraphwidth\dimexpr0.75\dimexpr\textwidth-\parindent\relax
\newsavebox{\epi@textbox}
\newsavebox{\epi@sourcebox}
\newlength\epi@finalwidth
\long\def\eotex@epigraph#1#2{%
\vspace{\beforeepigraphskip}
{\epigraphsize\begin{\epigraphflush}
\epi@finalwidth\z@
\sbox\epi@textbox{%
\varwidth{\epigraphwidth}
\begin{\textflush}\epitextfont#1\end{\textflush}
\endvarwidth}%
\epi@finalwidth\wd\epi@textbox
\sbox\epi@sourcebox{%
\varwidth{\epigraphwidth}
\begin{\sourceflush}\episourcefont#2\end{\sourceflush}%
\endvarwidth}%
\ifdim\wd\epi@sourcebox>\epi@finalwidth
\epi@finalwidth\wd\epi@sourcebox
\fi
\leavevmode\vbox{%
\hb@xt@\epi@finalwidth{\hfil\box\epi@textbox}
\vskip1.75ex
\hrule\@height\epigraphrule
\vskip.75ex
\hb@xt@\epi@finalwidth{\hfil\box\epi@sourcebox}}%
\end{\epigraphflush}
\vspace{\afterepigraphskip}}%
\@afterindentfalse}
\Newif{epigraph}{false}
\undef\epigraph
\NewEnviron{epigraph}[1]{%
\global\let\eotex@epigraph@content\BODY
\gdef\eotex@epigraph@source{#1}%
\global\@eotex@epigraphtrue}
{\obeylines
\long\gdef\eotex@abstract@content@main{%
\begingroup \parindent\@nem \parskip\z@
\vskip\@nex\noindent Inclua o resumo com
\ttfamily\string\begin\{abstract\}
\ \ <resumo>
\string\end\{abstract\}
\noindent\rmfamily antes de
\ttfamily\string\begin\{document\}
\endgroup}
\long\gdef\eotex@abstract@content@other{%
\begingroup \parindent\@nem \parskip\z@
\vskip\@nex\noindent Add the abstract using
\ttfamily\string\begin\{otherabstract\}
\ \ <abstract>
\string\end\{otherabstract\}
\noindent\rmfamily before
\ttfamily\string\begin\{document\}
\endgroup}}
\NewEnviron{abstract}{%
\global\let\eotex@abstract@content@main\BODY}
\NewEnviron{otherabstract}{%
\global\let\eotex@abstract@content@other\BODY}
\def\eotex@endfrontmatterhook{%
\immediate\write\@auxout{%
\string\newlabel{eotex:endfrontmatter}{%
{}{\Romankern{page}}{}\eotex@romanArg}}}
\def\eotex@startbibhook{%
\immediate\write\@auxout{%
\string\newlabel{eotex:beginbib}{%
{}{\arabic{page}}{}\eotex@arabicArg}}%
\global\let\eotex@startbibhook\relax}
\def\eotex@endbibhook{%
\ifx\eotex@startbibhook\relax
\immediate\write\@auxout{%
\string\newlabel{eotex:endbib}{%
{}{\arabic{page}}{}\eotex@arabicArg}}%
\fi}
\AtBeginDocument{%
\@ifpackageloaded{hyperref}{%
\def\eotex@cl@fourthelement#1{#1}%
\def\eotex@arabicArg{{page.\arabic{page}}{}}%
\def\eotex@romanArg{{page.\Roman{page}}{}}%
}{%
\def\eotex@cl@fourthelement#1{}%
\def\eotex@arabicArg{}%
\def\eotex@romanArg{}%
\let\texorpdfstring\@firstoftwo
}%
}
\newcount\eotex@currchap
\newdimen\eotex@tocsepwid
\newdimen\eotex@remsize
\def\eotex@tocstart{1cm}
\def\eotex@tocpageoffset{\hskip0pt\relax}
\def\eotex@dotscaled{\scalebox{2}{.}}%
\def\eotex@mintocleader{2em}%
\def\eotex@firstof#1#2\many{#1}%
\def\eotex@tocsepdot{%
\kern5pt