8

similiar to Capacity exceeded error while using cleveref package with ifacconf class, the class svjour3 by Springer crashes together if the cleveref package is used.

(/compile/main.tex
! TeX capacity exceeded, sorry [input stack size=5000].
\cl@chapter ->\cl@chapter 
                          \@elt {theorem}
l.2 \section{Introduction}
                          \label{sec:_Intro}
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.


Here is how much of TeX's memory you used:
 11671 strings out of 492990
 202237 string characters out of 6132621
 628108 words of memory out of 5000000
 15072 multiletter control sequences out of 15000+600000
 14570 words of font info for 40 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 5000i,9n,39p,816b,746s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

The following example is an extraction of this full template by Springer on overleaf:

\documentclass[twocolumn]{svjour3}          % twocolumn

\usepackage{cleveref}

\begin{document}

\section{Introduction}

\end{document}

How can that be fixed?

Alex44
  • 573
  • 6
  • 18

1 Answers1

12

One way would be to tell svjour3 to set up the chapter counter via the numbook option.

\documentclass[twocolumn,numbook]{svjour3}          % twocolumn

\usepackage{cleveref}

\begin{document}

\section{Introduction}

\end{document}

Alternatively you could remove the stub chapter definition the svjour3 leaves which confused cleverref

\documentclass[twocolumn]{svjour3}          % twocolumn

\makeatletter
\let\cl@chapter\undefined
\makeatletter

\usepackage{cleveref}

\begin{document}

\section{Introduction}

\end{document}

svjour3 doesn't define chapter but specifies theorems are reset each chapter, which is normally harmless but confuses cleveref.

David Carlisle
  • 757,742