I am writing a long thesis and would like to source out some graphics, so that I do not have to in every run I am compiling the tex file. Here is a simple example:



\tikzexternalize[shell escape=-enable-write18]


long text ...

\addplot[color=black, mark=] table[x=Tag,y=Dax] {test.txt};

long text ...


I get the error message:

! Package tikz Error: Sorry, the system call 'pdflatex -halt-on-error -interact ion=batchmode -jobname "diss-figure0" "\def\tikzexternalrealjob{diss}\input{dis s}"' did NOT result in a usable output file 'diss-figure0' (expected one of .pd f:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdfl atex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' o r something like that. Or maybe the command simply failed? Error messages can b e found in 'diss-figure0.log'. If you continue now, I'll try to typeset the pic ture.

I read several manuals and tried many modifications, but nothing worked. I am using TexnicCenter 1.0, MikTex 2.8 and Windows XP SP3.

  • 2
    I wrote the standalone class just for that. See Compile a LaTeX document into a PNG image that's as short as possible which also works for PDF output and Insert a TikZ picture from an external file. Note that you must copy the source code with the required preamble to an extra file, which is however anyway good practice IMHO. – Martin Scharrer Oct 5 '11 at 9:59
  • thank you for your fast answer, but isn't it possible to use the "external"-tool of pgfplots? I don't want to use the single pdf files, I just want to reduce to time my CPU needs for compiling my document. – Alex Alves Oct 5 '11 at 10:06
  • I can't help you with the external library, I never used it. However, it basically create PDF files as well and uses these. I'm planning to support this as well within standalone. – Martin Scharrer Oct 5 '11 at 10:09
  • If you don't need the pictures, you could find inspiration here: How to replace all pictures by white rectangles?. Then, at a later time, when you have the final document, you could revert to the original and compile it that way in one session. – Count Zero Oct 5 '11 at 10:47
  • 1
    --shell-escape should work with miktex too. @Alex: 1. Make sure that the plot works in itself (without the externalize library). 2. Remove old auxiliary files (.aux etc) (or move your document to a new empty folder). Perhaps you get errors from there. If it still not works: Put the document, the text.txt and the log-file somewhere on the net for inspection. – Ulrike Fischer Oct 5 '11 at 11:40

Browse other questions tagged or ask your own question.