thmtools icon indicating copy to clipboard operation
thmtools copied to clipboard

beamer theorem syntax not fully supported

Open mbertucci47 opened this issue 1 year ago • 0 comments

The beamer syntax \begin{theorem}<overlay spec>[heading] is not supported by thmtools while the alternative syntax \begin{theorem}[heading]<overlay spec> is.

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

\declaretheorem{MyTheorem}

\begin{document}

\begin{frame}
\begin{MyTheorem}[name=bla]
first text
\end{MyTheorem}
\begin{MyTheorem}<2->[name=bla]
second text
\end{MyTheorem}
\begin{MyTheorem}[name=bla]<3->
third text
\end{MyTheorem}
\end{frame}

% Compare:

\begin{frame}
\begin{theorem}[bla]
first text
\end{theorem}
\begin{theorem}<2->[bla]
second text
\end{theorem}
\begin{theorem}[bla]<3->
third text
\end{theorem}
\end{frame}

\end{document}
beamer-ex

It's confusing to me that the heading/options are silently ignored in the <2->[name=bla] example, which makes me think that thmtools' intention is to support this syntax, but something is going awry in the code. I haven't spent the time to understand parseargs so I can't debug the definition of \thmt@parsetheoremargs at the moment.

mbertucci47 avatar Dec 15 '23 22:12 mbertucci47