%%packages used in thesis

%\usepackage[DEM,newLogo]{uaThesis}		% Package para teses UA (VERSÂO 2009)

\usepackage[DEM,newLogo,final]{uaThesis} %% adicionar "final" aos parâmetros para retirar o "documento provisório"
\usepackage[a4paper]{geometry}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{listings} %para introduzir código na dissertação
\usepackage{listings, color}
\usepackage{hyperref}                            % Links activos no pdf

\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
} % Colocar todos os links a preto
\usepackage{textcomp}                             % Símbolos e caracteres especiais
\usepackage{indentfirst}                         % Indentação do primeiro parágrafo de cada secção
\usepackage{wrapfig} %package para as figuras ficarem no meio do texto
\usepackage{fancyhdr}                             % Utilização de fancy headings
\usepackage{natbib} 
%\usepackage[authoryear]{natbib} 
%%\usepackage{natbib}                          % Ordenação e gestão de referências bibliográficas
%\renewcommand\bibname{New Title}
% \usepackage{epsfig}                               % Permite utilização de figuras em formato EPS
%\usepackage{subfig}                               % Ambiente para gestão de subfiguras
\usepackage{multirow}                             % Agrupamento de linhas em tabelas
\usepackage{layout}
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{pdflscape}
\usepackage{rotating}
\usepackage{float}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{tikz}
\usepackage{xstring}
\usetikzlibrary{calc,fit,backgrounds}
\usetikzlibrary{shapes,arrows}
\usepackage{url}
\usepackage{array}
%\usepackage{SIunits}
%\usepackage{algpseudocode}
%\usepackage{algorithm}
%\usepackage{program}
% -------------------------------------------------------------
% Codificação das fontes
% -------------------------------------------------------------                       
\usepackage[utf8]{inputenc} 
%\usepackage[latin1]{inputenc}                     % Caracteres acentuados do Portugus
\usepackage[portuguese]{babel}                    % Hifenizao e titulos
\usepackage[T1]{fontenc}                          % Codificao das fontes



% -------------------------------------------------------------
% Codificação de liguagens de código
% -------------------------------------------------------------  
%Defenição do estilo do código
\lstdefinestyle{customc}
{
  belowcaptionskip=1\baselineskip,
  breaklines=true,
  frame=L,
  xleftmargin=\parindent,
  language=C,
  showstringspaces=false,
  basicstyle=\footnotesize\ttfamily,
  keywordstyle=\bfseries\color{green!40!black},
  commentstyle=\itshape\color{purple!40!black},
  identifierstyle=\color{blue},
  stringstyle=\color{orange},
}


\lstdefinestyle{customasm}{
  belowcaptionskip=1\baselineskip,
  frame=L,
  xleftmargin=\parindent,
  language=[x86masm]Assembler,
  basicstyle=\footnotesize\ttfamily,
  commentstyle=\itshape\color{purple!40!black},
}
\usepackage{blindtext}
\usepackage{lmodern}
\usepackage{rotating} %package USED FOR ROTATING A TABULAR
\definecolor{forestgreen}{RGB}{34,139,34}
\definecolor{orangered}{RGB}{239,134,64}
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
\definecolor{gray}{rgb}{0.4,0.4,0.4}

\lstdefinestyle{XML} {
    language=XML,
    extendedchars=true, 
    breaklines=true,
    breakatwhitespace=true,
    emph={},
    emphstyle=\color{red},
    basicstyle=\ttfamily,
    columns=fullflexible,
    commentstyle=\color{gray}\upshape,
    morestring=[b]",
    morecomment=[s]{<?}{?>},
    morecomment=[s][\color{gray}]{<!--}{-->},
    keywordstyle=\color{forestgreen},
    stringstyle=\ttfamily\color{red}\normalfont,
    tagstyle=\color{black}\bf,
    morekeywords={attribute,xmlns,version,type,release,src},
    otherkeywords={attribute=, xmlns=},
}

\definecolor{DarkPurple}{rgb}{0.4,0.1,0.4}
\definecolor{DarkCyan}{rgb}{0.0,0.5,0.4}
\definecolor{LightLime}{rgb}{0.4,0.6,0.5}
\definecolor{Blue}{rgb}{0.0,0.0,1.0}


% für Java-Bezeichner und -Keywords im Fließtext
\newcommand{\code}[1]{\small\lstinline[style=InlineJava]!#1!\normalsize}
%\newcommand{\code}[1]{\scriptsize\texttt{#1}\normalsize}

% für Listings mit Eintrag im Inhaltsverzeichnis
%\newcommand{\newlisting}[2]
%{
%\subsubsection*{Listing \ref{lst:#1}: #2}
%\addcontentsline{toc}{subsubsection}{\ref{lst:#1}. #2}}
\lstdefinestyle{PHP1}
{
    	language=Java,
%	numbers=left,
%	firstnumber=1,
%	stepnumber=5,
%	numberfirstline,
%numberstyle=\tiny\sffamily,
%tabsize=5,
captionpos=b,
aboveskip=1em,
belowskip=1em,
columns=flexible,
xleftmargin=2em,
xrightmargin=1em,
%frame=single,
frameround=tttt,
commentstyle=\itshape\color{LightLime},
morecomment=[s][\color{gray}]{<!--}{-->},
keywordstyle=\bfseries\color{DarkPurple},
basicstyle=\footnotesize\ttfamily,
stringstyle=\color{Blue},
showstringspaces=false,
}

\lstdefinestyle{Java}
{
	language=Java,
%	numbers=left,
%	firstnumber=1,
%	stepnumber=5,
%	numberfirstline,
%numberstyle=\tiny\sffamily,
%tabsize=5,
captionpos=b,
aboveskip=1em,
belowskip=1em,
columns=flexible,
xleftmargin=2em,
xrightmargin=1em,
%frame=single,
frameround=tttt,
commentstyle=\itshape\color{LightLime},
keywordstyle=\bfseries\color{DarkPurple},
basicstyle=\footnotesize\ttfamily,
stringstyle=\color{Blue},
showstringspaces=false,
}

\lstdefinestyle{InlineJava}
{
language=Java,
columns=flexible,
basicstyle=\bfseries\footnotesize\ttfamily\color{DarkCyan},
showstringspaces=false,
}

