TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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 am trying to increase main_memory for pdflatex compiler in win7 64.

Using initexmf didn't work. This is the error I get:

>initexmf --edit-config-file=pdflatex
initexmf: Invalid argument.
initexmf: Data: vi


>initexmf --edit-config-file pdflatex
initexmf: Invalid argument.
initexmf: Data: vi

Or which file I can edit directly. I have tried already to edit (be adding main_memory=10000000 in the files)

C:\Program Files\MiKTeX 2.9\miktex\config\pdflatex.ini


C:\Program Files\MiKTeX 2.9\tex\latex\config\pdflatex.ini

but it didn't work.

In all cases after compilation I get :

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

any idea ??


Using pdflatex argument --main-memory=10000000 seems also is not a solution since I'm using pgfplot externalization the pdflatex command which is invoked by pgfplot does not include --main-memory=10000000 in the arguments.

lualatex also would not be a solution (it is extremely slow).

share|improve this question

closed as off-topic by Speravir, texenthusiast, Peter Jansson, Martin Schröder, Werner Feb 24 '14 at 20:43

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

initexmf --edit-config-file pdflatex works for me. – Harish Kumar Feb 23 '14 at 14:00
This gets invalid argument error message in my case. – A.GH Feb 23 '14 at 14:28
@A.GH: Trying to edit the files in your main TeX installation is a bad decision BTW, because this will get very probably lost on a future uptdate. The command line works here, too, and this is the only right way to open the correct configuration file. What is your default text editor? The vi in the error message is suspect to me. – Speravir Feb 24 '14 at 19:24
This question appears to be off-topic because it is caused by an error not related to TeX, but the operating system. – Speravir Feb 24 '14 at 19:25
I am not satisfied that this is an error related to the OS. My default text editor is notepad.exe. even if it was the vi, then I would say that still here is the tight place to ask it since it is an error caused by using initexmf while the vi as a text editor. – A.GH Feb 25 '14 at 15:45

I couldn't find a solution for initexmf errors.

Instead I used

\tikzset{external/system call= {pdflatex -save-size=80000 
                               -jobname "\image" "\texsource"}} 

to increase the memory used by pdflatex invoked by pgfplots. This indeed solved my problem.

share|improve this answer
This is a workaround to your real issue. – Speravir Feb 24 '14 at 19:26

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