diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-14 21:25:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-14 21:25:03 +0000 |
commit | 1cdee1080e0ad8f88624629e00039d9fe89c1b54 (patch) | |
tree | de1ea75b810891ce5bc773022516edfab072ac77 /Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty | |
parent | ecc285a4a14716fefbfab61485038eb34dd32a5e (diff) |
beamertheme-metropolis (14mar16)
git-svn-id: svn://tug.org/texlive/trunk@40024 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 | 94 |
1 files changed, 31 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty index 5115715e72e..e4d359ae916 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty @@ -17,7 +17,7 @@ %% International License (https://creativecommons.org/licenses/by-sa/4.0/). %% --------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerouterthememetropolis}[2015/12/04 Metropolis outer theme] +\ProvidesPackage{beamerouterthememetropolis}[2016/03/14 Metropolis outer theme] \RequirePackage{etoolbox} \RequirePackage{calc} \RequirePackage{pgfopts} @@ -52,52 +52,15 @@ } }, } -\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}{ +\newcommand{\metropolis@outer@setdefaults}{ \pgfkeys{/metropolis/outer/.cd, numbering=counter, progressbar=none, - titleformat frame=regular, } } \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}{ @@ -106,36 +69,33 @@ \defbeamertemplate{headline}{plain}{} \defbeamertemplate{footline}{plain}{% \begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}% - \hfill% \usebeamerfont{page number in head/foot}% + \usebeamertemplate*{frame footer} + \hfill% \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} +\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=1.5ex,% + sep=0pt,% + leftskip=\metropolis@frametitle@padding,% + rightskip=\metropolis@frametitle@padding,% ]{frametitle}% - \@metropolis@frametitlestrut\insertframetitle\@metropolis@frametitlestrut% + \metropolis@frametitlestrut@start\insertframetitle\metropolis@frametitlestrut@end% \end{beamercolorbox}% } \newlength{\metropolis@progressinheadfoot} @@ -151,7 +111,15 @@ \end{tikzpicture}% \end{beamercolorbox} } -\@metropolis@outer@setdefaults +\AtBeginDocument{% + \apptocmd{\appendix}{% + \pgfkeys{% + /metropolis/outer/.cd, + numbering=none, + progressbar=none} + }{}{} +} +\metropolis@outer@setdefaults \ProcessPgfPackageOptions{/metropolis/outer} \endinput %% |