Algorithm2e 和 xeCJK 導致 texlive2016 上 TeX 容量超出

Algorithm2e 和 xeCJK 導致 texlive2016 上 TeX 容量超出

我將 Mac 上的 texlive 更新到 2016 版本後,我的文件無法編譯。

這是一個例子:

\documentclass[12pt]{report}

\usepackage[vlined,linesnumbered,noend,ruled]{algorithm2e}
\usepackage{xeCJK}

\begin{document}
  hello
\end{document}

輸出:

This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size12.clo))
(/usr/local/texlive/2016/texmf-dist/tex/latex/algorithm2e/algorithm2e.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/tools/xspace.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/relsize/relsize.sty)
********************************************************
Package `algorithm2e' Release 5.1 -- october 19 2015 --
- [email protected] mailing list for announcement about releases
- [email protected] mailing list for discussion about package
subscribe by emailing [email protected] with 'subscribe <list> <firstname name>'
- Author: Christophe Fiorio ([email protected])
********************************************************
) (/usr/local/texlive/2016/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def))
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.st
y) (/usr/local/texlive/2016/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
! TeX capacity exceeded, sorry [save size=80000].
<argument> ..._xeCJK_begin_int =\l__xeCJK_tmp_int
                                                  \int_incr:N \l__xeCJK_begi...
l.642 \xeCJKResetCharClass

No pages of output.
Transcript written on test.log.

我嘗試過擴大保存大小,但沒有成功。關於如何解決這個問題有什麼想法嗎?

答案1

的第 1061 行有一個問題algorithm2e.sty,內容為

\newboolean{algocf@displaygroupmarkers}{\setboolean{algocf@displaygroupmarkers}{false}

{之前的支撐\setboolean是錯誤的(並且不平衡)。

這通常不會被注意到,只會在日誌檔案中引起警告;在 的情況下xeCJK,它所做的大量分配是在已開啟的群組中執行的,導致記憶體耗盡。

在開發人員解決問題(幾個月前已經報告)之前,補救措施是製作文件副本並刪除錯誤的內容{,並將其放置在「個人」TeX 樹中或與主文件相同的資料夾中。

相關內容