% ------------------------------------------------------------------------
% ------------------------------------------------------------------------
% Modelo de TCC do curso de Engenharia de Controle e Automação - UFSC/Campus Blumenau
% Autor: Ciro André Pitz
% Revisão: Brenda Teresa Porto de Matos
% O presente modelo foi obtido a partir do modelo desenvolvido por Alisson Lopes Furlani disponível na BU/UFSC.
% ------------------------------------------------------------------------
% ------------------------------------------------------------------------
% Adaptado por Lucas Duarte para a UFU
\documentclass[
12pt,				% tamanho da fonte
%openright,			% capítulos começam em pág ímpar (insere página vazia caso preciso)
oneside,			% para impressão no anverso. Oposto a twoside
a4paper,			% tamanho do papel. 
chapter=TITLE,		% títulos de capítulos convertidos em letras maiúsculas
section=TITLE,		% títulos de seções convertidos em letras maiúsculas
%subsection=TITLE,	% títulos de subseções convertidos em letras maiúsculas
%subsubsection=TITLE,% títulos de subsubseções convertidos em letras maiúsculas
% -- opções do pacote babel --
english,			% idioma adicional para hifenização
english				% o último idioma é o principal do documento
]{abntex2}
\usepackage{configs/eca_ufsc_bnu} % personalização da ABNTEX2
% Novas bibliotecas q usei
%\usepackage{multicol} % Multi coluna, pra escrever agradecimentos
\usepackage{multirow} % Multi row para fazer tabelas iradas
\usepackage{subcaption} % Colocar varias subfiguras
\usepackage{xcolor} % Texto em cores diferentes (para fazer comentarios durante o desenvolvimento da tese)
\usepackage{hyperref} % Colocar links
\usepackage{graphicx}
\usepackage{accents}
\usepackage[labelformat=simple]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
\usepackage{nicematrix}
\usepackage{bm} % Negrito
\newcommand{\switchcolumn}{\@empty} % Initialize this command to avoid error
\usepackage{paracol} % Two columns with different languages
\usepackage{float}
\usepackage{cancel}
\setlength{\columnsep}{1cm}
\addbibresource{pos_textual/referencias.bib} % Seus arquivos de referências
% Desativar warnings
%\usepackage{silence}
%\WarningsOff[biblatex]
%---------------------------------------------------------------------------------------------
%--------- DADOS BÁSICOS DO TCC (Preencher todos) -------------------------------------
%---------------------------------------------------------------------------------------------
%Substituir 'Nome completo do autor' pelo seu nome.
\autor{Name Surname}
% FIXME Substituir 'Título do trabalho' pelo título da trabalho.
\titulo{Your Thesis Title}
% Substituir 'Subtítulo (se houver)' pelo subtítulo da trabalho. 
% Se não houver subtítulo, basta deletar o texto.
\subtitulo{}
% Substituir 'Orientador' pelo nome do seu orientador.
\orientador{Prof. Dr. Orientador}
% Se for orientado por uma mulher, comente a linha acima e descomente a linha a seguir.
% \orientador[Orientadora]{Orientadora, Dra.}
% Substituir 'XXXXXX' pelo nome do seu  coorientador. Caso não tenha coorientador, comente a linha a seguir.
%\coorientador{Prof. Coorientador, Dr.}
% Se for coorientado por uma mulher, comente a linha acima e descomente a linha a seguir.
% \coorientador[Coorientadora]{Coorientadora, Dra.}
\dia{10}
\mes{August}
\ano{2022}
\local{Uberlândia}
\bancaa{Prof. 1} %Primeiro membro da banca (normalmente o orientador).
\bancab{Dr. 2} %Segundo membro da banca
\bancac{Prof. Dr. 3} %Terceiro membro da banca
%Resumo e palavras-chave do trabalho
\resumotcc
{
This thesis is amazing and it talks about amazing stuff
}
\palavraschave{Template; UFU; ABNT.}
%Agradecimentos
\input{pre_textual/Acknowledgements}
\agradecimentostcc{\Acknowledgementstext}
%Epígrafe (opcional). Caso não queira inserir, deixe em branco (\epigrafetcc{} )
\epigrafetcc{}
%Decatória (opcional). Caso não queira inserir, deixe em branco (\dedicatoriatcc{} )
\dedicatoriatcc{}
%Lista de quadros
%Além de figuras e tabelas, o TCC contém quadros? Caso afirmativo digite sim ou deixe em branco para não (\contemquadros{}).
\contemquadros{}
%Lista de siglas (opcional).
%Deseja incluir lista de abreviaturas e siglas? Caso afirmativo digite sim ou deixe em branco para não (\contemsiglas{}).
\contemsiglas{sim}
%Lista de símbolos (opcional).
%Deseja incluir lista de símbolos? Caso afirmativo digite sim ou deixe em branco para não (\contemsimbolos{}).
\contemsimbolos{}
%-------------------------FIM DOS DADOS BÁSICOS DO TCC--------------------------------------------
% ajusta espaçamento das listas itemize e enumerate
\setitemize{topsep=0pt,itemsep=0pt,leftmargin=\parindent+\labelwidth-\labelsep}
\setenumerate{topsep=0pt,itemsep=0pt,leftmargin=\parindent+\labelwidth-\labelsep}
% define a macro \Autoref to allow multiple references to be passed to \autoref
\makeatletter
\newcommand\Autoref[1]{\@first@ref#1,@}
\def\@throw@dot#1.#2@{#1}% discard everything after the dot
\def\@set@refname#1{%    % set \@refname to autoefname+s using \getrefbykeydefault
	\edef\@tmp{\getrefbykeydefault{#1}{anchor}{}}%
	\xdef\@tmp{\expandafter\@throw@dot\@tmp.@}%
	\ltx@IfUndefined{\@tmp autorefnameplural}%
	{\def\@refname{\@nameuse{\@tmp autorefname}s}}%
	{\def\@refname{\@nameuse{\@tmp autorefnameplural}}}%
}
\def\@first@ref#1,#2{%
	\ifx#2@\autoref{#1}\let\@nextref\@gobble% only one ref, revert to normal \autoref
	\else%
	\@set@refname{#1}%  set \@refname to autoref name
	\@refname~\ref{#1}% add autoefname and first reference
	\let\@nextref\@next@ref% push processing to \@next@ref
	\fi%
	\@nextref#2%
}
\def\@next@ref#1,#2{%
	\ifx#2@ e~\ref{#1}\let\@nextref\@gobble% at end: print e+\ref and stop
	\else, \ref{#1}% print  ,+\ref and continue
	\fi%
	\@nextref#2%
}
\makeatother
% Cria comando para referenciar Anexo automaticamente \refanexo
\newcommand{\refanexo}[1]{\hyperref[#1]{Anexo~\ref{#1}}}
% Define comandos para tabelas que permite ajustar o tamanho da coluna e manter alinhamento C, R ou L
%\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
\newcolumntype{C}[1]{>{\centering\let\arraybackslash}m{#1}}
\newcolumntype{R}[1]{>{\RaggedLeft\let\arraybackslash}m{#1}}
\newcolumntype{L}[1]{>{\RaggedRight\let\arraybackslash}m{#1}}
% ---
% Filtering and Mapping Bibliographies
% ---
\DeclareSourcemap{
	\maps[datatype=bibtex]{
		% remove fields that are always useless
		\map{
			\step[fieldset=abstract, null]
			\step[fieldset=pagetotal, null]
			\step[fieldset=doi, null]
		}
		% remove URLs for types that are primarily printed
		\map{
			\pernottype{software}
			\pernottype{online}
			\pernottype{report}
			\pernottype{techreport}
			\pernottype{standard}
			\pernottype{manual}
			\pernottype{misc}
			\step[fieldset=url, null]
			\step[fieldset=urldate, null]
		}
		\map{
			\pertype{inproceedings}
			% remove mostly redundant conference information
			%\step[fieldset=venue, null]
			%\step[fieldset=eventdate, null]
			%\step[fieldset=eventtitle, null]
			% do not show ISBN for proceedings
			\step[fieldset=isbn, null]
			% Citavi bug
			%\step[fieldset=volume, null]
		}
	}
}
% ---
\preambulo
{%
	Final thesis for the graduation course of Aeronautical Engineering of the Universidade Federal de Uberlândia for the degree of Bachelor in Aeronautical Engineering.
}
% ---
% ---
% Configurações de aparência do PDF final
% ---
% alterando o aspecto da cor azul
\definecolor{blue}{RGB}{41,5,195}
% informações do PDF
\makeatletter
\hypersetup{
	%pagebackref=true,
	pdftitle={\@title}, 
	pdfauthor={\@author},
	pdfsubject={\imprimirpreambulo},
	pdfcreator={LaTeX with abnTeX2},
	pdfkeywords={ufsc, latex, abntex2}, 
	colorlinks=true,       		% false: boxed links; true: colored links
	linkcolor=black,%blue,          	% color of internal links
	citecolor=black,%blue,        		% color of links to bibliography
	filecolor=black,%magenta,      		% color of file links
	urlcolor=blue,
	bookmarksdepth=4
}
\makeatother
% ---
% Definição das siglas e símbolos
\input{lista_siglas_simbolos/siglas_simbolos}
% compila a lista de abreviaturas e siglas e a lista de símbolos
\makenoidxglossaries 
 
% compila o indice
\makeindex
% ------------------------------------------------------------------------------------------------
% --------------------------INÍCIO DO DOCUMENTO---------------------------------------------
% ------------------------------------------------------------------------------------------------
\begin{document}
	% Seleciona o idioma do documento (conforme pacotes do babel)
	\selectlanguage{english}
	%\selectlanguage{brazil}
	% Retira espaço extra obsoleto entre as frases.
	\frenchspacing 
	
	% Espaçamento 1.5 entre linhas
	\OnehalfSpacing
	
	% Corrige justificação
	%\sloppy
	
	%Elementos pré-textuais
	% \pretextual %a macro \pretextual é acionado automaticamente no início de \begin{document}
	% Capa, folha de rosto, ficha bibliografica, errata, folha de aprovação
	% Dedicatória, agradecimentos, epígrafe (opcional), resumos, listas
	\input{pre_textual/pretextual}
	% Elementos textuais
	\textual
        % 0 - Notation Chapter
        \include{pre_textual/Notation.tex}
 
	% 1 - Introdução
	\include{capitulos/cap_1}
	
	% 2 - Control Strategy
	\include{capitulos/cap_2}
	
	% 3 - Simulation Results
	\include{capitulos/cap_3}
	
	% 4 - Conclusão
	\include{capitulos/cap_5}
	
	
	% Elementos pós-textuais
	\postextual
	
	
	% Referências bibliográficas
	\begingroup
	    \printbibliography[title=REFERENCES]
	\endgroup
	
	
	
	%Reconfiguração do título para apêndices e anexos
	 \renewcommand{\ABNTEXchapterupperifneeded}[1]{#1} 
	\makeatletter
	\settocpreprocessor{chapter}{%
      \let\tempf@rtoc\f@rtoc%
      \def\f@rtoc{%
      \texorpdfstring{{\tempf@rtoc}}{\tempf@rtoc}}%
      }
    \makeatother
	
	
	% Apêndices
    \begin{apendicesenv}
    	%\partapendices* 
    	\input{pos_textual/apendice_a}
            \input{pos_textual/apendice_b}
            \input{pos_textual/apendice_c}
    \end{apendicesenv}
 
 \begin{comment}
    % Anexos
    \begin{anexosenv}
    	%\partanexos*
    	\input{pos_textual/anexo_a}
    \end{anexosenv}
 \end{comment}
\end{document}