diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-23 22:18:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-23 22:18:55 +0000 |
commit | f35dfb20df88fa099d64577cc73a63c4e252d4ea (patch) | |
tree | 90c76836f9540afb9197b0650a95b382841e03d7 /Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty | |
parent | 8f189a4893035ef699e505bba4872f4c6bfaf1fd (diff) |
beamertheme-metropolis (23jan17)
git-svn-id: svn://tug.org/texlive/trunk@43031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty index 8ecd1677ce4..fa29036b269 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty @@ -17,13 +17,17 @@ %% International License (https://creativecommons.org/licenses/by-sa/4.0/). %% --------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerfontthememetropolis}[2016/03/14 Metropolis font theme] +\ProvidesPackage{beamerfontthememetropolis}[2017/01/23 Metropolis font theme] \RequirePackage{etoolbox} \RequirePackage{ifxetex} \RequirePackage{ifluatex} \RequirePackage{pgfopts} \ifboolexpr{bool {xetex} or bool {luatex}}{ - \RequirePackage[no-math]{fontspec} + \@ifpackageloaded{fontspec}{ + \PassOptionsToPackage{no-math}{fontspec} + }{ + \RequirePackage[no-math]{fontspec} + } \newcounter{fontsnotfound} \newcommand{\checkfont}[1]{% \suppressfontnotfounderror=1% @@ -243,31 +247,57 @@ {\def\inserttitle{#2}}% {\def\inserttitle{\metropolis@titleformat{#2}}}% {}% - {\PackageError{beamerfontthememetropolis}{Patching title failed}} + {\PackageError{beamerfontthememetropolis}{Patching title failed}\@ehc} \patchcmd{\beamer@subtitle}% {\def\insertsubtitle{#2}}% {\def\insertsubtitle{\metropolis@subtitleformat{#2}}}% {}% - {\PackageError{beamerfontthememetropolis}{Patching subtitle failed}} + {\PackageError{beamerfontthememetropolis}{Patching subtitle failed}\@ehc} \patchcmd{\sectionentry} {\def\insertsectionhead{#2}} {\def\insertsectionhead{\metropolis@sectiontitleformat{#2}}} {} - {\PackageError{beamerfontthememetropolis}{Patching section title failed}} + {\PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc} +\@tempswafalse \patchcmd{\beamer@section} {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{% \metropolis@sectiontitleformat{#1}}}} + {\@tempswatrue} + {} +\patchcmd{\beamer@section} + {\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}} + {\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% + \noexpand\metropolis@sectiontitleformat{#1}}}} + {\@tempswatrue} + {} +\if@tempswa\else + \PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc +\fi +\@tempswafalse +\patchcmd{\beamer@subsection} + {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} + {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{% + \metropolis@sectiontitleformat{#1}}}} + {\@tempswatrue} + {} +\patchcmd{\beamer@subsection} + {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}} + {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% + \noexpand\metropolis@sectiontitleformat{#1}}}} + {\@tempswatrue} {} - {\PackageError{beamerfontthememetropolis}{Patching section title failed}} +\if@tempswa\else + \PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc +\fi \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}}% @@ -275,7 +305,7 @@ \gdef\beamer@shortframetitle{#1}% }} {} - {\PackageError{beamerfontthememetropolis}{Patching frame title failed}} + {\PackageError{beamerfontthememetropolis}{Patching frame title failed}\@ehc} \metropolis@font@setdefaults \ProcessPgfPackageOptions{/metropolis/font} \endinput |