Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This started as a comment on David Carlisle's answer http://tex.stackexchange.com/a/134599/37570

Running under Windows, I see 2 texmf.cnf files: under \texlive\2013 and \texlive\2013\texmf-dist\web2c. The first file did not have save size option and I added a value of 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

The second file had it set to 100000 and I changed to 160000. But still getting the same error that says 80000! So nowhere in the original texlive install was a value of 80000 used and still is not, but it throws that error.

Full text of an error:

! 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!

Q: What am I doing wrong? (Have no control of the assignments as they are inside Forest/PGF. If the document temporary files only slightly exceed the capacity, I need to override it to allow processing of the large trees. But where does the setting have to go?

I cannot post the actual document that throws an error here, as it is fairly large, but an MWE is below. There is nothing there but Forest and its options. As you can see, there are no assignments in the document at all. The document with live data that throws the error is only different in the following areas:

  1. Node text is much longer, in the format first name last name\\position\\work location
  2. The number of nodes in each level is around 5-6

The document renders fine when limited to 5 levels maximum, but 6 and over throws the above error.

\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}

The results of kpsewhich command as suggested:

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

Error message after increasing main memory to 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!

When the failure occurred, pdflatex was using roughly 45 MB of RAM. Should the edits to texmf.cnf file have affected the maximums in the error message???

share|improve this question
    
This answer seems to be relevant, but the proposed method does not work for me: tex.stackexchange.com/a/24772/37570 –  ajeh Jun 17 at 17:09
    
Can you try doing kpsewhich --all texmf.cnf and report the result? –  egreg Jun 17 at 17:47
    
@egreg See the edit at the bottom! –  ajeh Jun 17 at 17:57
    
The maximum memory is 8000000; if the change doesn't seem to be reflected, it could be that you have hit some maximum. –  egreg Jun 17 at 19:09
    
The error seems to state it's 80000, not 8000000. Anyhow, what is required for increasing that maximum? –  ajeh Jun 17 at 19:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.