diff options
Diffstat (limited to 'macros/latex/contrib/beamer/base/beamerbasecompatibility.sty')
-rw-r--r-- | macros/latex/contrib/beamer/base/beamerbasecompatibility.sty | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/macros/latex/contrib/beamer/base/beamerbasecompatibility.sty b/macros/latex/contrib/beamer/base/beamerbasecompatibility.sty index 02abbad55a..140b3d3641 100644 --- a/macros/latex/contrib/beamer/base/beamerbasecompatibility.sty +++ b/macros/latex/contrib/beamer/base/beamerbasecompatibility.sty @@ -249,6 +249,42 @@ }{} % +% Fix for metropolis theme +% https://github.com/josephwright/beamer/issues/802 +% +% metropolis patches an old version of the \beamer@@frametitle +% definition and throws an error if it does not find the outdated +% code. To avoid breaking all metropolis persentations, we revert +% back to the old definition at the start of the file and then +% overwrite again with the current implimentation at the end +% +\AddToHook{file/beamerfontthememetropolis.sty/before}{% + \long\def\beamer@@frametitle[#1]#2{% + \ifblank{#2}{}{% + \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}% + \gdef\beamer@frametitle{#2}% + \gdef\beamer@shortframetitle{#1}% + }% + } +} +\AddToHook{file/beamerfontthememetropolis.sty/after}{% + \long\def\beamer@@frametitle[#1]#2{% + \ifblank{#2}{}{% + \gdef\insertframetitle{{% + \metropolis@frametitleformat{#2}% + \ifnum\beamer@autobreakcount>0 + \relax{}\space% + \beamer@insertframetitlecontinuation% + \fi% + }}% + \gdef\beamer@frametitle{#2}% + \gdef\beamer@shortframetitle{#1}% + }% + } +} + + +% % Obsolete commands from old versions of beamer % \mode |