Here is my problem: I have a 100+ page document with ~100 tikz plots. Some plots contain 9000+ points, and compiling them with pdflatex -shell-escape (or whatever main_memory_size) fails. I can compile it with lualatex though, but it takes forever. I decided to use:

    \tikzset{external/system call={lualatex \tikzexternalcheckshellescape -shell-                escape -halt-on-error -interaction=nonstopmode -jobname "\image" "\texsource"}}
    \tikzset{external/force remake}

And it fails with

    "16684 words still in use, bla-bla ...may be you did not enable shell-escape         ...bla-bla write18...please refer to picture-17.log", 

but there is no error message in that log. If I switch back to pdflatex, with proper adjustments, error log says again that I'm out of memory. I thought lualatex manages memory dynamically, and externalize should work when regular compilation fails, but I got the opposite case. I have 4-core i7 with 8Gb RAM, hardly half is used.. What to do? I use TexNic center and MikTex, so in the editor options of course I hap put the -shell-escape as well as -enable-write18 in all possible combinations for both pdflatex output profile and lualatex profile. I have a main .tex file with several included chapters, with separate tikzpistures in .tex files as well. Moreover, if I delete all the images from the TikzFigures/ folder, now both lualatex and pdflatex fail already at the first image. If I comment out lines responsible for externalization, it compiles. It takes 5 minutes and 500Mb of memory, but it compiles with one warning about scrbook\float@addtolist that it is about to get outdated.


    \pgfplotsset{every axis/.append style={line width=1pt, 
    tick style={tick align=outside, line width=0.6pt}}}
    \pgfplotsset{ticks=both}%/.append style={thin}}
    \pgfplotsset{ylabel shift=-4pt}
    \pgfplotsset{yticklabel style={xshift=0.1cm}}
    \pgfplotsset{label style={font=\small}}
    \pgfplotsset{every axis legend/.style={inner ysep=1.5pt}}
    \usetikzlibrary{automata, arrows}
    \lstset{backgroundcolor=\color{light-gray}}%, xleftmargin=\noindent} 


    \tikzset{external/system call={lualatex \tikzexternalcheckshellescape 
    -enable-write18 -halt-on-error -interaction=nonstopmode 
    -jobname "\image" "\texsource"}}
    \tikzset{external/force remake}

    \renewcommand{\nomname}{List of Symbols}

      \@clubpenalty \clubpenalty
       {\@latex@warning{Empty `thebibliography' environment}}







    \addcontentsline{toc}{chapter}{List of Symbols}


    \printnomenclature [14mm]



! Package tikz Error: Sorry, the system call 'lualatex --shell-escape -intera
ion=nonstopmode -jobname "TikzFigures/phd_thesis-figure17" "\def\tikzexternal
aljob{phd_thesis}\input{phd_thesis}"' did NOT result in a usable output file
ikzFigures/phd_thesis-figure17' (expected one of .pdf:.jpg:.jpeg:.png:). Plea
verify that you have enabled system calls. For pdflatex, this is 'pdflatex -
ell-escape'. Sometimes it is also named 'write 18' or something like that. Or
aybe the command simply failed? Error messages can be found in 'TikzFigures/p
_thesis-figure17.log'. If you continue now, I'll try to typeset the picture.
  • 2
    Did you run lualatex --shell-escape yourFile? Can you extend your example to make it compilable, i.e. \documentclass{<theClassYouAreUsing>} all over to \end{document}?
    – Johannes_B
    Dec 16 '13 at 18:54
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Dec 17 '13 at 10:42
  • Seems that "externalize" simply does not work with lualatex. If I compile the main file with pdftex, with {external/system call={lualatex -... it still fails with "pdftex out of memory" althoug it is supposed to call lualatex as I understand.
    – Alexander
    Dec 17 '13 at 13:02

Why not using pdflatex with increasing memory manually.

here is an example (numbers are arbitrary large, you may want try some other values)

  \tikzset{external/system call= {pdflatex -save-size=80000 
                           -jobname "\image" "\texsource"}} 
  • I just did. Not a single picture produced. And I already solved the issue of 9000 dots in a plot by plotting it with matplotlib and including as a ".png". So this should not be a memory failure now.
    – Alexander
    May 17 '14 at 10:16

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.