2

While compiling a short file with spreadtab, I got the following error:

! TeX capacity exceeded, sorry [save size=80000].

Based on other answers in this site, I ran on a Windows shell:

kpsewhich -a texmf.cnf

and got:

c:/texlive/2018/texmf.cnf
c:/texlive/2018/texmf-dist/web2c/texmf.cnf

I opened the first file and added the line:

save_size  = 200000

and then re-compiled the file, but still got the same error message.

What should I do to increase the save size?

EDIT: here is a minimal working example:

\documentclass{standalone}
\usepackage{spreadtab}  
\begin{document}
\STautoround{3}
\begin{spreadtab}{{tabular}{l|llllllllll}}
& 7 & 5 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 
\\
\STcopy{>,v}{1 - 2 * exp(2*ln(!b!1)-2*ln(!c!1))} 
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\\
& & & & & & & & & &
\end{spreadtab}
\end{document}

When I remove one or two rows, it compiles fine (and fills all cells with -2.92). But when I add the rows back, I get the error.

  • Are you sure that the capacity is really the problem and that this is not just a symptom of some problem in the code? (just asking because very often this error is caused by an infinite loop or similar) – user36296 Nov 12 '18 at 14:43
  • 1
    I would say 99% of documents that use more than 1000 save stack slots have a coding error that means that the save stack usage grows unnecessarily (usually local and global assignments to the same csname) – David Carlisle Nov 12 '18 at 14:50
  • @samcarter not 100% sure, but when I compile the spreadtab table with 5 rows it works fine, and when I add a 6th row it breaks. – Erel Segal-Halevi Nov 12 '18 at 14:50
  • 1
    @ErelSegal-Halevi Can you add a minimal working example (MWE) that reproduces the problem? – user36296 Nov 12 '18 at 14:57
  • 1
    as guessed above the code (fp package) is doing \global\let\FP@tmp=\FP@tmp% which means that its save stack usage will basically grow very rapidly and fill your stack whatever size it is. – David Carlisle Nov 12 '18 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.