From 1ca26e857a331fcb29296c4987b69aea0db90fae Mon Sep 17 00:00:00 2001 From: Johan Larsson Date: Thu, 4 Jul 2024 08:29:57 +0200 Subject: [PATCH] feat: support memoize package (closes #16) Inject `\mmzUnmemoizable` into progress bar tikzpictures to avoid the memoize package memoizing them. Also provide a dummy for this command in case the memoize package is not loaded. --- src/beamerinnerthememoloch.dtx | 2 ++ src/beamerouterthememoloch.dtx | 1 + src/beamerthememoloch.dtx | 3 +++ 3 files changed, 6 insertions(+) diff --git a/src/beamerinnerthememoloch.dtx b/src/beamerinnerthememoloch.dtx index f833f6c..dc46be9 100644 --- a/src/beamerinnerthememoloch.dtx +++ b/src/beamerinnerthememoloch.dtx @@ -202,6 +202,7 @@ \setbeamertemplate{title separator}{ \tikzexternaldisable% \begin{tikzpicture} + \mmzUnmemoizable% \fill[fg] (0,0) rectangle (\textwidth, \moloch@titleseparator@linewidth); \end{tikzpicture}% \tikzexternalenable% @@ -342,6 +343,7 @@ } \tikzexternaldisable \begin{tikzpicture} + \mmzUnmemoizable% \fill[bg] (0,0) rectangle diff --git a/src/beamerouterthememoloch.dtx b/src/beamerouterthememoloch.dtx index a5d5910..4332aeb 100644 --- a/src/beamerouterthememoloch.dtx +++ b/src/beamerouterthememoloch.dtx @@ -199,6 +199,7 @@ \begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot} \tikzexternaldisable \begin{tikzpicture} + \mmzUnmemoizable% \fill[bg] (0,0) rectangle diff --git a/src/beamerthememoloch.dtx b/src/beamerthememoloch.dtx index fcebef5..f0474f2 100644 --- a/src/beamerthememoloch.dtx +++ b/src/beamerthememoloch.dtx @@ -56,10 +56,13 @@ % them with ``tikzexternalenable'' and ``tikzexternaldisable''. However, if the % ``external'' libray is not loaded we would get undefined control sequence % problems, hence we define them as no-ops if they are not defined yet. +% We do the same for the \mmzUnmemoizable command from the memoize package, in +% order to avoid memoization of the progress bars. % % \begin{macrocode} \providecommand{\tikzexternalenable}{} \providecommand{\tikzexternaldisable}{} +\providecommand{\mmzUnmemoizable}{} % \end{macrocode} % % \subsubsection{Component sub-packages}