%
% uaThesis example (for a thesis written in Portuguese)
%
% the complete list of options and commands can be found in uaThesis.sty 
%

\documentclass[12pt,twoside,a4paper]{report}
\usepackage[DETI,final,newLogo]{uaThesis}
\usepackage[12pt]{moresize}
\usepackage{epstopdf}
\usepackage{float}
\usepackage{subcaption}
\def\ThesisYear{2014}

% optional packages
%\usepackage[portuguese]{babel}
\usepackage{easy-todo}
\usepackage{multirow}
\usepackage[english]{babel}
\usepackage{gensymb}
%\usepackage[latin1]{inputenc}
\usepackage{hyperref}
\usepackage{pdflscape}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xspace}% used by \sigla
%\usepackage[newcentury]{quotchap}
\usepackage[printonlyused]{acronym}
%\usepackage{acronym}
\usepackage{underscore}
\usepackage{listings}
\usepackage[]{mcode}

\usepackage{tikz}
\usetikzlibrary{decorations,patterns,decorations.pathreplacing}
\usetikzlibrary{shapes,positioning,arrows,automata,calc}
\usepackage{fancyhdr}

%%Cab roda%%%%%%

% ----------------------------------------------------------------
% Definicao de headers e footers
% ----------------------------------------------------------------
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.#1}{}} % Capítulos em minúsculas
\fancyhf{}                                                  % Reset aos headers e footers
  \fancyhead[LE,RO]{\thepage}                               % Header Left-Even (LE), Right-Odd (RO)
  \fancyhead[LO]{\leftmark}                                 % Header Left-Odd (LO)
  \fancyhead[RE]{\leftmark}                                 % Header Right-Even (RE)
  \fancyfoot[LE]{Filipe Daniel Lopes Serra}                               % Footer Left-Even (LE)
  \fancyfoot[LO]{Filipe Daniel Lopes Serra}                               % Footer Left-Odd (LO)
  \fancyfoot[RE]{\textit{Disserta\c{c}\~ao de Mestrado / Master Thesis}}     % Footer Right-Even (RE)
  \fancyfoot[RO]{\textit{Disserta\c{c}\~ao de Mestrado / Master Thesis}}     % Footer Right-Odd (RO)
  \renewcommand{\headrulewidth}{0.25pt}                     % Espessura da linha de header
  \renewcommand{\footrulewidth}{0.25pt}                     % Espessura da linha de footer
  \addtolength{\headheight}{0.5pt}                          % Espaçamento para a linha



% optional (comment to use default)s
%   depth of the table of contents
%     1 ... chapther and sections
%     2 ... chapters, sections, and subsections
%     3 ... chapters, sections, subsections, and subsubsections
\setcounter{tocdepth}{3}

% optional (comment to used default)
%   horizontal line to separate floats (figures and tables) from text
\def\topfigrule{\kern 7.8pt \hrule width\textwidth\kern -8.2pt\relax}
\def\dblfigrule{\kern 7.8pt \hrule width\textwidth\kern -8.2pt\relax}
\def\botfigrule{\kern -7.8pt \hrule width\textwidth\kern 8.2pt\relax}

% custom macros (could also be defined using \newcommand)
\def\I{\mathtt{i}}         % one possible way to represent $\sqrt{-1}$
\def\Exp#1{e^{2\pi\I #1}}  % argument inside braces, i.e., "{}"
\def\EXP#1.{e^{2\pi\I #1}} % argument finishes when a full stop is encountered, i.e., "."
\def\sigla{\LaTeX\xspace}  % use as "blabla \sigla blabla (no need to do "blabla \sigla\ blabla"

\def\AddVMargin#1{\setbox0=\hbox{#1}%
                  \dimen0=\ht0\advance\dimen0 by 2pt\ht0=\dimen0%
                  \dimen0=\dp0\advance\dimen0 by 2pt\dp0=\dimen0%
                  \box0}   % add extra vertical space above and below the argument (#1)
\def\Header#1#2{\setbox1=\hbox{#1}\setbox2=\hbox{#2}%
           \ifdim\wd1>\wd2\dimen0=\wd1\else\dimen0=\wd2\fi%
           \AddVMargin{\parbox{\dimen0}{\centering #1\\#2}}} % put #1 on top #2


\begin{document}

%
% Cover page
%
\include{texSource/coverPage}

%
% Tables of contents, of figures, ...
%
\pagenumbering{roman}
\tableofcontents

%
% List of Figures
%
\cleardoublepage
\listoffigures

%
% List of Tables
%
\cleardoublepage
\listoftables

%
% List of Acronyms
%
\cleardoublepage
%\phantomsection
%\addcontentsline{toc}{chapter}{Acronyms}
\include{texSource/acronyms}

%
% The chapters (usually written using the isolatin font encoding ...)
%
\cleardoublepage
\pagenumbering{arabic}

\include{texSource/chapter1}
\cleardoublepage
\include{texSource/chapter2}
\cleardoublepage
\include{texSource/chapter3}
\cleardoublepage
\include{texSource/chapter4}
\cleardoublepage
\include{texSource/chapter5}
\cleardoublepage
\include{texSource/chapter6}
\cleardoublepage
%%
% The bibliography
%
\bibliographystyle{unsrt}
%\cleardoublepage
%\phantomsection
%\addcontentsline{toc}{chapter}{Bibliography}

\renewcommand\bibname{References}
\bibliography{library}

%
% The Appendix
%
\appendix
\include{texSource/appendix1}
\cleardoublepage
\include{texSource/appendix2}
\cleardoublepage
%\include{texSource/appendix3}
%\cleardoublepage
\end{document}
