\PassOptionsToPackage{table}{xcolor}
\documentclass[a4paper,12pt,twoside, openright,chapterprefix=true,numbers=noenddot]{report}%tocpage=plain
\usepackage[inner=30mm,outer=30mm,top=35mm,bottom=25mm,headsep={12mm}]{geometry}
\usepackage[T1]{fontenc} % Selecao de codigos de fonte.
\usepackage[utf8]{inputenc} % Codificacao do documento (conversão automática dos acentos)
\usepackage{ae}
\usepackage[pdftex]{graphicx}
\usepackage{pdfpages}
\usepackage{float}
\usepackage[brazilian]{babel} % deixar em português. Alterar caso texto seja em outra língua
\usepackage{setspace} %para utilizar o \setstretch
\usepackage{color}
\usepackage{fancyvrb}
\usepackage{notoccite} % ignora citações nas legendas pra ordenar as referências
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{hyperref} %%comando para inserir lynks nas referencias cruzadas
\hypersetup{colorlinks=false,pdfborder={0 0 0}}%%comando para esconder os lynks
\usepackage[normalem]{ulem}
%\usepackage{enumitem} %para criar listas (itemize) (1. 1.1 1.2 2. 2.1 2.2 2.3) etc com numeros...
\graphicspath{{figuras/}} %%%define o caminho dos arquivos das figuras
\newcommand{\eg}{{\em e.g., }} % e.g.
\newcommand{\ie}{{\em i.e., }} % i.e.
\setlength{\bibsep}{1.5pt}
\usepackage[center,small]{caption} %%deixa as letras das legendas de tabelas e figuras menores e centralizadas
\usepackage{acronym}%% garante que todos os acronimos sejam escritos por completo pelo menos uma vez, também proporciona ambiente para criação de lista de siglas
\renewcommand{\baselinestretch}{1.5} %espaçamento 1.5
\renewcommand{\abstract}{} %não escreve a palavra resumo
\usepackage{subfigure}
\renewcommand{\bibpreamble}{\vskip2pt} % espaçamento entre titulo da bibliografia e as referencias
\usepackage{upgreek}
\usepackage{color}
\usepackage{fancyvrb}
\usepackage{MnSymbol}
\usepackage{bm}
\usepackage{verbatim}
% comandos para traduzir os termos em ingles (se quiser em inglês é só "comentar")
\renewcommand\figurename{Figura}
\renewcommand\tablename{Tabela}
\renewcommand\contentsname{{\LARGE SUMÁRIO}}
% altera espaçamentos no início dos cabeçalhos
\usepackage{titlesec}
\titleformat{\chapter}[hang]{\bf}{\thechapter}{0.8pc}{} % não coloca a palavra capítulo
\titleformat{\section}[hang]{\bf}{\thesection}{0.8pc}{}
\titleformat{\subsection}[hang]{\bf}{\thesubsection}{0.8pc}{}
\titleformat{\subsubsection}[hang]{\sl}{\thesubsubsection}{0.8pc}{}
% acerta as margens
% \titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}
% <left> increases the left margin.
% <before-sep> is the vertical space before the title.
% <after-sep> is the separation between title and non-sectioning text.
\titlespacing{\chapter}{0pt}{0pt}{2pt}
\titlespacing{\section}{0pt}{3pt}{2pt}
\titlespacing{\subsection}{0pt}{3pt}{2pt}
\titlespacing{\subsubsection}{0pt}{3pt}{2pt}
% Sequência para não quebrar página antes do início do capítulo
\makeatletter %
\renewcommand\chapter{\par %
\thispagestyle{plain}% %
\global\@topnum\z@ %
\@afterindentfalse %
\secdef\@chapter\@schapter} %
\makeatother
\usepackage{ulem}
% comandos para correções
\newcommand{\add}[1]{{\textcolor{blue} {\bf #1} }}
\newcommand{\rem}[1]{{\textcolor{red} {\sout{ #1}} }}
\newcommand{\com}[1]{{\textcolor{magenta} {{ #1}} }}
\newcommand{\warn}[1]{\textcolor{red}{#1}} %novo comando \warn
% definição para escrever vetores e matrizes
\newcommand{\T}[1]{{\bf{#1}}}
\newcommand{\TT}[1]{{\mathcal{#1}}}
% acertar cabeçalho e paginação
\usepackage{fancyhdr}% cabecalho personalizado
\fancyhf{} limpa o cabecalho superior (head} e inferior (foot}
\fancypagestyle{plain}{%% redefine o plain (usado na primeira pagina do captulo).
\renewcommand{\headrulewidth}{0pt} % sem linha horizontal
\fancyhead[LE]{\thepage} % colocar enumeracao
}
\fancyhead[LEO]{\thepage} % colocar enumeracao
\renewcommand{\headrulewidth}{0pt}
% colocar letra helvet, relativa a arial
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
% lista de figuras e tabelas centralizadas
\usepackage[subfigure]{tocloft}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\bfseries}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\bfseries}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
% espaçamento no cabeçalho do sumário
\setlength{\cftbeforetoctitleskip}{0pt}
\setlength{\cftaftertoctitleskip}{40pt}
\input{packages}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Template elaborado em Maio de 2019 por Rafael Vargas. %
% Adaptado a partir de outros projetos elaborados %
% em LaTeX pelo grupo do prof. Rodrigo Canto. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{template-PPGCEM}
\pagestyle{fancy}
\begin{document}
%%%%%%%%%%%% Texto inicial, sobre o template %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% Capa %%%%%%%%%%%%%%%%%%%
\input{capa}
%%%%%%%%%%%% Vitae %%%%%%%%%%%%%%%%%%%
\setstretch{1.5} % acerta espaçamento para 1,5pt
\input{vitae}
\setstretch{1.5}
\setcounter{page}{13} % reseta contador de páginas
\thispagestyle{empty}
%%%%%%%%%%%% Folha de aprovação %%%%%%%%%%%%%%%%%%%
%\phantomsection % adiciona seção para aparecer no sumário
\includepdf[pages={1}, offset=0 -10,width=180mm, clip, trim=5mm 0mm 5mm 0mm,pagecommand={} \addcontentsline{toc}{chapter}{\uppercase{Folha de aprovação}}]{ppgcem.pdf}%{folha_aprovacao.pdf}
%%%%%%%%%%%% Agradecimentos %%%%%%%%%%%%%%%%%%%
\thispagestyle{empty}
\setstretch{1.5}
\input{agradecimentos}
\clearpage
\newpage
%%%%%%%%%%%% Resumo %%%%%%%%%%%%%%%%%%%
\setstretch{1.5}
\thispagestyle{empty}
\input{resumo}
%%%%%%%%%%%% Abstract %%%%%%%%%%%%%%%%%%%
\thispagestyle{empty}
\setstretch{1.5}
\input{abstract}
%%%%%%%%%%%% Publicações %%%%%%%%%%%%%%%%%%%
\thispagestyle{empty}
\setstretch{1.5}
\input{publicacoes}
\newpage
\clearpage
%%%%%%%%%%%% Lista de tabelas %%%%%%%%%%%%%%%%%%%
\thispagestyle{empty}
\vspace*{-2.5cm}
\setstretch{1.5}
\phantomsection
\renewcommand{\listtablename}{\normalsize LISTA DE TABELAS}
\listoftables
\clearpage
%%%%%%%%%%%% Lista de Figuras %%%%%%%%%%%%%%%%%%%
\thispagestyle{empty}
\vspace*{-2.5cm}
\setstretch{1.5}
\phantomsection
\renewcommand{\listfigurename}{\normalsize LISTA DE FIGURAS}
\listoffigures
\clearpage
%%%% Lista de siglas e abreviaturas %%%%
\thispagestyle{empty}
\setstretch{1.5}
\clearpage
\phantomsection
\input{siglas_abreviaturas}
\clearpage
%%%%%%%% Lista de simbolos %%%%%%%%%%%%%
\thispagestyle{empty}
\setstretch{1.5}
\phantomsection
\input{simbolos}
\clearpage
\thispagestyle{empty}
\renewcommand{\thepage}{\arabic{page}} % numera em arábico
\setcounter{page}{13} % retorna pra 1 o contador de páginas
%%%%%%%%%%%% Sumário %%%%%%%%%%%%%%%%%%%
\thispagestyle{empty}
\setstretch{1.5}
\tableofcontents
\pagebreak
\pagenumbering{arabic}
%%%%%%%% Introdução %%%%%%%%%%%%%
\setstretch{1.5}
\input{introducao}
\newpage
%%%%%%%% Revisão bibliográfica %%%%%%%%%%%%%
\setstretch{1.5}
\input{revisao}
\clearpage
%%%%%%%% Materiais e métodos %%%%%%%%%%%%%
\newpage
\setstretch{1.5}
\input{materiais_metodos}
%%%%%%%% Resultados %%%%%%%%%%%%%
\newpage
\setstretch{1.5}
\input{resultados}
%%%%%%%% Discussão %%%%%%%%%%%%%
\newpage
\setstretch{1.5}
\input{discussao}
%%%%%%%% Conclusões %%%%%%%%%%%%%
\newpage
\setstretch{1.5}
\input{conclusoes}
%%%%%%%% Estrutura e exemplos %%%%%%%%%%%%%
\newpage
\setstretch{1.5}
\input{estruturas_exemplos}
%%%%%%%% Referências bibliográficas %%%%%%%%%%%%%
\setstretch{1.5}
\clearpage
\renewcommand{\bibname}{\normalsize REFERÊNCIAS BIBLIOGRÁFICAS}
\bibliography{bibliografia.bib}
\bibliographystyle{model3-num-names.bst}
%%%%%%%% Apêndices %%%%%%%%%%%%%
\clearpage
\input{apendices}
%%%%%%%% Anexos %%%%%%%%%%%%%
\input{anexos}
\end{document}