% Instituto Nacional de Pesquisas Espaciais - INPE
% https://github.com/cfbastarz/EstiloBeamerINPE
% V1.2
% carlos.bastarz@inpe.br (15/04/2021)
\documentclass[10pt]{beamer}
% Tema padrão (base)
\usetheme{default}
% Carregamento dos pacotes utilizados
\usepackage[brazilian]{babel} % comentar este pacote se a apresentação for em inglês
\usepackage{times}
%\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[alf]{abntex2cite}
\usepackage{bibentry}
% Definiçãoo do estilo das fontes
\usefonttheme{professionalfonts} % using non standard fonts for beamer
\usefonttheme{serif} % default family is serif
\usepackage{fontspec}
\setmainfont{Liberation Sans}
% Imagem de fundo dos frames
\usebackgroundtemplate%
{%
	\includegraphics[width=\paperwidth,height=\paperheight]{fundo_slide_inpe_2.png}%
}
% Selo de 60 anos do INPE (comentar a linha abaixo caso não queira utilizar)
\titlegraphic{\includegraphics[scale=0.15]{60Anosfinal.png}\vspace*{-50pt}}
% Remove a barra de navegação dos frames
\beamertemplatenavigationsymbolsempty
% Rodapé dos frames
\makeatother
\setbeamertemplate{footline}
{
	\leavevmode%
	\hbox{%
	\begin{beamercolorbox}[wd=.35\paperwidth,ht=2.25ex,dp=1ex,left]{author in head/foot}%
		\hspace*{10ex}\usebeamerfont{author in head/foot}\insertshortauthor
	\end{beamercolorbox}%
	\begin{beamercolorbox}[wd=.65\paperwidth,ht=2.25ex,dp=1ex,right]{title in head/foot}%
		\usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
		\insertframenumber{} / \inserttotalframenumber\hspace*{3ex}
	\end{beamercolorbox}}%
	\vskip4pt%
}
\makeatletter
% Insere o TOC com números (seções e subseções)
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
% Definição das cores do tema
\definecolor{azulinpe}{RGB}{0, 110, 175}
\definecolor{laranjainpe}{RGB}{248, 133, 31}
\setbeamercolor{title}{fg=azulinpe}
\setbeamercolor{frametitle}{fg=azulinpe, bg=laranjainpe}
\setbeamercolor{palette primary}{fg=azulinpe}
\setbeamercolor{palette secondary}{fg=azulinpe}
\setbeamercolor{palette tertiary}{fg=azulinpe}
\setbeamercolor{palette quaternary}{fg=azulinpe}
\setbeamercolor{structure}{fg=azulinpe} % itemize, enumerate, etc
\setbeamercolor{section in toc}{fg=azulinpe} % TOC sections
% Títulos dos frames
\makeatletter
\defbeamertemplate*{frametitle}{mydefault}[1][left]
{
  \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
  \@tempdima=\textwidth%
  \advance\@tempdima by\beamer@leftmargin%
  \advance\@tempdima by\beamer@rightmargin%
  \hspace{0.8cm}
  %\includegraphics[scale=0.75]{barra_secao.png}
  \hspace{-0.5cm}
  \pgfsetfillopacity{0}
  \begin{beamercolorbox}[sep=0.3cm,#1,wd=0.64\textwidth]{frametitle}
    \usebeamerfont{frametitle}%
    \vbox{}\vskip-1ex%
    \if@tempswa\else\csname beamer@fte#1\endcsname\fi%
    \strut\pgfsetfillopacity{1}\insertframetitle\strut\par%
    {%
      {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%
    }%
    \vskip-1ex%
    \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
  \end{beamercolorbox}%
}
\makeatother
% Blocos customizados
\newenvironment<>{problock1}[1]{%
  \begin{actionenv}#2%
      \def\insertblocktitle{#1}%
      \par%
      \mode<presentation>{%
        \setbeamercolor{block title}{fg=laranjainpe, bg=azulinpe}
       \setbeamercolor{block body}{fg=azulinpe, bg=white}
       \setbeamercolor{itemize item}{fg=laranjainpe}
       \setbeamertemplate{itemize item}[triangle]
     }%
      \usebeamertemplate{block begin}}
    {\par\usebeamertemplate{block end}\end{actionenv}}
\newenvironment<>{problock2}[1]{%
  \begin{actionenv}#2%
      \def\insertblocktitle{#1}%
      \par%
      \mode<presentation>{%
        \setbeamercolor{block title}{fg=azulinpe, bg=laranjainpe}
       \setbeamercolor{block body}{fg=laranjainpe, bg=white}
       \setbeamercolor{itemize item}{fg=azulinpe}
       \setbeamertemplate{itemize item}[triangle]
     }%
      \usebeamertemplate{block begin}}
    {\par\usebeamertemplate{block end}\end{actionenv}}
% Informações da capa da apresentação
\title{Exemplo de Apresentação para o INPE utilizando o pacote Beamer do \LaTeX}
\author{Nome do(a) Apresentador(a)}
\institute{Instituto Nacional de Pesquisas Espaciais}
\date{
	\today 
}
% A partir daqui inicia-se o documento
\begin{document}
% Capa (NÃO MODIFICAR)
{
\setbeamertemplate{footline}{} 
\begin{frame}
	\vspace{1cm}
	\titlepage
\end{frame}
}
 
% Reinicia do contador dos frames 
\addtocounter{framenumber}{-1}
 
% Sumário
\begin{frame}{Sumário}
	\tableofcontents
\end{frame}
\section{Apresentação}
\begin{frame}
\frametitle{Apresentação}
\framesubtitle{Por que este exemplo?}
\begin{itemize}
	\item Neste arquivo, você encontrará exemplos para a maioria das suas necessidades com o Beamer;
	\pause
	\item Verifique os slides a seguir e depois olhe o arquivo {\tt estilo\_inpe\_beamer.tex} para ver como o \textit{frame} com a estrutura que você precisa foi montado.
	\pause
	\item Os exemplos são mostrados para blocos de textos, imagens, tabelas, equações e referencias bibliográficas.
\end{itemize}
\end{frame}
\section{Inserção de Texto}
\subsection{Texto Comum}
\begin{frame}
\frametitle{Inserção de Texto}
\framesubtitle{Texto Comum}
\begin{itemize}
	\item Neste \textit{frame}, o texto está inserido diretamente, sem a utilização de blocos.
	\pause
	\item Após a utilização do comando {\tt pause}, pode-se adicionar mais conteúdo em um segundo \textit{frame}, mas utilizando a mesma estrutura do \textit{frame} atual.
\end{itemize}
\end{frame}
\subsection{Texto em Blocos Comuns}
\begin{frame}
\frametitle{Inserção de Texto}
\framesubtitle{Texto em Blocos Comuns}
Esta frase está escrita fora de um bloco, diretamente no \textit{frame}.
\begin{block}{Frase em um bloco}
	Esta frase está escrita dentro de um bloco comum. Compara o seu efeito com a frase escrita fora do bloco.
\end{block}
\end{frame}
\subsection{Texto em Blocos Especiais}
\begin{frame}
\frametitle{Inserção de Texto}
\framesubtitle{Texto em Blocos Especiais}
Blocos podem ser utilizados para destacar o que está sendo apresentado.
\begin{block}{Um bloco comum}
	Esta frase está escrita dentro de um bloco comum.
\end{block}
\pause
\begin{exampleblock}{Um bloco de exemplo}
	Este é um bloco de exemplo: $ax^2 + bx + c = 0$, representa a forma geral de uma equação do segundo grau.
\end{exampleblock}
\pause
\begin{alertblock}{Um bloco de alerta}
	Este é um bloco de alerta.
\end{alertblock}
\end{frame}
\subsection{Texto em Blocos Customizados}
\begin{frame}
\frametitle{Inserção de Texto}
\framesubtitle{Texto em Blocos Customizados}
Para este estilo, foram customizados dois blocos:
\begin{problock1}{Bloco {\tt problock1}:}
Este é o {\tt problock1}. Ele possui moldura colorida, fonte azul e fundo branco.
\end{problock1}
\pause
\begin{problock2}{Bloco {\tt problock2}:}
Este é o {\tt problock2}. Ele possui moldura colorida, fonte laranja e fundo branco.
\end{problock2}
\pause
É possível adicionar novos blocos com cores personalizadas.
\end{frame}
\section{Inserção de Figuras e Tabelas}
\subsection{Figura simples}
\begin{frame}
\frametitle{Uma figura}
\framesubtitle{Figura e texto}
Neste \textit{frame}, é mostrado um exemplo de texto e figura.
\pause
\begin{figure}
	\centering
	\includegraphics[width=0.45\textwidth]{example-image-a}
	\caption{Uma figura exemplo.}
\end{figure}
\end{frame}
\subsection{Figuras lado a lado}
\begin{frame}
\frametitle{Painel de figura}
\framesubtitle{Figura e texto}
Neste \textit{frame}, é mostrado um exemplo de texto e um painel de figuras.
\pause
\begin{figure}[H]
    \begin{center}
        \subfigure[Figura ``A'']{\includegraphics[width=0.25\textwidth]{example-image}}
        \subfigure[Figura ``B'']{\includegraphics[width=0.25\textwidth]{example-image}}
        \subfigure[Figura ``C'']{\includegraphics[width=0.25\textwidth]{example-image}}
        \subfigure[Figura ``D'']{\includegraphics[width=0.25\textwidth]{example-image}}
        \subfigure[Figura ``E'']{\includegraphics[width=0.25\textwidth]{example-image}}
        \subfigure[Figura ``F'']{\includegraphics[width=0.25\textwidth]{example-image}}
        \caption{Um painel de figuras lado a lado.}
    \end{center}
\end{figure}
\end{frame}
\subsection{Tabelas Simples}
\begin{frame}
\frametitle{Inserção e Tabelas}
\framesubtitle{Tabela com Largura Fixa}
\begin{table}
\caption{Uma tabela com o ambiente {\tt tabularx} e o pacote {\tt booktabs}.}	
\begin{tabularx}{\textwidth}{X X X}
\toprule
\textbf{COLUNA 1} & \textbf{COLUNA 2} & \textbf{COLUNA 3} \\
\midrule
L1C1 L1C1 L1C1 L1C1 & L1C2 L1C2 L1C2 L1C2 L1C2 L1C2 & L1C3      \\
L2C1 L2C1 L2C1 L2C1 & L2C2 L2C2 L2C2 L2C2 L2C2 L2C2 & L2C3 L2C3 \\
\bottomrule
\end{tabularx}
\end{table}
\end{frame}
\section{Inserção de Equações}
\begin{frame}
\frametitle{Inserção de Equações}
\framesubtitle{Equações alinhadas}
\begin{block}{Um bloco de equações com o ambiente {\tt align}:}
\begin{align*}
x & = 1 + 2y + 3z \\
3x - y + 2z & = 0 \\
2x + y & = 2 - z
\end{align*}
\end{block}
\pause
\begin{problock1}{Um bloco de equações com o ambiente {\tt align}:}
\begin{align}
x & = 1 + 2y + 3z \\
3x - y + 2z & = 0 \\
2x + y & = 2 - z
\end{align}
\end{problock1}
\end{frame}
\section{Inserção de Referências Bibliográficas}
\begin{frame}
\frametitle{Referências Bibliográficas}
\framesubtitle{Como Citar}
\begin{itemize}
	\item Segundo \citeonline{ciclanoetal/1975,fulano/1964}, a ciência é comunicada e registrada através de artigos, relatórios, apresentações etc. 
	\item A ciência é comunicada e registrada através de artigos, relatórios, apresentações etc \cite{ciclanoetal/1975,fulano/1964}.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Referências Bibliográficas}
\bibliography{referencias}
\end{frame}
% Frame Final (NÃO MODIFICAR)
\usebackgroundtemplate%
{%
	\includegraphics[width=\paperwidth,height=\paperheight]{fundo_slide_inpe_final_2.png}%
}
\begingroup
\setbeamertemplate{footline}{}
\begin{frame}
\end{frame}
\endgroup
\end{document}