%% %% This is file `estgleiria.cls', %% %% This is the `estgleiria' document class used for composition of LaTeX %% monographs (master thesis) satisfying the requirements of the Coordination %% of Master Course in Engenharia Electrotecnica - Telecomunicacoes at Escola %% Superior de Tecnologia e Gestao of Instituto Politecnico de Leiria. %% %% Copyright (C) 2011 Luis F. R. Lucas %% Copyright (C) 2018 Joao F. M. Carreira %% %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License version 3 as %% published by the Free Software Foundation. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License version 3 for more details. %% %% You should have received a copy of the GNU General Public License %% version 3 along with this package (see COPYING file). %% If not, see . %% %% Author(s): %% Luis F. R. Lucas %% Joao F. M. Carreira %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% \def\fileversion{v1.0} \def\filedate{2011/06/01} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{estgleiria}[\filedate\ \fileversion\ IPL Dissertations and Thesis] \LoadClass[12pt,a4paper,twoside]{book} \RequirePackage{hyphenat} \RequirePackage{lastpage} \RequirePackage[english]{babel} \RequirePackage{ifthen} \RequirePackage{graphicx} \RequirePackage{cite} \RequirePackage{setspace} \RequirePackage{tabularx} \RequirePackage{eqparbox} \RequirePackage{ltxcmds} \RequirePackage{notoccite} % \RequirePackage{nomencl} % \RequirePackage[a4paper,bindingoffset=0.0cm,vcentering=true,top=3cm,bottom=2.5cm,left=3.0cm,right=2cm]{geometry} \RequirePackage[a4paper,bindingoffset=0.0cm,vcentering=true,top=3cm,bottom=2.5cm,left=3.5cm,right=2cm]{geometry} % \RequirePackage[includeheadfoot,margin=3.5cm]{geometry} \def\EstgTeX{{\rm E\kern-.05em{\sc S\kern-.025em T\kern-.025em G\kern-.025em}}\kern-.08em T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\spacefactor1000} \RequirePackage{fancyhdr} \RequirePackage{titlesec} % %Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup % \RequirePackage[Sonny]{fncychap} \newcommand\selectoriginallanguage{\selectlanguage{portuguese}} \newcommand\glsknowledgmentsname{Agradecimentos} \newcommand\listabbreviationname{Lista de Abreviaturas} \newcommand\name@bib{Bibliografia} \newcommand\contentsnameestg{\'Indice} \newcommand\secondpagecourse{\local@course} \newcommand\secondpagedate{\local@monthname\ de \number\year} \DeclareOption{pt}{% \renewcommand\selectoriginallanguage{\selectlanguage{portuguese}} \renewcommand\contentsname{\'Indice} \renewcommand\glsknowledgmentsname{Agradecimentos} \renewcommand\listabbreviationname{Lista de Abreviaturas} \renewcommand\name@bib{Bibliografia} \renewcommand\secondpagecourse{\local@course} \renewcommand\secondpagedate{\local@monthname\ de \number\year} } \DeclareOption{en}{% \renewcommand\selectoriginallanguage{\selectlanguage{english}} \renewcommand\contentsnameestg{Contents} \renewcommand\glsknowledgmentsname{Acknowledgments} \renewcommand\listabbreviationname{List of Abbreviations} \renewcommand\name@bib{Bibliography} \renewcommand\secondpagecourse{\foreign@course} \renewcommand\secondpagedate{\foreign@monthname\ \number\year} } \headsep 1cm \renewcommand\tableofcontents{% \cleardoublepage \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse \fi \chapter*{\contentsnameestg \@mkboth{% \MakeUppercase\contentsnameestg}{\MakeUppercase\contentsnameestg}}% \@starttoc{toc}% \if@restonecol\twocolumn\fi \addcontentsline{toc}{chapter}{\contentsnameestg} } \newcommand{\properpagestyle}{\pagestyle{fancy}} \renewcommand{\chaptermark}[1]% {\markboth{\thechapter.\ #1}{}} \renewcommand{\sectionmark}[1]% {\markright{\thesection.\ #1}} \renewcommand{\headrulewidth}{0.5pt} \renewcommand{\footrulewidth}{0pt} \fancyhf{} \fancyhead[LE,RO]{\nouppercase{\footnotesize\scshape\thepage}} \fancyhead[LO]{\nouppercase{\footnotesize\scshape\rightmark}} \fancyhead[RE]{\nouppercase{\footnotesize\scshape\leftmark}} \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else \hbox{} \vspace*{\fill} \vspace{\fill} \thispagestyle{empty} \newpage \if@twocolumn\hbox{}\newpage\fi\fi\fi} \newboolean{maledoc} \setboolean{maledoc}{false} \def\insersecondtitle{} \newcommand\secondtitle{% \def\insersecondtitle{\cleardoublepage\@mainmatterfalse\thispagestyle{empty}\makefrontpage}% } \DeclareOption{msc}{% \newcommand{\@degree}{MSc} \newcommand{\@degreename}{Mestrado} \newcommand{\local@degname}{Mestre} \newcommand{\foreign@degname}{Master} \newcommand\local@doctype{\uppercase{Disserta{\c c}{\~ a}o} } \newcommand\foreign@doctype{\local@doctype} \DeclareOption{pt}{% \renewcommand\foreign@doctype{\local@doctype}% \renewcommand\foreign@degname{}% } \DeclareOption{en}{\renewcommand\foreign@doctype{Dissertation}} \secondtitle } \DeclareOption{grad}{% \newcommand{\@degree}{Eng.} \newcommand{\@degreename}{Licenciatura} \newcommand{\local@degname}{Licenciado} \newcommand{\local@doctype}{Projecto} \newcommand{\foreign@doctype}{Project} } \DeclareOption{report}{% \newcommand{\@degreename}{Licenciatura} \newcommand\local@doctype{Relat\'orio} \newcommand\foreign@doctype{Report} } \DeclareOption{phdconfirmation}{% \newcommand{\@degree}{PhD} \newcommand{\@degreename}{PhD} \newcommand{\local@degname}{PhD} \newcommand{\foreign@degname}{PhD} \newcommand\local@doctype{Confirmation Report} \newcommand\foreign@doctype{Confirmation Report} } \DeclareOption{phdthesis}{% \newcommand{\@degree}{PhD} \newcommand{\@degreename}{PhD} \newcommand{\local@degname}{PhD} \newcommand{\foreign@degname}{PhD} \newcommand\local@doctype{PhD Thesis} \newcommand\foreign@doctype{PhD Thesis} } \onehalfspacing \DeclareOption{doublespacing}{% \doublespacing } \ProcessOptions\relax \newcommand\department[1]{% \global\def\local@deptname{#1}% } \newcommand\course[1]{% \global\def\local@course{#1}% } \newcommand\foreigncourse[1]{% \global\def\foreign@course{#1}% } \renewcommand\title[1]{% \global\def\local@title{#1}% } \newcommand\foreigntitle[1]{% \global\def\foreign@title{#1}% } \newcommand\covertext[1]{% \global\def\local@covertext{#1}% } \newcommand\foreigncovertext[1]{% \global\def\foreign@covertext{#1}% } \renewcommand\author[2]{% \global\def\@authname{#1} \global\def\@authsurn{#2} } \renewcommand\date[2]{% \month=#1 \year=#2 } \newcommand\local@monthname{\ifcase\month\or janeiro\or fevereiro\or mar{\c c}o\or abril\or maio\or junho\or julho\or agosto\or setembro\or outubro\or novembro\or dezembro\fi} \newcommand\foreign@monthname{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi} \newcommand\ENAbstract[2]{% \selectlanguage{english} \chapter*{Abstract} \addcontentsline{toc}{chapter}{Abstract} #1 \vspace{10mm} \textbf{Keywords:} #2 } \renewcommand\frontmatter{% \insersecondtitle \cleardoublepage \setcounter{page}{1} \pagenumbering{roman} \pagestyle{plain} \titleformat{\chapter}[display] {\normalfont\Large\bfseries} {\sc\chaptertitlename\ \thechapter}{15pt} {\Huge \thispagestyle{empty}} [\vspace{5mm}\titlerule] } \renewcommand\mainmatter{% \estg@mainBegin \cleardoublepage \@mainmattertrue % \titleformat{\chapter}[display] % {\normalfont\Large\bfseries} % {\sc\chaptertitlename\ \thechapter}{15pt} % {\Huge \thispagestyle{empty}} % [\vspace{1cm}\titlerule\minitoc\glsresetall] \titleformat{\chapter}[display]{\normalfont\Huge\bfseries}{\sc \chaptertitlename\ \thechapter}{20pt}{\Huge \thispagestyle{empty}}[\vspace{5mm}] \properpagestyle \pagenumbering{arabic}} \renewcommand\backmatter{% \cleardoublepage \addcontentsline{toc}{chapter}{\name@bib} \titleformat{\chapter}[display] {\normalfont\Large\bfseries\raggedleft} {\sc\chaptertitlename\ \thechapter}{15pt} {\Huge \thispagestyle{empty}} [\vspace{1cm}\titlerule] } \newcommand\titlefigs[1]{% \def\inserttitlefigs{#1}% } % \renewcommand\maketitle{% % \pagestyle{empty} % \begin{titlepage} % \vspace*{1.5mm} % \setlength\parskip{1mm} % \begin{center} % \inserttitlefigs % \end{center} % \vspace{1cm} % \begin{center} % \doublespacing % \nohyphens{\normalsize%\uppercase\expandafter{\local@degname} % \uppercase{\uppercase\expandafter{\local@doctype} }}\par % \nohyphens{\large\expandafter{\local@course}}\par % \vspace*{2cm} % \nohyphens{\Large\bf\expandafter{\local@title}}\par % \vspace{3cm} % \large\rm % \vspace*{0.5cm} % \nohyphens{\sc\@authname\ \@authsurn}\par % \end{center} % % \vspace*{2.1cm} % \begin{flushright} % \begin{minipage}{8.45cm} % \end{minipage}\par % \vspace*{7.5mm} % \end{flushright} % \vspace*{\fill} % \begin{center} % % \local@cityname, \local@monthname\ de \number\year % \foreign@monthname\ \number\year % \end{center} % \end{titlepage} % \global\let\maketitle\relax% % \global\let\and\relax} \renewcommand\maketitle{% \pagestyle{empty} \begin{titlepage} \vspace*{1.5mm} \setlength\parskip{1mm} \begin{center} \inserttitlefigs \end{center} \vspace{.5cm} \begin{center} \doublespacing \nohyphens{\Large\bf\expandafter{\local@title}}\par \vspace{1.5cm} \large\rm % by \par \sc\@authname\ \@authsurn\par \vspace{1.5cm} \bfseries A Doctoral Thesis \end{center} \vspace*{1cm} \begin{flushright} \begin{minipage}{8.6cm} Submitted in partial fulfilment of the requirements for the award of Doctor of Philosophy of Loughborough University in London \end{minipage}\par \vspace*{7.5mm} \end{flushright} \vspace*{\fill} \begin{center} % \local@cityname, \local@monthname\ de \number\year \foreign@monthname\ \number\year \par \vspace{2cm} \copyright\ \number\year\ by Jo\~{a}o Carreira \end{center} \end{titlepage} \global\let\maketitle\relax% \global\let\and\relax} \newcommand\makefrontpage{% \vspace*{1.5mm} \setlength\parskip{1mm} \begin{center} \inserttitlefigs \end{center} \vspace*{1cm} \begin{center} \doublespacing \nohyphens{\normalsize%\uppercase\expandafter{\local@degname} \uppercase{\uppercase\expandafter{\foreign@degname} \uppercase\expandafter{\foreign@doctype} }}\par \nohyphens{\large \expandafter{\secondpagecourse}}\par \vspace*{2cm} \nohyphens{\Large\bf\expandafter{\local@title}}\par \vspace{3cm} \large\rm \vspace*{0.5cm} \nohyphens{\sc\@authname\ \@authsurn}\par \end{center} \vspace*{1cm} \vspace*{4mm} \frontpage@maintext \vspace*{12mm} \noindent \par \begin{center} \local@cityname, \secondpagedate \end{center} %\begin{center} %\includegraphics[width=6cm]{IT_logo_ad_hoc.pdf} %\end{center} } \newcommand\dedication[1]{ \gdef\@dedic{#1} \cleardoublepage \thispagestyle{empty} \vspace*{\fill} \begin{flushright} \begin{minipage}{60mm} \raggedleft \it \normalsize \@dedic \end{minipage} \end{flushright} \vspace*{\stretch{3}} \cleardoublepage} \renewcommand\listoffigures{% \estg@hasLof \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse \fi \chapter*{\listfigurename}% \addcontentsline{toc}{chapter}{\listfigurename}% \@mkboth{\MakeUppercase\listfigurename}% {\MakeUppercase\listfigurename}% \@starttoc{lof}% \if@restonecol\twocolumn\fi } \renewcommand\listoftables{% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse \fi \chapter*{\listtablename}% \addcontentsline{toc}{chapter}{\listtablename}% \@mkboth{% \MakeUppercase\listtablename}% {\MakeUppercase\listtablename}% \@starttoc{lot}% \if@restonecol\twocolumn\fi } \newcommand\printloabbreviations{% \renewcommand\glossaryname{\listabbreviationname}% \@input@{\jobname.lab}} \def\makeloabbreviations{% \newwrite\@labfile \immediate\openout\@labfile=\jobname.abx \def\abbrev{\@bsphack\begingroup \@sanitize \@wrlab}\typeout {Writing index of abbreviations file \jobname.abx}% \let\makeloabbreviations\@empty } \@onlypreamble\makeloabbreviations \AtBeginDocument{% \@ifpackageloaded{hyperref}{% \def\@wrlab#1#2{% \protected@write\@labfile{}% {\string\indexentry{[#1] #2|hyperpage}{\thepage}}% \endgroup \@esphack}}{% \def\@wrlab#1#2{% \protected@write\@labfile{}% {\string\indexentry{[#1] #2}{\arabic{page}}}% \endgroup \@esphack}}} \AtBeginDocument{% \@ifpackageloaded{hyperref}{ \def\estg@bibEnd{% \immediate\write\@auxout{% \string\newlabel{bib:end}{{}{\arabic{page}}{}{page.\arabic{page}}{}}}}% \def\estg@bibBegin{% \immediate\write\@auxout{% \string\newlabel{bib:begin}{{}{\arabic{page}}{}{page.\arabic{page}}{}}}}% \def\estg@mainBegin{% \immediate\write\@auxout{% \string\newlabel{front:pageno}{{}{\Roman{page}}{}{page.\roman{page}}{}}}}% \def\estg@hasLof{% \immediate\write\@auxout{% \string\newlabel{cat:lofflag}{{}{:~il.;}{}{page.\roman{page}}{}}}}% }{% \def\estg@bibEnd{% \immediate\write\@auxout{% \string\newlabel{bib:end}{{}{\arabic{page}}{}}}}% \def\estg@bibBegin{% \immediate\write\@auxout{% \string\newlabel{bib:begin}{{}{\arabic{page}}{}}}}% \def\estg@mainBegin{% \immediate\write\@auxout{% \string\newlabel{front:pageno}{{}{\Roman{page}}{}}}}% \def\estg@hasLof{% \immediate\write\@auxout{% \string\newlabel{cat:lofflag}{{}{:~il.;}{}}}}% }% } \newenvironment{theglossary}{% \if@twocolumn% \@restonecoltrue\onecolumn% \else% \@restonecolfalse% \fi% \@mkboth{\MakeUppercase\glossaryname}% {\MakeUppercase\glossaryname}% \chapter*{\glossaryname}% \addcontentsline{toc}{chapter}{\glossaryname} \list{} {\setlength{\listparindent}{0in}% \setlength{\labelwidth}{1.0in}% \setlength{\leftmargin}{1.5in}% \setlength{\labelsep}{0.5in}% \setlength{\itemindent}{0in}}% \sloppy}% {\if@restonecol\twocolumn\fi% \endlist} \renewenvironment{theindex}{% \if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi \twocolumn[\@makeschapterhead{\indexname}]% \@mkboth{\MakeUppercase\indexname}% {\MakeUppercase\indexname}% \thispagestyle{plain}\parindent\z@ \addcontentsline{toc}{chapter}{\indexname} \parskip\z@ \@plus .3\p@\relax \columnseprule \z@ \columnsep 35\p@ \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} \newcommand\glossaryname{Glossary} \newcommand\local@advisorstring{Orientador} \newcommand\foreign@advisorstring{Advisor} \newcommand\local@universityname{Instituto Polit{\'e}cnico de Leiria} \newcommand\local@deptstring{Departamento} \newcommand\foreign@deptstring{Department} % \newcommand\local@cityname{Leiria} \newcommand\local@cityname{Surrey} \newcommand\local@countryname{Portugal} \newcommand\frontpage@maintext{ \noindent\sloppy\nohyphens{\local@covertext}% } \newcommand\frontpage@bottomtext{% \begin{center} %\local@cityname, \foreign@monthname\ \number\year \end{center} \begin{center} \includegraphics[width=6cm]{figs/IT_logo_ad_hoc.pdf} \end{center} } %% %% %% End of file `estgleiria.cls'.