列表包超出 TeX 容量

列表包超出 TeX 容量

在尝试查找我的 LaTeX 文档中以下错误的来源时,该listings包似乎无法运行

我暗示但没有包括的最小例子是:

\documentclass[10pt][article]
\usepackage{listings}
\begin{document}
\end{document}

错误是

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=latex 2014.5.13)  20 OCT 2014    13:19                                             
entering extended mode                                                                                                                                       
 restricted \write18 enabled.                                                                                                                                  
 %&-line parsing  enabled.                                                                                                                                    
 **alfresco_documentation.tex                                                                                                                                 

(./alfresco_documentation.tex                                                                                                                                
LaTeX2e <2011/06/27>                                                                                                                                         
Babel <3.9h> and hyphenation patterns for 2 languages loaded.                                                                                                
! TeX capacity exceeded, sorry [parameter stack size=10000].                                                                                                 
\@fileswithoptions #1->                                                                                                                                      
                   \@ifnextchar [{\@fileswith@ptions #1}{\@fileswith@pti...                                                                              
l.2 \usepackage{                                                                                                                                             
            listings}
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:
5 strings out of 495029
193 string characters out of 6181523
114383 words of memory out of 5000000
 3315 multiletter control sequences out of 15000+600000
 3640 words of font info for 14 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 4289i,0n,10001p,52b,8s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.

答案1

[...]当用括号而不是大括号指定文档类时,我可以重现该问题{...}

\documentclass[article]
\usepackage{listings}

终端显示

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./bosh.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
! TeX capacity exceeded, sorry [parameter stack size=10000].
\@fileswithoptions #1->
                       \@ifnextchar [{\@fileswith@ptions #1}{\@fileswith@pti...
l.2 \usepackage{
                listings}
!  ==> Fatal error occurred, no output PDF file produced!

\documentclass
\usepackage{listings}

产生同样的错误。

当然应该

\documentclass{article} % or any other class
\usepackage{listings}

相关内容