Take the 2-minute tour ×
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.

I have a fairly large document with a number of pgfplots diagrams and due to memory capacity limits in PDFLaTeX I am now using LuaLaTeX to compile. While this works well, it takes forever to produce the document, so I would like to externalise the compilation of the plots. I have tried different approaches, but none seem to work. When I try to compile a minimal example such as

%compiled using "../MiKTeX/miktex/bin/lualatex.exe" -enable-write18  %.tex
%using MiKTeX Portable, hence the ".../lualatex"


\tikzset{external/system call={"../MiKTeX/miktex/bin/lualatex.exe" -enable-write18 -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}



    \addplot[mark=x] coordinates {


I get the following error:

===== 'mode=convert with system call': Invoking '"../MiKTeX/miktex/bin/lualatex.
exe" -enable-write18 -halt-on-error -interaction=batchmode -jobname "MWE-figure0
" "\def\tikzexternalrealjob{MWE}\input{MWE}"' ========
runsystem("../MiKTeX/miktex/bin/lualatex.exe" -enable-write18 -halt-on-error -in
teraction=batchmode -jobname "MWE-figure0" "\def\tikzexternalrealjob{MWE}\input{

! Package tikz Error: Sorry, the system call '"../MiKTeX/miktex/bin/lualatex.ex
e" -enable-write18 -halt-on-error -interaction=batchmode -jobname "MWE-figure0"
"\def\tikzexternalrealjob{MWE}\input{MWE}"' did NOT result in a usable output
file 'MWE-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that
you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'.
Sometimes it is also named 'write 18' or something like that. Or maybe the comm
and simply failed? Error messages can be found in 'MWE-figure0.log'. If you con
tinue now, I'll try to typeset the picture.

And nothing but an *.md5 file is produced. Can anybody tell me where I am mistaken? Thanks.

share|improve this question
What does the log for the supplementary LaTeX run show? –  Joseph Wright Apr 3 '14 at 15:11
@JosephWright I have edited the error message to include the system call. Other than that I do not know which log you mean. The MWE-figure0.log is not produced. –  Chaplin Apr 3 '14 at 15:28
Welcome to TeX.SX! –  Adam Liter Apr 3 '14 at 15:29
I got errors from the \pgfplotsset{compat=1.10}` but my pgf in miktex isn't quite uptodate. When I changed it to \pgfplotsset{compat=1.9} and used simply lualatex instead of your longer executable it worked fine. –  Ulrike Fischer Apr 3 '14 at 15:29
So for me. With 1.10, too. –  LaRiFaRi Apr 3 '14 at 15:43

Your Answer


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

Browse other questions tagged or ask your own question.