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"
\documentclass[11pt]{minimal}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzset{external/system call={"../MiKTeX/miktex/bin/lualatex.exe" -enable-write18 -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}
\tikzexternalize
\pgfplotsset{compat=1.10}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
xlabel=x,
ylabel=y]
\addplot[mark=x] coordinates {
(2,-2)
(3,-3)
(4,-4)
(5,-5)
};
\end{axis}
\end{tikzpicture}
\end{document}
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{
MWE}")...disabled.
! 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.
tikzsetand it is working for me. I also tried\tikzset{external/system call={"lualatex.exe" -shell-escape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}, it works for me. My next step would be to think about changing\imageand\texsource, e.g. to./\imageorpath-somewhere/\image. – Malipivo Apr 04 '14 at 06:10MWE-figure0.log? It contains the root cause of the failure. – Christian Feuersänger Jul 08 '14 at 08:53\tikzsetcommand. – Chaplin Jul 10 '14 at 12:00