% Name :: AGH Beamer Theme based on the CambridgeUS theme (Madhusudan Singh)
% Author :: Stanisław Polak (polak[aT]icsr[DoT]agh[DoT]edu[DoT]pl)
% Created :: 2017-04-03
% Version :: 1.3.2
% Email :: polak[aT]icsr[DoT]agh[DoT]edu[DoT]pl
% Website :: http://www.icsr.agh.edu.pl/~polak/
% Youtube :: https://www.youtube.com/user/spolak69
% Github :: https://github.com/polaksta
% License :: This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% Description :: This presentation is a demonstration of the AGH beamer
% theme, which is based on the standard beamer theme 'CambridgeUS' created by Madhusudan Singh
%
%
% Theme :: dark
% Options :: dark=darknesslevel
% :: parttitle=leftfooter
% :: parttitle=rightfooter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[english]{beamer} %If you want to create Polish presentation, replace 'english' with 'polish'
\usepackage[utf8]{inputenc}
%\usepackage{polski} %For Polish language only
\usepackage{babel}
\usepackage{listings} %We want to put listings
\usetheme[parttitle=rightfooter]{AGH} %Show part title in right footer
\AtBeginPart{\frame{\partpage}} %At begin part: display its name
\title{AGH Beamer Theme}
\author{Stanisław Polak}
\date{}
\institute{AGH University of Science and Technology}
%%%%%%%%%%% Configuration of the listings package %%%%%%%%%%%%%%%%%%%%%%%%%%
% Source: https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings#Using_the_listings_package
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\lstset{ %
backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument
basicstyle=\footnotesize, % the size of the fonts that are used for the code
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
breaklines=true, % sets automatic line breaking
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{mygreen}, % comment style
deletekeywords={...}, % if you want to delete keywords from the given language
escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
frame=single, % adds a frame around the code
keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
keywordstyle=\color{blue}, % keyword style
morekeywords={*,...}, % if you want to add more keywords to the set
numbers=left, % where to put the line-numbers; possible values are (none, left, right)
numbersep=5pt, % how far the line-numbers are from the code
numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false, % underline spaces within strings only
showtabs=false, % show tabs within strings adding particular underscores
stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color{cyan}, % string literal style
tabsize=2, % sets default tabsize to 2 spaces
title=\lstname, % show the filename of files included with \lstinputlisting; also try caption instead of title
% needed if you want to use UTF-8 Polish chars
literate={ą}{{\k{a}}}1
{Ą}{{\k{A}}}1
{ę}{{\k{e}}}1
{Ę}{{\k{E}}}1
{ó}{{\'o}}1
{Ó}{{\'O}}1
{ś}{{\'s}}1
{Ś}{{\'S}}1
{ł}{{\l{}}}1
{Ł}{{\L{}}}1
{ż}{{\.z}}1
{Ż}{{\.Z}}1
{ź}{{\'z}}1
{Ź}{{\'Z}}1
{ć}{{\'c}}1
{Ć}{{\'C}}1
{ń}{{\'n}}1
{Ń}{{\'N}}1
}
%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle
\part{Examples}
%%%%%%%%%%%%%%%%
\begin{frame}{Outline}
\tableofcontents
\end{frame}
%%%%%%%%%%%%%%%%
\section{Mathematics}
%%%%%%%%%%%%%%%%
\begin{frame}{Basic blocks}
% Examples from The beamer class User Guide
\begin{block}{Definition}
A \alert{set} consists of elements.
\end{block}
\begin{exampleblock}{Example}
The set $\{1,2,3,5\}$ has four elements.
\end{exampleblock}
\begin{alertblock}{Wrong Theorem}
$1=2$.
\end{alertblock}
\end{frame}
%%%%%%%%%%%%%%%%
\begin{frame}{Math environments}
\begin{columns}
\column{0.5\textwidth}
\structure{Theorems}
\begin{theorem}[Pythagorean]
$a^{2}+b^{2}=c^{2}$
\end{theorem}
\ldots
\column{0.5\textwidth}
\structure{Proofs}
\begin{proof}
\ldots
\end{proof}
\ldots
\end{columns}
\end{frame}
%%%%%%%%%%%%%%%%
\section{Computer Science}
\begin{frame}[fragile]{Source code}{Appearing step by step}
\begin{lstlisting}[language=C++,escapechar=\%]
#include <iostream> %\pause%
using namespace std; %\pause%
void main()
{ %\pause%
cout %\pause% << "Hello World!" %\pause% << endl;%\onslide<3->%
}%\onslide%
\end{lstlisting}
\end{frame}
\end{document}