[texhax] Cleveref bug with primed equations

Joel C. Salomon joelcsalomon at gmail.com
Tue Jun 30 22:14:32 CEST 2009


Here’s a simple example of what I’m trying to do:

\documentclass{article}

\usepackage{amsmath}
\usepackage{cleveref}

\begin{document}
\section*{Demonstrate Bug}
Here is an equation:
\begin{equation}
	\label{eq:pyth}
	a^2 + b^2 = c^2.
\end{equation}

Here is the equation, solved for $c$:
\begin{equation}
	\label{eq:pythsolve}
	\tag{\ref{eq:pyth}${}'$}
	c=\sqrt{a^2 + b^2}.
\end{equation}

This reference works: \cref{eq:pyth},
as does this one: \eqref{eq:pyth}.

%This reference fails: \cref{eq:pythsolve}.
%This one too: \eqref{eq:pythsolve}.
%Even this one: (\ref{eq:pythsolve}).
\end{document}

Uncommenting the \cref line leads to an error of the sort:

	! Argument of \cref at refstar has an extra }.
	<inserted text>
	                \par
	l.27 This reference fails: \cref{eq:pythsolve}

Uncommenting either of the other lines yields this error:

	! TeX capacity exceeded, sorry [input stack size=5000].
	\reserved at a ->\def \reserved at a
	                               *{\cref at refstar }\reserved at a
	l.29 Even this one: (\ref{eq:pythsolve}
                                       ).
	If you really absolutely need more capacity,
	you can ask a wizard to enlarge me.

According to my .log, I’m using “cleveref 2009/17/04 v0.13”, the latest
on CTAN.

—Joel Salomon


More information about the texhax mailing list