1

I am using \usepackage{tikz}, \usepackage{pgfplots}, \usepgfplotslibrary{external}, \tikzexternalize. I have figures that are very slow to TeX (on the order of minutes), so I'm quite happy to have \tikzexternalize. However, whenever I reorder my figures, they are recompiled, even if the content of the figures has not changed.

Ideally, I'd like to make the figure name be some sort of hash of the content of the figure; can this be done?

I'd also be okay with a version where I had to pass an extra optional argument to \begin{tikzpicture} or some variant of it (I say "extra" because I often pass [only marks] to \begin{tikzpicture}), defining the figure name of that figure.

Jason Gross
  • 2,135

1 Answers1

1

The external library is now unmaintained and the recommendation is to switch to one of the newer alternatives (e.g. this comment).

memoize uses MD5 sums to name 'externs' by default and so avoids recompilation even when items are reordered or pushed later in a document by earlier insertions. It is not only images which may be memoized and the packages has various other advantages when compared with the external library. See https://tex.stackexchange.com/a/698555/.

robust-externalize also seems to use hashes in filenames, though I've not personally experimented with this package. The author includes a listing of the two packages' relative strengths and weaknesses in the manual's introduction. But note that the evaluation of memoize is not always fair or, at least, not always applicable to the version now published to CTAN.

cfr
  • 198,882