%-----------------------------------------------------------------------

\usepackage[T1]{fontenc}

\usepackage[math]{iwona}
% \usepackage[math]{kurier}

% \usepackage[sfdefault]{roboto}
\usepackage[sfdefault, condensed]{roboto}
% \usepackage[default]{sourcesanspro}

% \usefonttheme[onlymath]{serif}
% \usefonttheme[onlymath]{sans}

\usepackage{csquotes}

% % Font for code. ----------------------------
% \usepackage{inconsolata}
\usepackage[scaled=0.8]{beramono}

%-----------------------------------------------------------------------

% \usepackage{lmodern}
\usepackage{amssymb, amsmath}
\setcounter{MaxMatrixCols}{20} % bmatrix, max number of columns.

% \usepackage{ifxetex, ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\usepackage[utf8]{inputenc}
\usepackage[shorthands=off,main=brazil]{babel}
\usepackage{graphicx}

\usepackage{xcolor}
\usepackage{setspace}
\usepackage{xspace}
\usepackage{tabularx}

\setlength{\belowcaptionskip}{-0.5em}
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}

%-----------------------------------------------------------------------
% Definições de esquema de cores.

% Ubuntu.
% http://www.color-hex.com/color-palette/2018
\definecolor{ubuntu_purple}{HTML}{2CA05A} % Título.
\definecolor{ubuntu_orange}{HTML}{686868} % Estrutura.
\definecolor{gray_dark}{HTML}{333333}  % Texto.
\definecolor{gray_light}{HTML}{DDDDDD} % Faixa.

%-----------------------------------------------------------------------
% Bibliography.

% \usepackage[style=authoryear]{biblatex}
% Use:
%   \cite{<ref>}
%   \parencite{<ref>}
%   \fullcite{<ref>}
%   \footfullcite{<ref>}
% ATTENTION: Compilation = pdflatex > biber > pdflatex > pdflatex.
% Call refs.bib at preamble with: \addbibresource{refs.bib}
%
%-----------------------------------------------------------------------

\usepackage{caption}
\captionsetup{
  font=footnotesize,
  labelfont={color=ubuntu_orange},
  labelsep=period}
\usepackage{subfig}

\makeatletter
\let\@@magyar@captionfix\relax
\makeatother

\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

%-----------------------------------------------------------------------

\usepackage{tikz}

\usebackgroundtemplate{
  \tikz[overlay, remember picture]
  \node[at = (current page.center),
        inner sep = 0pt] {%
          \includegraphics[keepaspectratio, height=\paperheight]{config/ufpr-fachada-baixo-1.jpg}
        };
}

%-----------------------------------------------------------------------

\hypersetup{
  colorlinks=true,
  linkcolor=ubuntu_orange,
  urlcolor=ubuntu_purple,
  citecolor=ubuntu_purple
}

%-----------------------------------------------------------------------
% ATTENTION: http://www.cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf

\usetheme{default}

\setbeamerfont{title}{series=\bfseries, size=\huge, parent=structure}
\setbeamerfont{subtitle}{series=\bfseries, size=\Large, parent=structure}
\setbeamerfont{frametitle}{series=\bfseries, size=\LARGE, parent=structure}

\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}{: }
\setbeamertemplate{caption}[numbered]{}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
\setbeamertemplate{sections/subsections in toc}[ball]{}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{}
\setbeamertemplate{frametitle continuation}{\gdef\beamer@frametitle{}\vspace*{1ex}}

\setbeamertemplate{enumerate items}[default]
\setbeamertemplate{itemize items}{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths$\blacktriangleright$}}

% Rodapé.
\setbeamercolor{title in head/foot}{parent=subsection in head/foot}
\setbeamercolor{author in head/foot}{bg=ubuntu_orange, fg=white}
\setbeamercolor{date in head/foot}{parent=subsection in head/foot, fg=ubuntu_orange}

% Cabeçalho.
\setbeamercolor{section in head/foot}{bg=ubuntu_purple, fg=ubuntu_orange}
\setbeamercolor{subsection in head/foot}{bg=ubuntu_purple, fg=white}

\setbeamercolor{title}{fg=ubuntu_purple}       % Título dos slides.
\setbeamercolor{subtitle}{fg=ubuntu_orange}    % Subtítulo.
\setbeamercolor{institute}{fg=gray_dark}       % Instituição.
\setbeamercolor{frametitle}{fg=ubuntu_purple}  % De quadro.
\setbeamercolor{structure}{fg=ubuntu_orange}   % Listas e rodapé.
\setbeamercolor{item projected}{bg=gray_dark}
\setbeamercolor{normal text}{fg=gray_dark}     % Texto.

%-----------------------------------------------------------------------
% To remove empty brackets of \institution.

\makeatletter
\setbeamertemplate{footline}{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[
      wd=0.3\paperwidth, ht=2.25ex, dp=1ex, right]{author in head/foot}%
      \usebeamerfont{author in head/foot}\insertshortauthor{}\hspace*{1ex}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[
      wd=0.6\paperwidth, ht=2.25ex, dp=1ex, left]{title in head/foot}%
      \usebeamerfont{title in head/foot}\hspace*{1ex}\bfseries\insertshorttitle{}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[
      wd=0.1\paperwidth, ht=2.25ex, dp=1ex, right]{date in head/foot}%
      \bfseries\insertframenumber{}\hspace*{2ex}
    \end{beamercolorbox}
  }%
  \vskip0pt%
}
\makeatother

%-----------------------------------------------------------------------
