diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/beamertheme-metropolis/beamerfontthememetropolis.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/beamertheme-metropolis/beamerfontthememetropolis.dtx | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/beamertheme-metropolis/beamerfontthememetropolis.dtx b/Master/texmf-dist/source/latex/beamertheme-metropolis/beamerfontthememetropolis.dtx index 0d707d5053a..3e629526ff4 100644 --- a/Master/texmf-dist/source/latex/beamertheme-metropolis/beamerfontthememetropolis.dtx +++ b/Master/texmf-dist/source/latex/beamertheme-metropolis/beamerfontthememetropolis.dtx @@ -12,7 +12,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerfontthememetropolis}[2016/03/14 Metropolis font theme] +\ProvidesPackage{beamerfontthememetropolis}[2017/01/23 Metropolis font theme] %</package> % \fi % \CheckSum{0} @@ -45,7 +45,11 @@ % % \begin{macrocode} \ifboolexpr{bool {xetex} or bool {luatex}}{ - \RequirePackage[no-math]{fontspec} + \@ifpackageloaded{fontspec}{ + \PassOptionsToPackage{no-math}{fontspec} + }{ + \RequirePackage[no-math]{fontspec} + } % \end{macrocode} % % \begin{macro}{\checkfont} @@ -352,23 +356,49 @@ {\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 % \end{macrocode} % % Similarly, to make the |\MakeLowercase| and |\MakeUppercase| macros work in @@ -376,13 +406,13 @@ % % \begin{macrocode} \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}}% @@ -390,7 +420,7 @@ \gdef\beamer@shortframetitle{#1}% }} {} - {\PackageError{beamerfontthememetropolis}{Patching frame title failed}} + {\PackageError{beamerfontthememetropolis}{Patching frame title failed}\@ehc} % \end{macrocode} % % |