保存大小超过 80000 - 要编辑哪个 texmf.cnf?

保存大小超过 80000 - 要编辑哪个 texmf.cnf?

这开始于对 David Carlisle 的回答的评论https://tex.stackexchange.com/a/134599/37570

在 Windows 下运行,我看到 2 个texmf.cnf文件:和\texlive\2013\texlive\2013\texmf-dist\web2c第一个文件没有保存大小选项,我添加了一个值 160000:

% (Public domain.)
% This texmf.cnf file should contain only your personal changes from the
% original texmf.cnf (for example, as chosen in the installer).
%
% That is, if you need to make changes to texmf.cnf, put your custom
% settings in this file, which is .../texlive/YYYY/texmf.cnf, rather than
% the distributed file (which is .../texlive/YYYY/texmf-dist/web2c/texmf.cnf).
% And include *only* your changed values, not a copy of the whole thing!
%
OSFONTDIR = $SystemRoot/fonts//
save_size = 160000     % for saving values outside current group

第二个文件将其设置为 100000,而我将其改为 160000。但仍然出现相同的错误,显示 80000!因此,原始texlive安装中没有任何地方使用 80000 这个值,现在仍然没有,但它会抛出该错误。

错误全文:

! TeX capacity exceeded, sorry [save size=80000].
\pgfmath@operation@process ...gfmath@operator {#1}
                                                  \ifx \pgfmath@stack@operat...
l.2160 \end{forest}

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:
 108577 strings out of 493308
 3987696 string characters out of 6141361
 1624088 words of memory out of 5000000
 111702 multiletter control sequences out of 15000+600000
 23776 words of font info for 26 fonts, out of 8000000 for 9000
 957 hyphenation exceptions out of 8191
 149i,15n,164p,930b,80000s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

问:我做错了什么?(无法控制 Forest/PGF 内部的分配。如果文档临时文件仅略微超过容量,我需要覆盖它以允许处理大型树。但是设置必须放在哪里?

我无法在此处发布引发错误的实际文档,因为它相当大,但下面有一个 MWE。那里除了 Forest 及其选项外什么也没有。如您所见,assignments文档中根本没有。包含引发错误的实时数据的文档仅在以下方面有所不同:

  1. 节点文本更长,格式为first name last name\\position\\work location
  2. 每层节点数约5-6个

当最大级别限制为 5 个时,文档可以正常呈现,但 6 个及以上则会引发上述错误。

\documentclass{standalone}
\usepackage{forest}

\begin{document}

\begin{forest} 
for tree={
    draw=black, align=center, l sep=4ex, parent anchor=south, child anchor=north,
    node options={font=\footnotesize, minimum width=14em, minimum height=10ex, rounded corners=1ex},
    edge path={
        \noexpand\path[\forestoption{edge}]
        (!u.parent anchor) -- +(0,-2ex) -| (.child anchor)\forestoption{edge label};
    },
    where n children=0{
        child anchor=west,
        edge path={
            \noexpand\path[\forestoption{edge}]
            ([xshift=-6em]!u.parent anchor) |- (.child anchor)\forestoption{edge label};
        },
        draw=red,for parent={
            parent anchor=south, l sep=-12em, grow'=east, calign=child edge, draw=blue          
        }
    }{}
}
    [Parent,name=Parent
        [Child1,name=Child1
            [,phantom]
            [Child11]
            [Child12,name=Child12]
        ]
        [Child3
            [,phantom]
            [Child31,name=Child31]
            [Child32]
        ]
    ]
%
\end{forest}
\end{document}

kpsewhich 命令的结果如下:

D:\>kpsewhich --all texmf.cnf
d:/texlive/2013/texmf.cnf
d:/texlive/2013/texmf-dist/web2c/texmf.cnf

将主内存增加到16000000后出现错误消息:

! TeX capacity exceeded, sorry [save size=80000].
\pgfmath@stack@push ...def \pgfmath@stack@top {#2}
                                                  \expandafter \expandafter ...
l.2898 \end{forest}

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:
 112721 strings out of 493308
 4124339 string characters out of 6141361
 1856073 words of memory out of 5000000
 115488 multiletter control sequences out of 15000+600000
 23776 words of font info for 26 fonts, out of 8000000 for 9000
 957 hyphenation exceptions out of 8191
 149i,15n,164p,884b,80000s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

发生故障时,pdflatex 使用了大约 45 MB 的 RAM。对文件的编辑是否texmf.cnf会影响错误消息中的最大值???

相关内容