Tuesday, August 07, 2007

cleveref incompatibilities with Elsevier and Springer

elsart problems: If you try using cleveref with any of the elsart packages, you may get this error:
! TeX capacity exceeded, sorry [input stack size=5000].
\cl@part ->\cl@part
\@elt {section}
This is due to a flaw in the elsart packages. They setup some part counters even though part isn't defined. This confuses cleveref. To fix this, add the following anywhere in your preamble:
\makeatletter \let\cl@part\relax \makeatother
Later, you can use cleveref's poorman option to strip all of the cleveref stuff from your document. After that, you can remove this line.

svjour problems: Similarly, if you try combining cleveref with Springer journal support files, you may get this error:
! TeX capacity exceeded, sorry [input stack size=5000].
\cl@chapter ->\cl@chapter
\@elt {theorem}
Again, this is due to a flaw in the Springer packages. They setup some chapter counters even though chapter isn't defined. To fix this, add the following anywhere in your preamble:
\makeatletter \let\cl@chapter\relax \makeatother
Again, this can be removed after cleveref's poorman procedure is applied.

Source and acknowledgments: The Springer solution was given by "Dan" in a comp.text.tex post. I used it to generate the elsart solution.

3 comments:

Anonymous said...

thaks helped a lot!

Anonymous said...

Thank you, that helped me a lot.
I take the opportunity to add that I actually had to put that line before loading amsmath. If I put the line after loading amsmath, I still get the "capacity exceeded" message.

Anonymous said...

Perfect, this worked! Thank you :)