diff options
author | Karl Berry <karl@freefriends.org> | 2015-12-05 23:05:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-12-05 23:05:44 +0000 |
commit | 85ee8c199f2c14ef10dd75bd71157faa5cb51bf6 (patch) | |
tree | 4aa56eb66743945fdf28f15849d291743f359aee /Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty | |
parent | 5384f92b5a44dd9e84f1bab69420edf32e99c696 (diff) |
beamertheme-metropolis (6dec15)
git-svn-id: svn://tug.org/texlive/trunk@39020 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty new file mode 100644 index 00000000000..5115715e72e --- /dev/null +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty @@ -0,0 +1,158 @@ +%% +%% 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}[2015/12/04 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}% + } + }, +} +\pgfkeys{ + /metropolis/outer/titleformat frame/.cd, + .is choice, + regular/.code={% + \let\@metropolis@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\normalfont}% + \renewcommand{\@metropolis@frametitlestrut}{% + \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}% + } + }, + smallcaps/.code={% + \let\@metropolis@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\scshape}% + \renewcommand{\@metropolis@frametitlestrut}{% + \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}% + } + }, + allsmallcaps/.code={% + \let\@metropolis@frametitleformat\MakeLowercase% + \setbeamerfont{frametitle}{shape=\scshape}% + \renewcommand{\@metropolis@frametitlestrut}{% + \vphantom{abcdefghijklmnopqrstuvwxyz}% + } + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat frame=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\@metropolis@frametitleformat\MakeUppercase% + \setbeamerfont{frametitle}{shape=\normalfont} + \renewcommand{\@metropolis@frametitlestrut}{% + \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZ}% + } + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat frame=allcaps can lead to problems% + } + }, +} +\newcommand{\@metropolis@outer@setdefaults}{ + \pgfkeys{/metropolis/outer/.cd, + numbering=counter, + progressbar=none, + titleformat frame=regular, + } +} +\setbeamertemplate{navigation symbols}{} +\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}% + \hfill% + \usebeamerfont{page number in head/foot}% + \usebeamertemplate*{frame numbering} + \end{beamercolorbox}% +} +\def\@metropolis@frametitleformat#1{#1} +\patchcmd{\beamer@@frametitle} + {\beamer@ifempty{#2}{}{% + \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space% + \usebeamertemplate*{frametitle continuation}\fi}}% + \gdef\beamer@frametitle{#2}% + \gdef\beamer@shortframetitle{#1}% + }} + {\beamer@ifempty{#2}{}{% + \gdef\insertframetitle{{\@metropolis@frametitleformat{#2}\ifnum% + \beamer@autobreakcount>0\relax{}\space% + \usebeamertemplate*{frametitle continuation}\fi}}% + \gdef\beamer@frametitle{#2}% + \gdef\beamer@shortframetitle{#1}% + }} + {} + {\PackageError{beamerouterthememetropolis}{Patching frame title failed}} +\newlength{\@metropolis@frametitlestrut} +\defbeamertemplate{frametitle}{plain}{% + \nointerlineskip% + \begin{beamercolorbox}[% + wd=\paperwidth,% + sep=1.5ex,% + ]{frametitle}% + \@metropolis@frametitlestrut\insertframetitle\@metropolis@frametitlestrut% + \end{beamercolorbox}% +} +\newlength{\metropolis@progressinheadfoot} +\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} + \begin{tikzpicture} + \draw[bg, fill=bg] (0,0) rectangle (\paperwidth, 0.4pt); + \draw[fg, fill=fg] (0,0) rectangle (\metropolis@progressinheadfoot, 0.4pt); + \end{tikzpicture}% + \end{beamercolorbox} +} +\@metropolis@outer@setdefaults +\ProcessPgfPackageOptions{/metropolis/outer} +\endinput +%% +%% End of file `beamerouterthememetropolis.sty'. |