I have a LaTeX document that uses many long pgf paths, and thus compiles only if one increases the TeX "capacity" by setting save_size=50000
in texmf.cnf
.
Unfortunately I cannot change the system-wide texmf.cnf
directly as I have no root access on my work machine (OpenSuSE 11.3). Is there a way to use a user-defined texmf.cnf
that overrides the limits?
Disclaimer: as pointed out by Juan Navarro in the comments, errors of the form tex capacity exceeded are often caused by syntax errors. Even if you get that error message, 99% of the times the correct thing to do is not increasing capacity.
Best Answer
I had the same requirement when I worked with pgfplots - and I found a way.
The resulting steps have made their way into the pgfplots manual, compare the pdf at http://pgfplots.sourceforge.net/
For your convenience, I post a copy of the section about TeX-Live here, it will probably answer your question:
6.2.2 TEXLive or similar installations For Unix installations, one needs to adjust config files. This can be done as follows:
Locate texmf.cnf on your system. On my Ubuntu installation, it is in
/usr/share/texmf/web2c/texmf.cnf
.Either change
texmf.cnf
directly, or copy it to some convenient place. If you copy it, here is how to proceed:keep only the changed entries in your local copy to reduce conflicts. TEX will always read all config files found in its search path.
Adjust the search path to find your local copy. This can be done using the environment variable
TEXMFCNF
. Assuming your local copy is in~/texmf/mytexcnf/texmf.cnf
, you can writeto search first in your directory, then in all other system directories.
You should change the entries
The logĀfile usually contains information about the parameter which needs to be enlarged.
An example of this config file thing is shown below. It changes memory limits.
~/texmf/mytexcnf/texmf.cnf
(and possibly the paths as well).Run texhash such that TEX updates its
~/texmf/ls-R database
.Create the environment variable
TEXMFCNF
and assign the value~/texmf/mytexcnf:
(including the trailing:
!). For my linux system, this can be done using by addingexport TEXMFCNF=~/texmf/mytexcnf:
to
~/.bashrc
.Unfortunately, TEX does not allow arbitrary memory limits, there is an upper bound hard coded in the executables.