我遇到了“TeX 容量超出,抱歉 [保存大小=50000]”错误。
来自类似问题(1,2,3,4),我知道一个解决方法是编辑一个名为“texmf.cnf”的文件,并将“save_size”参数更改为更大的值。
不幸的是我安装了 LyX 但似乎在硬盘上的任何地方都找不到这个文件。
但是,我确实找到了一个文件“texmfapp”(位于 C:\Program Files (x86)\MiKTeX 2.9\miktex 下)。但这个文件没有我可以更改的“save_size”参数。我在下面完整重现了这个文件的内容(也许这里有我应该更改的地方?):
;;; Written in 2016 by Christian Schenk
;;;
;;; To the extent possible under law, the author(s) have dedicated all
;;; copyright and related and neighboring rights to this file to the
;;; public domain worldwide. This file is distributed without any
;;; warranty. You should have received a copy of the CC0 Public
;;; Domain Dedication along with this file. If not, see
;;; http://creativecommons.org/publicdomain/zero/1.0/.
;; TeX uses the buffer to contain input lines, but macro
;; expansion works by writing material into the buffer and reparsing the
;; line. As a consequence, certain constructs require the buffer to be
;; very large, even though most documents can be handled with a small value.
buf_size=200000
;; Width of context lines on terminal error messages.
error_line=79
;; Extra low memory for boxes, glue, breakpoints, etc.
extra_mem_bot=0
;; Extra high memory for chars, tokens, etc.
extra_mem_top=0
;; Width of first lines of contexts in terminal error messages;
;; should be between 30 and (error_line - 15).
half_error_line=50
;; Words of inimemory available.
main_memory=3000000
;; Width of longest text lines output; should be at least 60.
max_print_line=79
;; Maximum number of strings.
max_strings=500000
;; Maximum number of simultaneous macro parameters.
param_size=10000
;; Pool space free after format loaded.
pool_free=47500
;; Max number of characters in all strings, including all
;; error messages, help texts, font names, control sequences.
;; These values apply to TeX and MP.
pool_size=3250000
;; Maximum number of simultaneous input sources.
stack_size=5000
;; Strings available after format loaded.
strings_free=100
;; Minimum pool space after TeX/MP's own strings; must be at least
;; 25000 less than pool_size, but doesn't need to be nearly that large.
string_vacancies=90000
;; Create auxiliary directory if '--aux-directory=DIR' refers
;; a non-existing directory.
CreateAuxDirectory=t
;; Create output directory if '--output-directory=DIR' refers
;; a non-existing directory.
CreateOutputDirectory=t
答案1
我无法找到名为“texmf.cnf”的文件。
但以下方法对我有用:
- 转到工具 > 首选项 > 文件处理 > 转换器。
- 选择“LaTeX(pdflatex)->PDF(pdflatex)”。†
- 在“Converter:”下,应该显示类似以下内容的内容
pdflatex $$i
。在末尾添加“-save-size=75000”,使其显示为pdflatex $$i -save-size=75000
(或根据需要显示任何更高的值)。
†或者您的默认输出 PDF 格式。(您可以在“工具”>“首选项”>“文件处理”>“文件格式”下查看。)
答案2
此错误通常是由于 LaTeX 代码错误造成的。即使您使用的是 LyX,LyX 生成的代码也可能存在错误。要么是因为您添加了 »邪恶的红色文本«,要么是因为您在序言中写入了某些内容(不幸的是,这些内容有误),要么是因为 LyX 理解有误。
要查找原因,请将文件导出为 *.tex 文件并运行。日志可能会提供更好的线索来查找位置。
然而,开始深入研究 TeX 系统通常不是消除错误的最短方法。
另一方面,这也是了解更多信息的好方法:-)
是的,我注意到你思考摆弄 TeX 系统解决了这个问题。如果是这样的话,那确实是一个例外。