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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Using XeTeX(xelatex) [i got the same using pdflatex] on Debian I am trying to save some compilation time using tikz external. Yet, the figures are never updated unless I delete the corresponding files. Otherwise I get

===== Image 'figures/mwe-figure0' is up-to-date. ======

eventhough I changed something, e.g. labels or coordinates

\pgfversion gives me 2.10


\tikzset{external/system call={%
xelatex \tikzexternalcheckshellescape
-halt-on-error -shell-escape -interaction=batchmode
-jobname "\image" "\texsource"}}
\node (f) at (0,0){d};

Interestingly, when I add

\tikzset{external/up to date check=md5}

to the preamble I get

! Package pgfkeys Error: I do not know the key '/tikz/external/up to date check
'and I am going to ignore it. Perhaps you misspelled it.

What could be the cause of that?

PS: If it provides any insights to you, the *.dpth files are empty.

share|improve this question

marked as duplicate by Alexander, lockstep, Thorsten, Kurt, Claudio Fiandrino Jul 17 '13 at 9:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I have an implementation for an automatic recognition of changes already for quite a while and it works I think for all versions of pgf with the externalization feature. Just add the following into your preamble:

    {\tikzset{external/remake next}}{}%

You can include tikz files by the following code:


You don't need the \footnotesize but that's how I usually include diagrams.

share|improve this answer
bene's solution is appealing to me because it doesn't require fiddling with apt and tex-life so i can leave updating my distribution to apt-get entirely. yet, it only works with pdftex, not with xetex, due to filemode. In case somebody is looking for that in the future: I just modified the perl script so that it simply deletes the pdf if it is older than the tikz image, consequently it will then be recompiled, of course i also had to adapt the tex code accordingly. That solves the issue for now – sheß Jul 17 '13 at 15:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.