2014-09-19 22:52:31 +02:00
|
|
|
% Beamer mtheme
|
|
|
|
%
|
|
|
|
% Copyright 2014 Matthias Vogelgesang
|
|
|
|
% Licensed under CC-BY-SA 4.0 International.
|
|
|
|
%
|
|
|
|
% The initial template comes from the HSRM beamer theme by Benjamin Weiss, which
|
|
|
|
% you can find at https://github.com/hsrmbeamertheme/hsrmbeamertheme.
|
|
|
|
%
|
2014-08-28 10:57:04 +02:00
|
|
|
|
|
|
|
\ProvidesPackage{beamerthemem}
|
|
|
|
|
2015-01-29 05:13:06 +01:00
|
|
|
%{{{ --- Options ----------------------
|
|
|
|
|
|
|
|
\newif\if@useTitleProgressBar
|
|
|
|
\newif\if@protectFrameTitle
|
2015-01-29 23:18:55 +01:00
|
|
|
|
|
|
|
\@useTitleProgressBarfalse
|
2015-01-29 05:13:06 +01:00
|
|
|
\@protectFrameTitlefalse
|
|
|
|
|
2015-01-29 23:18:55 +01:00
|
|
|
\newlength{\@mtheme@voffset}
|
|
|
|
\setlength{\@mtheme@voffset}{2em}
|
|
|
|
|
2015-02-06 08:08:46 +01:00
|
|
|
\DeclareOptionBeamer{usetitleprogressbar}{\@useTitleProgressBartrue}
|
2015-01-29 23:18:55 +01:00
|
|
|
\DeclareOptionBeamer{protectframetitle}{\@protectFrameTitletrue}
|
|
|
|
\DeclareOptionBeamer{blockbg}{%
|
|
|
|
\PassOptionsToPackage{blockbg}{beamercolorthememetropolis}%
|
|
|
|
}
|
|
|
|
\DeclareOptionBeamer{nooffset}{\setlength{\@mtheme@voffset}{0em}}
|
2015-01-29 05:13:06 +01:00
|
|
|
|
|
|
|
\DeclareOptionBeamer*{%
|
|
|
|
\PackageWarning{beamerthemem}{Unknown option `\CurrentOption'}%
|
|
|
|
}
|
|
|
|
|
|
|
|
\ProcessOptionsBeamer
|
|
|
|
|
|
|
|
%}}}
|
2015-01-29 23:18:55 +01:00
|
|
|
|
|
|
|
\mode<presentation>
|
|
|
|
|
2014-08-28 10:57:04 +02:00
|
|
|
%{{{ --- Packages ---------------------
|
|
|
|
|
2015-01-29 23:18:55 +01:00
|
|
|
\RequirePackage[no-math]{fontspec}
|
|
|
|
\RequirePackage{etoolbox}
|
|
|
|
\RequirePackage{tikz}
|
|
|
|
\RequirePackage{pgfplots}
|
2014-08-28 10:57:04 +02:00
|
|
|
|
|
|
|
\usetikzlibrary{backgrounds}
|
2015-01-18 16:46:16 +01:00
|
|
|
\usetikzlibrary{calc}
|
2014-08-28 10:57:04 +02:00
|
|
|
|
2014-09-22 17:10:05 +02:00
|
|
|
\usecolortheme{metropolis}
|
|
|
|
\usefonttheme{metropolis}
|
|
|
|
|
2014-08-28 11:28:31 +02:00
|
|
|
%}}}
|
|
|
|
%{{{ --- Titlepage --------------------
|
|
|
|
|
|
|
|
\def\maketitle{\ifbeamer@inframe\titlepage\else\frame[plain]{\titlepage}\fi}
|
|
|
|
|
2014-08-28 17:53:56 +02:00
|
|
|
\def\titlepage{\usebeamertemplate{title page}}
|
|
|
|
\setbeamertemplate{title page}
|
|
|
|
{
|
|
|
|
\begin{minipage}[b][\paperheight]{\textwidth}
|
|
|
|
\vfill
|
|
|
|
\ifx\inserttitle\@empty%
|
|
|
|
\else%
|
2014-10-27 11:36:44 +01:00
|
|
|
{\raggedright\linespread{1.0}\usebeamerfont{title}\usebeamercolor[fg]{title}\scshape\MakeLowercase{\inserttitle}\par}%
|
2014-08-28 17:53:56 +02:00
|
|
|
\vspace*{0.5em}
|
|
|
|
\fi%
|
|
|
|
\ifx\insertsubtitle\@empty%
|
|
|
|
\else%
|
|
|
|
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
|
|
|
|
\vspace*{0.5em}
|
|
|
|
\fi%
|
2015-01-23 02:39:09 +01:00
|
|
|
\begin{tikzpicture}\draw[alerted text.fg] (0, 0) -- (\textwidth, 0);\end{tikzpicture}%
|
2014-10-28 14:25:24 +01:00
|
|
|
\vspace*{1em}
|
2014-08-28 17:53:56 +02:00
|
|
|
\ifx\insertauthor\@empty%
|
|
|
|
\else%
|
|
|
|
{\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor\par}%
|
|
|
|
\vspace*{0.25em}
|
|
|
|
\fi%
|
|
|
|
\ifx\insertdate\@empty%
|
|
|
|
\else%
|
|
|
|
{\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate\par}%
|
|
|
|
\fi%
|
|
|
|
\ifx\insertinstitut\@empty%
|
|
|
|
\else%
|
|
|
|
\vspace*{3mm}
|
|
|
|
{\usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute\par}%
|
|
|
|
\fi%
|
|
|
|
\vfill
|
|
|
|
\vspace*{5mm}
|
|
|
|
\end{minipage}
|
|
|
|
}
|
|
|
|
|
2014-08-28 10:57:04 +02:00
|
|
|
%}}}
|
|
|
|
%{{{ --- Progressbar ------------------
|
|
|
|
|
|
|
|
\makeatletter
|
2014-10-04 02:54:38 +02:00
|
|
|
\def\progressbar@sectionprogressbar{}
|
|
|
|
\def\progressbar@titleprogressbar{}
|
2014-08-28 10:57:04 +02:00
|
|
|
\newcount\progressbar@tmpcounta % auxiliary counter
|
|
|
|
\newcount\progressbar@tmpcountb % auxiliary counter
|
|
|
|
\newdimen\progressbar@pbht % progressbar height
|
|
|
|
\newdimen\progressbar@pbwd % progressbar width
|
|
|
|
\newdimen\progressbar@tmpdim % auxiliary dimension
|
|
|
|
|
2014-11-03 19:32:13 +01:00
|
|
|
\progressbar@pbwd=22em
|
|
|
|
\progressbar@pbht=0.4pt
|
2014-08-28 10:57:04 +02:00
|
|
|
|
|
|
|
% the progress bar
|
2014-10-04 02:54:38 +02:00
|
|
|
\def\progressbar@sectionprogressbar{%
|
2015-01-23 02:39:09 +01:00
|
|
|
{\usebeamercolor{palette primary}%
|
|
|
|
\progressbar@tmpcounta=\insertframenumber
|
|
|
|
\progressbar@tmpcountb=\inserttotalframenumber
|
|
|
|
\progressbar@tmpdim=\progressbar@pbwd
|
2015-01-18 16:46:16 +01:00
|
|
|
\divide\progressbar@tmpdim by 100
|
2015-01-23 02:39:09 +01:00
|
|
|
\multiply\progressbar@tmpdim by \progressbar@tmpcounta
|
|
|
|
\divide\progressbar@tmpdim by \progressbar@tmpcountb
|
2015-01-18 16:46:16 +01:00
|
|
|
\multiply\progressbar@tmpdim by 100
|
2014-08-28 10:57:04 +02:00
|
|
|
|
2015-01-23 02:39:09 +01:00
|
|
|
\makebox[\textwidth][c]{
|
|
|
|
\begin{tikzpicture}[tight background]
|
2014-08-28 10:57:04 +02:00
|
|
|
|
2015-01-23 02:39:09 +01:00
|
|
|
\node[anchor=west, fg, inner sep=0pt] at (0pt, 0pt) {\insertsectionHEAD};
|
2014-08-28 10:57:04 +02:00
|
|
|
|
2015-01-23 02:39:09 +01:00
|
|
|
\draw[anchor=west, fg!20, fill=fg!20, inner sep=0pt]
|
|
|
|
(2pt, -16pt) rectangle ++ (\progressbar@pbwd, \progressbar@pbht);
|
2014-08-28 10:57:04 +02:00
|
|
|
|
2015-01-23 02:39:09 +01:00
|
|
|
\draw[anchor=west, fg, fill=fg, inner sep=0pt]
|
|
|
|
(2pt, -16pt) rectangle ++ (\progressbar@tmpdim, \progressbar@pbht);
|
|
|
|
\end{tikzpicture}%
|
|
|
|
}
|
|
|
|
} % end usebeamercolor{palette primary}
|
2014-08-28 10:57:04 +02:00
|
|
|
}
|
|
|
|
|
2014-10-04 02:54:38 +02:00
|
|
|
\if@useTitleProgressBar
|
2015-01-23 02:39:09 +01:00
|
|
|
\def\progressbar@titleprogressbar{%
|
|
|
|
\progressbar@tmpcounta=\insertframenumber
|
|
|
|
\progressbar@tmpcountb=\inserttotalframenumber
|
|
|
|
\progressbar@tmpdim=\paperwidth
|
|
|
|
\divide\progressbar@tmpdim by 100
|
|
|
|
\multiply\progressbar@tmpdim by \progressbar@tmpcounta
|
|
|
|
\divide\progressbar@tmpdim by \progressbar@tmpcountb
|
|
|
|
\multiply\progressbar@tmpdim by 100
|
|
|
|
{%
|
|
|
|
\usebeamercolor{palette quaternary}%
|
|
|
|
\usebeamercolor{alerted text}%
|
2014-10-04 02:54:38 +02:00
|
|
|
\begin{tikzpicture}[tight background]
|
2015-02-06 08:20:48 +01:00
|
|
|
\draw[palette quaternary.fg, fill=palette quaternary.fg] (0, 0) rectangle ($(\paperwidth, 0.6pt) - (0.4pt, 0)$);
|
|
|
|
\draw[alerted text.fg, fill=alerted text.fg] (0, 0) rectangle (\progressbar@tmpdim, 0.6pt);
|
2015-01-23 02:39:09 +01:00
|
|
|
\end{tikzpicture}%
|
|
|
|
}%
|
|
|
|
}
|
2014-10-04 02:54:38 +02:00
|
|
|
\fi
|
2015-01-29 23:18:55 +01:00
|
|
|
%}}}
|
2014-08-28 10:57:04 +02:00
|
|
|
%{{{ --- Commands ---------------------
|
|
|
|
|
2014-08-28 16:05:03 +02:00
|
|
|
\newcommand{\insertsectionHEAD}{%
|
|
|
|
\expandafter\insertsectionHEADaux\insertsectionhead}
|
|
|
|
\newcommand{\insertsectionHEADaux}[3]{\textsc{\MakeLowercase{#3}}
|
|
|
|
}
|
|
|
|
|
2014-10-09 15:10:47 +02:00
|
|
|
\newcommand{\plain}[2][]{%
|
2014-08-28 16:05:03 +02:00
|
|
|
\begingroup
|
2015-01-23 02:39:09 +01:00
|
|
|
\setbeamercolor{background canvas}{use=palette primary,bg=palette primary.fg}
|
2014-09-20 12:06:37 +02:00
|
|
|
\begin{frame}{#1}
|
2014-08-28 16:05:03 +02:00
|
|
|
\centering
|
2014-09-20 12:06:37 +02:00
|
|
|
\vfill\vspace{1em}\usebeamerfont{section title}\textcolor{white}{\scshape #2}\vfill
|
2014-08-28 16:05:03 +02:00
|
|
|
\end{frame}
|
|
|
|
\endgroup
|
|
|
|
}
|
|
|
|
|
2014-08-28 10:57:04 +02:00
|
|
|
%}}}
|
|
|
|
%{{{ --- Itemize ----------------------
|
2014-10-09 16:50:42 +02:00
|
|
|
|
|
|
|
\setlength{\leftmargini}{1em}
|
|
|
|
|
|
|
|
% Actually one level should be enough but ...
|
|
|
|
\setlength{\leftmarginii}{1em}
|
|
|
|
\setlength{\leftmarginiii}{1em}
|
|
|
|
|
2014-09-21 09:03:05 +02:00
|
|
|
\newcommand{\itemBullet}{∙}
|
2014-08-28 10:57:04 +02:00
|
|
|
|
2014-09-21 09:03:05 +02:00
|
|
|
\setbeamertemplate{itemize item}{\itemBullet}
|
|
|
|
\setbeamertemplate{itemize subitem}{\itemBullet}
|
|
|
|
\setbeamertemplate{itemize subsubitem}{\itemBullet}
|
2014-08-28 10:57:04 +02:00
|
|
|
\setlength{\parskip}{0.5em}
|
|
|
|
|
|
|
|
%}}}
|
|
|
|
%{{{ --- Sections ---------------------
|
|
|
|
|
|
|
|
% Insert frame with section title at every section start
|
|
|
|
\AtBeginSection[]
|
|
|
|
{
|
|
|
|
\begingroup
|
2015-01-23 02:39:09 +01:00
|
|
|
\setbeamercolor{background canvas}{parent=palette primary}
|
2014-08-28 10:57:04 +02:00
|
|
|
\begin{frame}[plain]
|
|
|
|
\vspace{2em}\usebeamerfont{section title}
|
2014-10-04 02:54:38 +02:00
|
|
|
\progressbar@sectionprogressbar%
|
2014-08-28 10:57:04 +02:00
|
|
|
\end{frame}
|
|
|
|
\endgroup
|
|
|
|
}
|
|
|
|
|
|
|
|
%}}}
|
|
|
|
%{{{ --- Captions ---------------------
|
|
|
|
|
|
|
|
\setbeamertemplate{caption label separator}{: }
|
2015-02-09 09:53:11 +01:00
|
|
|
\setbeamertemplate{caption}[numbered]
|
2014-08-28 10:57:04 +02:00
|
|
|
|
|
|
|
%}}}
|
2014-10-29 17:12:14 +01:00
|
|
|
%{{{ --- Footline/footnote ------------
|
2014-08-28 10:57:04 +02:00
|
|
|
|
|
|
|
\usenavigationsymbolstemplate{}
|
|
|
|
\setbeamertemplate{footline}
|
|
|
|
{%
|
2014-10-27 08:27:12 +01:00
|
|
|
\begin{beamercolorbox}[wd=\textwidth,ht=3ex,dp=3ex,leftskip=0.3cm,rightskip=0.3cm]{structure}%
|
2014-10-28 14:08:16 +01:00
|
|
|
\hfill\usebeamerfont{page number in head/foot}%
|
|
|
|
\insertframenumber%
|
2014-08-28 10:57:04 +02:00
|
|
|
\end{beamercolorbox}%
|
|
|
|
}
|
|
|
|
|
2014-10-29 17:12:14 +01:00
|
|
|
\setbeamertemplate{footnote}
|
|
|
|
{%
|
|
|
|
\parindent 0em\noindent%
|
|
|
|
\raggedright
|
|
|
|
\usebeamercolor{footnote}\hbox to 0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par%
|
|
|
|
}
|
|
|
|
|
2014-08-28 10:57:04 +02:00
|
|
|
%}}}
|
|
|
|
%{{{ --- Frametitle -------------------
|
2014-10-28 14:08:16 +01:00
|
|
|
|
2014-08-28 11:13:46 +02:00
|
|
|
\setbeamertemplate{frametitle}{%
|
2014-11-05 20:29:26 +01:00
|
|
|
\nointerlineskip
|
2014-08-28 11:13:46 +02:00
|
|
|
\begin{beamercolorbox}[wd=\paperwidth,leftskip=0.3cm,rightskip=0.3cm,ht=2.5ex,dp=1.5ex]{frametitle}
|
2015-01-20 08:38:36 +01:00
|
|
|
\if@protectFrameTitle
|
2014-12-10 16:10:57 +01:00
|
|
|
\usebeamerfont{frametitle}\MakeLowercase{\protect\insertframetitle}%
|
2015-01-20 08:38:36 +01:00
|
|
|
\else
|
|
|
|
\usebeamerfont{frametitle}\MakeLowercase{\insertframetitle}%
|
|
|
|
\fi
|
2014-09-26 15:34:21 +02:00
|
|
|
\end{beamercolorbox}%
|
2014-10-04 02:54:38 +02:00
|
|
|
\if@useTitleProgressBar
|
2015-02-06 08:20:48 +01:00
|
|
|
\vspace{-.5em}
|
2014-10-04 02:54:38 +02:00
|
|
|
\begin{beamercolorbox}[wd=\paperwidth,ht=1pt,dp=0pt]{frametitle}
|
|
|
|
\progressbar@titleprogressbar
|
|
|
|
\end{beamercolorbox}
|
|
|
|
\fi
|
2015-01-29 23:18:55 +01:00
|
|
|
\vspace{\@mtheme@voffset}
|
2014-08-28 10:57:04 +02:00
|
|
|
}
|
2015-01-29 23:18:55 +01:00
|
|
|
|
2014-10-17 08:40:25 +02:00
|
|
|
%}}}
|
|
|
|
%{{{ --- pgfplots ---------------------
|
|
|
|
|
|
|
|
%{{{ Colors
|
|
|
|
|
|
|
|
% TolColors from http://www.r-bloggers.com/the-paul-tol-21-color-salute/
|
|
|
|
\definecolor{TolColor1}{HTML}{332288} % dark purple
|
|
|
|
\definecolor{TolColor2}{HTML}{6699CC} % dark blue
|
|
|
|
\definecolor{TolColor3}{HTML}{88CCEE} % light blue
|
|
|
|
\definecolor{TolColor4}{HTML}{44AA99} % light green
|
|
|
|
\definecolor{TolColor5}{HTML}{117733} % dark green
|
|
|
|
\definecolor{TolColor6}{HTML}{999933} % dark brown
|
|
|
|
\definecolor{TolColor7}{HTML}{DDCC77} % light brown
|
|
|
|
\definecolor{TolColor8}{HTML}{661100} % dark red
|
|
|
|
\definecolor{TolColor9}{HTML}{CC6677} % light red
|
|
|
|
\definecolor{TolColor10}{HTML}{AA4466} % light pink
|
|
|
|
\definecolor{TolColor11}{HTML}{882255} % dark pink
|
|
|
|
\definecolor{TolColor12}{HTML}{AA4499} % light purple
|
|
|
|
|
|
|
|
%}}}
|
|
|
|
%{{{ Color cycles
|
|
|
|
|
|
|
|
\pgfplotscreateplotcyclelist{mbarplot cycle}{%
|
|
|
|
{draw=TolColor2, fill=TolColor2!70},
|
|
|
|
{draw=TolColor7, fill=TolColor7!70},
|
|
|
|
{draw=TolColor4, fill=TolColor4!70},
|
|
|
|
{draw=TolColor11, fill=TolColor11!70},
|
2014-10-31 10:31:13 +01:00
|
|
|
{draw=TolColor1, fill=TolColor1!70},
|
2014-10-17 08:40:25 +02:00
|
|
|
{draw=TolColor8, fill=TolColor8!70},
|
|
|
|
{draw=TolColor6, fill=TolColor6!70},
|
|
|
|
{draw=TolColor9, fill=TolColor9!70},
|
|
|
|
{draw=TolColor10, fill=TolColor10!70},
|
|
|
|
{draw=TolColor12, fill=TolColor12!70},
|
|
|
|
{draw=TolColor3, fill=TolColor3!70},
|
|
|
|
{draw=TolColor5, fill=TolColor5!70},
|
|
|
|
}
|
|
|
|
|
|
|
|
\pgfplotscreateplotcyclelist{mlineplot cycle}{%
|
|
|
|
{TolColor2, mark=*, mark size=1.5pt},
|
|
|
|
{TolColor7, mark=square*, mark size=1.3pt},
|
|
|
|
{TolColor4, mark=triangle*, mark size=1.5pt},
|
2014-11-17 16:27:27 +01:00
|
|
|
{TolColor6, mark=diamond*, mark size=1.5pt},
|
2014-10-17 08:40:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
%}}}
|
|
|
|
%{{{ Styles
|
|
|
|
|
|
|
|
\pgfplotsset{
|
|
|
|
compat=1.9,
|
|
|
|
mbaseplot/.style={
|
|
|
|
legend style={
|
|
|
|
draw=none,
|
|
|
|
fill=none,
|
|
|
|
cells={anchor=west},
|
|
|
|
},
|
|
|
|
x tick label style={
|
|
|
|
font=\footnotesize
|
|
|
|
},
|
|
|
|
y tick label style={
|
|
|
|
font=\footnotesize
|
|
|
|
},
|
|
|
|
legend style={
|
|
|
|
font=\footnotesize
|
|
|
|
},
|
|
|
|
major grid style={
|
|
|
|
dotted,
|
|
|
|
},
|
|
|
|
axis x line*=bottom,
|
|
|
|
},
|
|
|
|
mlineplot/.style={
|
|
|
|
mbaseplot,
|
|
|
|
xmajorgrids=true,
|
|
|
|
ymajorgrids=true,
|
|
|
|
major grid style={dotted},
|
|
|
|
axis x line=bottom,
|
|
|
|
axis y line=left,
|
|
|
|
legend style={
|
|
|
|
cells={anchor=west},
|
|
|
|
draw=none
|
|
|
|
},
|
|
|
|
cycle list name=mlineplot cycle,
|
|
|
|
},
|
|
|
|
mbarplot base/.style={
|
|
|
|
mbaseplot,
|
|
|
|
bar width=6pt,
|
|
|
|
axis y line*=none,
|
|
|
|
},
|
|
|
|
mbarplot/.style={
|
|
|
|
mbarplot base,
|
|
|
|
ybar,
|
|
|
|
xmajorgrids=false,
|
|
|
|
ymajorgrids=true,
|
|
|
|
area legend,
|
|
|
|
legend image code/.code={%
|
|
|
|
\draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm);
|
|
|
|
},
|
|
|
|
cycle list name=mbarplot cycle,
|
|
|
|
},
|
|
|
|
horizontal mbarplot/.style={
|
|
|
|
mbarplot base,
|
|
|
|
xmajorgrids=true,
|
|
|
|
ymajorgrids=false,
|
|
|
|
xbar stacked,
|
|
|
|
area legend,
|
|
|
|
legend image code/.code={%
|
|
|
|
\draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm);
|
|
|
|
},
|
|
|
|
cycle list name=mbarplot cycle,
|
|
|
|
},
|
2014-10-31 10:56:02 +01:00
|
|
|
disable thousands separator/.style={
|
|
|
|
/pgf/number format/.cd,
|
|
|
|
1000 sep={}
|
|
|
|
},
|
2014-10-17 08:40:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
%}}}
|
|
|
|
|
2015-01-29 23:18:55 +01:00
|
|
|
\mode<all>
|
2014-08-28 11:28:31 +02:00
|
|
|
|
2015-01-29 23:18:55 +01:00
|
|
|
%{{{ misc
|
2014-08-28 11:28:31 +02:00
|
|
|
\let\otp\titlepage
|
|
|
|
\renewcommand{\titlepage}{\otp\addtocounter{framenumber}{-1}}
|
2014-10-27 14:40:44 +01:00
|
|
|
\newcommand{\mreducelistspacing}{\vspace{-\topsep}}
|
2014-09-05 10:53:01 +02:00
|
|
|
|
|
|
|
\linespread{1.15}
|
2015-01-29 23:18:55 +01:00
|
|
|
|
2014-09-05 10:53:01 +02:00
|
|
|
%}}}
|