138 lines
4.5 KiB
TeX
138 lines
4.5 KiB
TeX
%%
|
|
%% This is file `beamerouterthememetropolis.sty',
|
|
%% generated with the docstrip utility.
|
|
%%
|
|
%% The original source files were:
|
|
%%
|
|
%% beamerouterthememetropolis.dtx (with options: `package')
|
|
%% ---------------------------------------------------------------------------
|
|
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
|
|
%% contributors can be found at
|
|
%%
|
|
%% https://github.com/matze/mtheme/graphs/contributors
|
|
%%
|
|
%% and the original template was based on the HSRM theme by Benjamin Weiss.
|
|
%%
|
|
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
|
|
%% International License (https://creativecommons.org/licenses/by-sa/4.0/).
|
|
%% ---------------------------------------------------------------------------
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
\ProvidesPackage{beamerouterthememetropolis}[2017/01/23 Metropolis outer theme]
|
|
\RequirePackage{etoolbox}
|
|
\RequirePackage{calc}
|
|
\RequirePackage{pgfopts}
|
|
\pgfkeys{
|
|
/metropolis/outer/numbering/.cd,
|
|
.is choice,
|
|
none/.code=\setbeamertemplate{frame numbering}[none],
|
|
counter/.code=\setbeamertemplate{frame numbering}[counter],
|
|
fraction/.code=\setbeamertemplate{frame numbering}[fraction],
|
|
}
|
|
\pgfkeys{
|
|
/metropolis/outer/progressbar/.cd,
|
|
.is choice,
|
|
none/.code={%
|
|
\setbeamertemplate{headline}[plain]
|
|
\setbeamertemplate{frametitle}[plain]
|
|
\setbeamertemplate{footline}[plain]
|
|
},
|
|
head/.code={\pgfkeys{/metropolis/outer/progressbar=none}
|
|
\addtobeamertemplate{headline}{}{%
|
|
\usebeamertemplate*{progress bar in head/foot}
|
|
}
|
|
},
|
|
frametitle/.code={\pgfkeys{/metropolis/outer/progressbar=none}
|
|
\addtobeamertemplate{frametitle}{}{%
|
|
\usebeamertemplate*{progress bar in head/foot}
|
|
}
|
|
},
|
|
foot/.code={\pgfkeys{/metropolis/outer/progressbar=none}
|
|
\addtobeamertemplate{footline}{}{%
|
|
\usebeamertemplate*{progress bar in head/foot}%
|
|
}
|
|
},
|
|
}
|
|
\newcommand{\metropolis@outer@setdefaults}{
|
|
\pgfkeys{/metropolis/outer/.cd,
|
|
numbering=counter,
|
|
progressbar=none,
|
|
}
|
|
}
|
|
\setbeamertemplate{navigation symbols}{}
|
|
\defbeamertemplate{frame footer}{none}{}
|
|
\defbeamertemplate{frame footer}{custom}[1]{ #1 }
|
|
\defbeamertemplate{frame numbering}{none}{}
|
|
\defbeamertemplate{frame numbering}{counter}{\insertframenumber}
|
|
\defbeamertemplate{frame numbering}{fraction}{
|
|
\insertframenumber/\inserttotalframenumber
|
|
}
|
|
\defbeamertemplate{headline}{plain}{}
|
|
\defbeamertemplate{footline}{plain}{%
|
|
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}%
|
|
\usebeamerfont{page number in head/foot}%
|
|
\usebeamertemplate*{frame footer}
|
|
\hfill%
|
|
\usebeamertemplate*{frame numbering}
|
|
\end{beamercolorbox}%
|
|
}
|
|
\newlength{\metropolis@frametitle@padding}
|
|
\setlength{\metropolis@frametitle@padding}{2.2ex}
|
|
\newcommand{\metropolis@frametitlestrut@start}{
|
|
\rule{0pt}{\metropolis@frametitle@padding +%
|
|
\totalheightof{%
|
|
\ifcsdef{metropolis@frametitleformat}{\metropolis@frametitleformat X}{X}%
|
|
}%
|
|
}%
|
|
}
|
|
\newcommand{\metropolis@frametitlestrut@end}{
|
|
\rule[-\metropolis@frametitle@padding]{0pt}{\metropolis@frametitle@padding}
|
|
}
|
|
\defbeamertemplate{frametitle}{plain}{%
|
|
\nointerlineskip%
|
|
\begin{beamercolorbox}[%
|
|
wd=\paperwidth,%
|
|
sep=0pt,%
|
|
leftskip=\metropolis@frametitle@padding,%
|
|
rightskip=\metropolis@frametitle@padding,%
|
|
]{frametitle}%
|
|
\metropolis@frametitlestrut@start%
|
|
\insertframetitle%
|
|
\nolinebreak%
|
|
\metropolis@frametitlestrut@end%
|
|
\end{beamercolorbox}%
|
|
}
|
|
\setbeamertemplate{frametitle continuation}{%
|
|
\usebeamerfont{frametitle}
|
|
\romannumeral \insertcontinuationcount
|
|
}
|
|
\newlength{\metropolis@progressinheadfoot}
|
|
\newlength{\metropolis@progressinheadfoot@linewidth}
|
|
\setlength{\metropolis@progressinheadfoot@linewidth}{0.4pt}
|
|
\setbeamertemplate{progress bar in head/foot}{
|
|
\nointerlineskip
|
|
\setlength{\metropolis@progressinheadfoot}{%
|
|
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
|
|
}%
|
|
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
|
|
\tikzexternaldisable%
|
|
\begin{tikzpicture}
|
|
\fill[bg] (0,0) rectangle (\paperwidth, \metropolis@progressinheadfoot@linewidth);
|
|
\fill[fg] (0,0) rectangle (\metropolis@progressinheadfoot, \metropolis@progressinheadfoot@linewidth);
|
|
\end{tikzpicture}%
|
|
\tikzexternalenable%
|
|
\end{beamercolorbox}
|
|
}
|
|
\AtBeginDocument{%
|
|
\apptocmd{\appendix}{%
|
|
\pgfkeys{%
|
|
/metropolis/outer/.cd,
|
|
numbering=none,
|
|
progressbar=none}
|
|
}{}{}
|
|
}
|
|
\metropolis@outer@setdefaults
|
|
\ProcessPgfPackageOptions{/metropolis/outer}
|
|
\endinput
|
|
%%
|
|
%% End of file `beamerouterthememetropolis.sty'.
|