Question: I am using the `external` library to avoid recompiling tikz figures unnecessarily in a large document. Every now and then I have to change some details of some selected pictures. After the modifications it is necessary to recompile only those figures that have been modified. My aim is to do that automatically. 

From Christian Feuersänger's answer to [this question](https://tex.stackexchange.com/questions/55760/override-tikz-externalize-up-to-date-flag), I have interpreted that pictures whose content change can be remade automatically. I have not found however a simple MWE in which a tikz figure is recompiled only when its content is changed. It would be useful to have one.

The following MWE does not work, in the sense that changes in figure.tikz do not trigger re-compilation of the figure.

```
\documentclass{article}
\usepackage{pgfplots}
\usetikzlibrary{external}
\tikzexternalize[prefix=tikz2pdf/]

\begin{document}
\begin{figure}
  \tikzsetnextfilename{figure}
  \input{figure.tikz}
\end{figure}
\end{document}

```

figure.tikz

```
\begin{tikzpicture} 
\draw (0,0) -- (1,0);
\end{tikzpicture}

```

From the logs of pdflatex I can see

```
===== Image 'tikz2pdf/figure' is up-to-date. ======

```

which tells that the file checked against being up-to-date is the generated pdf, not the original tikz. Obviously I am missing something.

**How do I specify that the file to be checked is the original tikz?**

For the background, I use pdflatex and tikz/pgf 2.10.

Answer: 
In order to recreate files automatically as soon as the picture content has been modified, you will have to install a version of PGF which is more recent than 2.10. 

At the time of this writing, this means you would need to (a) wait for the next stable or (b) use the unstable version. You can acquire one by means of CSV. Sometimes one is prepared and made available on <http://www.texample.net/tikz/> .
By adding option to `tikzexternalize`

```
\tikzexternalize[up to date check=diff,some other options]

```

the package will overwrite the default md5 check, therefore bypass the md5 not updating problem. The picture will be updated this way, at least on my machine.