类似于使用 cleveref 包与 ifacconf 类时出现容量超出错误,如果使用 cleveref 包,Springer 的 svjour3 类就会崩溃。
(/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!
以下示例是Springer 在 overleaf 上提供的完整模板:
\documentclass[twocolumn]{svjour3} % twocolumn
\usepackage{cleveref}
\begin{document}
\section{Introduction}
\end{document}
该怎么解决呢?
答案1
一种方法是通过选项来svjour3
设置计数器。chapter
numbook
\documentclass[twocolumn,numbook]{svjour3} % twocolumn
\usepackage{cleveref}
\begin{document}
\section{Introduction}
\end{document}
或者你可以删除存根章节定义svjour3
叶子,这很困惑cleverref
\documentclass[twocolumn]{svjour3} % twocolumn
\makeatletter
\let\cl@chapter\undefined
\makeatletter
\usepackage{cleveref}
\begin{document}
\section{Introduction}
\end{document}
svjour3
没有定义章节,但指定每章重新设置定理,这通常是无害的,但会造成混淆cleveref
。