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, 2016 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? Nov 30, 2016 at 20:20
  • 1
    Don't use texify for such tests. Call pdflatex with the option --shell-escape. Nov 30, 2016 at 20:26
  • @UlrikeFischer How do I select that option in MiKTeK? Nov 30, 2016 at 21:28
  • You need to change the command WinEdt uses to compile, if that's your editor.
    – cfr
    Nov 30, 2016 at 23:09

1 Answer 1


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


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .