I have spent a lot of time trying to make TikZ externalize work (on MiKTeX2.9). So I tried to just run the first program using externalize from the TikZ PGF manual:

% main document, called main.tex
\tikzexternalize % activate!
\node {root}
child {node {left}}
child {node {right}
child {node {child}}
child {node {child}}
A simple image is \tikz \fill (0,0) circle(5pt);.

It runs perfectly and produces a pdf and opens the pdf (as my WinEdt 10.1 is configured to do) if I cut out the two lines

\tikzexternalize % activate!

But with those two it generates

! Package tikz Error: Sorry, the system call 'pdflatex -halt-on-error -interact ion=batchmode -jobname "MWE-figure0" "\def\tikzexternalrealjob{MWE}\input{MWE}" ' did NOT result in a usable output file 'MWE-figure0' (expected one of .pdf:.j pg:.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 so mething like that. Or maybe the command simply failed? Error messages can be fo und in 'MWE-figure0.log'. If you continue now, I'll try to typeset the picture.

Is this a real problem? And if so, how can I avoid it?

It seems to be a real problem. When I continue (by entering q) then it actually does produce a pdf but does not open it. And it reports

Sorry, but texify.exe did not succeed.

I am not able to make externalize work after that. But I do not know what other mistakes I might be making. And I do not want to explore those any further until I understand this one.

  • Did you allow MikTex to call external programs? – pschulz Nov 30 '16 at 20:07
  • @pschulz No I did not. I am just trying what is in the manual. I have just now tried \tikzexternalenable both in the preface and in the document and those do not work. Is there something else I should be doing? – Colin McLarty Nov 30 '16 at 20:20
  • Don't use texify for such tests. Call pdflatex with the option --shell-escape. – Ulrike Fischer Nov 30 '16 at 20:26
  • @UlrikeFischer How do I select that option in MiKTeK? – Colin McLarty Nov 30 '16 at 21:28
  • You need to change the command WinEdt uses to compile, if that's your editor. – cfr Nov 30 '16 at 23:09

Warning: Several threads on TeX StackExchange and elsewhere identify write18 as a security risk. The fullest discussion I found is several years old at

What analysis of Texlive's restricted permissions model exists?

I do not understand these issues but I can see that experts who do understand them did not agree on the risk. So I will not leave the switch -enable-write18 in my PDFLaTeX, though TikZexternalize will not work without it.

Using MiKTeX with WinEdt, you can make the program quoted from the TikZ manual above work by going to Options, Execution modes, PDFLaTeX, and entering


in switches. I do not know if there is any reason you could not as well do it by adding this to switches for PDFTeXify or others.

However, when it works this way, it does require that the file name have no space. For example the file name

Revision on conjugation

will prevent compiling. Use instead


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.