Verified Commit eae480ce authored by Sascha Brauer's avatar Sascha Brauer
Browse files

Beamer

parent 502c96e7
\documentclass{beamer}
%% Use aspectratio=1610 for wide-screen presentations
\usetheme{minimal}
%% The theme has the following options
%%% handout to color-invert decorations
%%% footer for an additional Author -- Title Footmark
%%% lowcontrast to add a slight tint to the background
%%% omitcuklogo to remove the CuK logo from all slides
%%% omitupblogo to remove the UPB logo from the titlepage
%%% german for the german version
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\graphicspath{{figures/}}
\title{Hier ist der Titel \\ In zwei Zeilen} % Title - might be two lines
\author{Autor}
\institute{UPB}
\date{\today}
\begin{document}
\titleframe
\begin{frame}{Test Frame}
\begin{definition}
This is a definition.
\end{definition}
\begin{enumerate}
\item This is enum.
\begin{enumerate}
\item This is enum in enum.
\begin{enumerate}
\item This is enum in enum in enum.
\end{enumerate}
\end{enumerate}
\end{enumerate}
\begin{itemize}
\item This is itemize.
\end{itemize}
% You can split a frame into up to two elements
% The arguments have to sum to slightly less than 1
% to fit onto the frame.
% Elements can be boxed by a colored frame.
% Elements can be nested.
\begin{element}[0.49]
Here is some text
which is
\end{element}
\hfill
\begin{boxedelement}[0.49]
Next to a boxed element
\end{boxedelement}
\begin{boxedelement}
Or also just a single large box
\end{boxedelement}
\end{frame}
\headingframe{Titel Frame fuer Sections} % Titleframe for intermediate sections
\end{document}
\mode<presentation>
\definecolor{upbblue}{RGB}{0,32,91}
\definecolor{altblue}{RGB}{120,123,159}
\definecolor{upbgreen}{RGB}{17,94,103}
\definecolor{bgcol}{RGB}{255,255,255}
\ifhandout
\setbeamercolor{item projected}{bg=bgcol, fg=upbblue}
\setbeamercolor{subitem projected}{bg=bgcol, fg=upbblue}
\setbeamercolor{block title}{bg=bgcol, fg=upbblue}
\setbeamercolor{block title example}{bg=bgcol, fg=upbgreen}
\else
\iflowcont
\definecolor{bgcol}{cmyk}{0,0,0,0.05}
\fi
\setbeamercolor{item projected}{bg=upbblue, fg=bgcol}
\setbeamercolor{subitem projected}{bg=upbblue, fg=bgcol}
\setbeamercolor{block body}{bg=altblue!20}
\setbeamercolor{block title}{bg=upbblue, fg=bgcol}
\setbeamercolor{block body example}{bg=altblue!20}
\setbeamercolor{block title example}{bg=upbgreen, fg=bgcol}
\fi
\setbeamercolor{title page header}{fg=bgcol, bg=upbblue}
\setbeamercolor{title page header handout}{fg=upbblue, bg=bgcol}
\setbeamercolor{author}{fg=black}
\setbeamercolor{date}{fg=black}
\setbeamercolor{itemize item}{fg=upbblue}
\setbeamercolor{itemize subitem}{fg=upbblue}
\setbeamercolor{description item}{fg=upbblue}
\setbeamercolor{description subitem}{fg=upbblue}
\setbeamercolor{background canvas}{bg=bgcol}
\mode<all>
\mode<presentation>
\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\ifomitcuklogo
\ifomitupblogo
\else
\ifgerman
\node[anchor=south] (image) at (\paperwidth/2,.2) {\includegraphics[height=0.75cm]{figures/upb_logo_d.pdf}};
\else
\node[anchor=south] (image) at (\paperwidth/2,.2) {\includegraphics[height=0.75cm]{figures/upb_logo_e.pdf}};
\fi
\fi
\else
\ifomitupblogo
\node[anchor=south] (image) at (\paperwidth/2,.2) {\includegraphics[height=0.75cm]{figures/cuk_logo_2019.pdf}};
\else
\node[anchor=south west] (image) at (1cm,.2) {\includegraphics[height=0.75cm]{figures/cuk_logo_2019.pdf}};
\ifgerman
\node[anchor=south east] (image) at (\paperwidth-1cm,.2) {\includegraphics[height=0.75cm]{figures/upb_logo_d.pdf}};
\else
\node[anchor=south east] (image) at (\paperwidth-1cm,.2) {\includegraphics[height=0.75cm]{figures/upb_logo_e.pdf}};
\fi
\fi
\fi
\ifnum\thepage>1\relax%
\fill[bgcol,opacity=1] (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fi
\end{tikzpicture}
}
% Title page
\defbeamertemplate*{title page}{minimal}[1][]
{
\ifhandout
\begin{beamercolorbox}[wd=\textwidth,leftskip=3cm,sep=7pt,#1]{title page header handout}
\centering\usebeamerfont{title}\textbf{\inserttitle}
\end{beamercolorbox}
\else
\begin{beamercolorbox}[wd=\textwidth,leftskip=3cm,sep=7pt,#1]{title page header}
\centering\usebeamerfont{title}\textbf{\inserttitle}
\end{beamercolorbox}
\fi
\vspace*{1cm}
\begin{center}
\usebeamerfont{author}\textbf\insertauthor
\usebeamerfont{author}\insertinstitute
\usebeamerfont{date}\footnotesize\insertdate
\end{center}
}
% Title Frame
\newcommand{\titleframe}{
\begin{frame}[plain]
\titlepage
\end{frame}
}
% Intermediate Title Frames
\ifhandout
\newcommand{\headingframe}[1]{
\begin{frame}[plain]
\begin{beamercolorbox}[wd=\textwidth,leftskip=4cm,sep=7pt]{title page header handout}
\centering\usebeamerfont{title}\textbf{#1}
\end{beamercolorbox}
\end{frame}
}
\else
\newcommand{\headingframe}[1]{
\begin{frame}[plain]
\begin{beamercolorbox}[wd=\textwidth,leftskip=4cm,sep=7pt]{title page header}
\centering\usebeamerfont{title}\textbf{#1}
\end{beamercolorbox}
\end{frame}
}
\fi
% Boxes (only a capsulated minipage to make usage slightly easier)
\newenvironment{element}[1][]{\begin{minipage}[t]{#1\textwidth}}{\end{minipage}}
\newenvironment{boxedelement}[1][]{\begin{minipage}[t]{#1\textwidth}\begin{coloredbox}}{\end{coloredbox}\end{minipage}}
% Items
\setbeamertemplate{items}[square]
\makeatletter
\g@addto@macro\beamer@lastminutepatches{\renewcommand*{\theenumii}{\alph{enumii}}}
\g@addto@macro\beamer@lastminutepatches{\renewcommand*{\theenumiii}{\roman{enumiii}}}
\makeatother
\setbeamertemplate{sections/subsections in toc}[square]
\setbeamertemplate{footline}[frame number]
\mode<all>
\mode<presentation>
% Frame title
\defbeamertemplate*{frametitle}{minimal}[1][]
{
\vskip.18cm%
\begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle}
\ifhandout
\begin{tikzpicture}
\fill[bgcol] (0,0) rectangle (0.2, 1.2);
\ifomitcuklogo
\else
\fill[bgcol] (0.2,0) rectangle(0.83*\the\paperwidth,1.2);
\node[anchor=south west] (image) at (0.83*\the\paperwidth,0) {\includegraphics[width=1.5cm]{figures/cuk_logo_2019.pdf}};
\fi
\ifx\insertframesubtitle\@empty%
{\node[anchor=west, upbblue,font=\large] at (0.3,0.61){\insertframetitle};}
\else
{\node[anchor= west, upbblue,font=\large] at (0.3,0.81){\insertframetitle};
\node[anchor= west, upbblue,font=\small] at (0.3,0.41){\insertframesubtitle};}
\fi
\end{tikzpicture}
\else
\begin{tikzpicture}
\fill[bgcol] (0,0) rectangle (0.2, 1.2);
\fill[upbblue] (0.2,0) rectangle(0.98*\the\paperwidth,1.2);
\ifomitcuklogo
\else
\node[anchor=south west] (image) at (0.83*\the\paperwidth,0) {\includegraphics[width=1.5cm]{figures/cuk_logo_2019_white.pdf}};
\fi
\ifx\insertframesubtitle\@empty%
{\node[anchor=west, bgcol,font=\large] at (0.3,0.61){\insertframetitle};}
\else
{\node[anchor= west, bgcol,font=\large] at (0.3,0.81){\insertframetitle};
\node[anchor= west, bgcol,font=\small] at (0.3,0.41){\insertframesubtitle};}
\fi
\end{tikzpicture}
\fi
\end{beamercolorbox}
}
\defbeamertemplate*{footline}{minimal}{
\iffooter
\begin{tikzpicture}
\fill[bgcol] (0.0,0.0) rectangle ++(0.2,0.55);
\fill[bgcol] (0.0,0.0) rectangle ++(\the\paperwidth,0.2);
\fill[bgcol] (\the\paperwidth,0.55) ++(-0.2,0) rectangle (0.2,0.2);
\ifhandout
\else
\fill[upbblue] (\the\paperwidth,0.55) ++(-0.2,0) rectangle (0.2,0.2);
\fi
\node[anchor=west, bgcol] at (0.2,0.375) {\insertshortauthor{}~---~\insertshorttitle{}};
\ifhandout
\node[anchor=east, gray] at ($(\the\paperwidth,0.375) + (-0.2,0)$) {\insertframenumber\,/\,\insertpresentationendframe};
\else
\node[anchor=east, bgcol] at ($(\the\paperwidth,0.375) + (-0.2,0)$) {\insertframenumber\,/\,\insertpresentationendframe};
\fi
\end{tikzpicture}
\else
\hfill
\begin{tikzpicture}
\node[anchor=east, gray] {\insertframenumber\,/\,\insertpresentationendframe};
\end{tikzpicture}
\fi
}
\mode<all>
\newif\ifhandout
\handoutfalse
\DeclareOptionBeamer{handout}{\handouttrue}
\newif\iffooter
\footerfalse
\DeclareOptionBeamer{footer}{\footertrue}
\newif\iflowcont
\lowcontfalse
\DeclareOptionBeamer{lowcontrast}{\lowconttrue}
\newif\ifomitcuklogo
\omitcuklogofalse
\DeclareOptionBeamer{omitcuklogo}{\omitcuklogotrue}
\newif\ifomitupblogo
\omitupblogofalse
\DeclareOptionBeamer{omitupblogo}{\omitupblogotrue}
\newif\ifgerman
\germanfalse
\DeclareOptionBeamer{german}{\germantrue}
\ProcessOptionsBeamer
\mode<presentation>
\ifhandout
\gdef\beamer@currentmode{handout}
\fi
\ifgerman
\RequirePackage[ngerman]{babel}
\else
\RequirePackage[english]{babel}
\fi
\RequirePackage{tikz}
\usetikzlibrary{calc}
\RequirePackage[framemethod=tikz]{mdframed}
\newmdenv[innerlinewidth=0.5pt,linecolor=upbblue,innerleftmargin=6pt,backgroundcolor=bgcol,innerrightmargin=6pt,innertopmargin=6pt,innerbottommargin=6pt]{coloredbox}
\useinnertheme{minimal}
\useoutertheme{minimal}
\usecolortheme{minimal}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[shadow=false]
\mode<all>
% Counting frames excluding appendix
\def\insertpresentationendframe{\inserttotalframenumber}
\makeatletter
\g@addto@macro{\appendix}{\immediate\write\@auxout{\string\@writefile{nav}{\noexpand\headcommand{\noexpand\def\noexpand\insertpresentationendframe{\the\c@framenumber}}}}}
\makeatother
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment