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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got the following error:

TeX capacity exceeded, sorry [main memory size=3000000]

while compiling a TikZ path containing ~10,000 points. So i decided to increase this memory limit of TeX. I edited the /usr/share/texmf/web2c/texmf.cnf file. Now it contains the following lines:

main_memory.latex = 30000000

main_memory.pdflatex = 30000000

main_memory.xelatex = 30000000

But the pdflatex or xelatex dies with the same error, and it says, that the main memory size is still 3,000,000. I was searching for other texmf.cnf files, and there is one here: /etc/texmf/web2c/texmf.cnf. But it's just a link, the changes what i made, appeared also in that file. So why does TeX ignore it?

I'm using TeX Live 2010/Arch Linux.

share|improve this question
did you regenerate the formats? – Taco Hoekwater Jul 20 '11 at 12:01
that's the solution. i run fmtutil instead fmtutil-sys. now it works, and i'm able to compile the large tikzpicture. thank you! – deeenes Jul 20 '11 at 12:08
@Taco: Please add it as an answer now so that vizipok can accept it and conclude the question. Thanks. – Martin Scharrer Jul 20 '11 at 13:27
up vote 7 down vote accepted

When you change the array size values in texmf.cnf, the formats need to be regenerated, since these values are stored into the formats themselves. The command used to recreate the formats is:

fmtutil-sys --all
share|improve this answer
On standard TeX Live systems there's a "local" texmf.cnf file located in /usr/local/texlive/<year>/ where site changes to variables can be made without touching the main file that could be rewritten during updates. Is there the possibility also on "packaged" TeX Live distributions such as the one for ArchLinux? – egreg Jul 20 '11 at 14:00
i don't have that file, in this distribution the local tree is /usr/share/texmf/, and the regulary updated tree is /usr/share/texmf-dist/. and texmf.cnf exist only in the former. – deeenes Jul 20 '11 at 21:24

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.