1

I'd like to enlarge the memory size used by xelatex. In the MikTeX documentation it says:

The name of the configuration file is that of the engine (e.g., miktex-pdftex) or format (e.g, miktex-pdflatex). You use the --edit-config-file option of initexmf to edit the configuration file, e.g.:

initexmf --edit-config-file=pdflatex

What shall I do in order to increase memory size used by xelatex?

initexmf --edit-config-file=xelatex
initexmf --edit-config-file=xetex
initexmf --edit-config-file=miktex-xetex

And which command do I have to run afterwards to apply the changes?

May I put the --admin option if I want to apply the changes to all system users?

  • 1
    I don't think you should need no enlarge the memory... Are you getting an error saying that there is not enough memory? – Phelype Oleinik Jul 2 '18 at 11:44
  • Yes, I described the problem here – Mik Jul 2 '18 at 12:42
  • BTW, a similar problem is described in tex.stackexchange.com/questions/7953/… – Mik Jul 2 '18 at 14:01
  • Sorry, I asked because usually (which is not always), increasing memory does not solve the problem because TeX is stuck in a loop. Of course this is not you case :) – Phelype Oleinik Jul 2 '18 at 14:03
2

Your document uses really a lot of memory and for an unknown reason the default memory for xelatex is smaller then the one for pdflatex in miktex.

You can increase the memory with

initexmf --edit-config-file=xelatex

This will hopefully open xelatex.ini in your editor.

Then you can add either

 extra_mem_top = 2000000

This will work directly. Simply save the file.

Or add

 main_memory = 5000000

This will need a recreation of the format with (or with the console)

 initexmf --dump=xelatex

If you want to do it for all users use

 initexmf --admin --edit-config-file=xelatex

and

 initexmf --admin --dump=xelatex 

But be aware that user settings and user formats can shadow settings and formats of the admin and so non-admin calls are perhaps needed too -- I can't test this as I don't have a multi user installation.

  • Thank you, @Ulrike. After After increasing the memory size with extra_mem_top = 2000000 I get another error: ! Output loop---100 consecutive dead cycles. \end@float ...loatpenalty <-\@Mii \penalty -\@Miv \@tempdima \prevdepth \vbo... l.48 \end{figure} I've concluded that your \output is awry; it never does a \shipout, so I'm shipping \box255 out myself. Next time increase \maxdeadcycles if you want me to be more patient! – Mik Jul 2 '18 at 13:49
  • I had no problem with your example. But if in your real document you are really using so many floats (figure) it could be problematic. Insert \clearpage somewhere. – Ulrike Fischer Jul 2 '18 at 13:51
  • No, in my real document there are only 6 plots in one figure. – Mik Jul 2 '18 at 13:53
  • Ok, after setting extra_mem_top = 2000000in C:\ProgramData\MiKTeX\2.9\miktex\config\xelatex.ini my original document compiles again :) Thank you @Ulrike !!!! – Mik Jul 2 '18 at 14:07
  • You shouldn't change the original files. miktex can overwrite them at updates. – Ulrike Fischer Jul 2 '18 at 14:09

Your Answer

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

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