muzimuzhi / thmtools

New home for LaTeX package bundle thmtools
LaTeX Project Public License v1.3c
16 stars 3 forks source link

restate key incompatible with beamer #58

Open mbertucci47 opened 7 months ago

mbertucci47 commented 7 months ago

The restate key fails if used with beamer. The restatable environment works fine. Something to do with the way beamer grabs the contents of a frame, I assume.

\documentclass{beamer}
\setbeamertemplate{theorems}[numbered]
\usepackage{thmtools}

\declaretheorem{MyTheorem}

\begin{document}

\begin{frame}%[fragile] % "fragile" does not fix it

\begin{MyTheorem}[restate=foo]
text
\end{MyTheorem}

%% This works fine.
%\begin{restatable}{MyTheorem}{foo}
%text
%\end{restatable}

\foo*

\end{frame}

\end{document}