I am new to TikZ, please, be patient.
I see numerous questions
- TikZ externalize fails to recognize changes
- MWE for externalize + automatic recompilation after tikz figure modification
- Override TikZ externalize "up-to-date" flag
with custom scripts to detect changes in TikZ code. The answer to the last question states that
As of May 17, 2012, the external lib comes with support for both checksum checks and diff-based checks
I see that TikZ generates files with MD5 extension but it still does not detect changes. My question is: how to avoid writing custom script to detect changes in TikZ code and make TikZ to do this automatically as described in the question I have cited?
I use the latest MikTeX under Windows.
EDIT: example code
\documentclass{article}
\usepackage{graphicx}
\usepackage{balance} % for \balance command ON LAST PAGE (only there!)
\usepackage{tikz}
\usetikzlibrary{patterns, arrows,matrix,positioning, decorations.markings}
\usetikzlibrary{external}
%\tikzset{external/force remake=true}
\tikzexternalize
\usepackage{environ}
\usepackage{textcomp}
\usepackage{gensymb}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\NewEnviron{mytikz}[3][]%
{\begin{figure}[htp]
\centering
\begin{tikzpicture}[#1]
\BODY
\end{tikzpicture}
\caption{#2}%
\label{#3}%
\end{figure}%
}
\begin{document}
\section{Title}
\def\mycolor{blue}
% Stackboxes
% http://blog.dorian-depriester.fr/latex/tikz/empilements-de-cubes-sous-tikz
\newcommand{\elemcube}[4][white]
{
\draw [\mycolor,fill=#1!30, thin] (#2+1,#3,#4) -- ++(0,1,0) -- ++(0,0,1) -- ++(0, -1, 0) -- cycle;
\draw [\mycolor,fill=#1!40, thin] (#2,#3+1,#4) -- ++(1,0,0) -- ++(0,0,1) -- ++(-1, 0, 0) -- cycle;
\draw [\mycolor,fill=#1!30, thin] (#2,#3,#4) -- ++(1,0,0) -- ++(0,1,0) -- ++(-1, 0, 0) -- cycle;
}
\begin{mytikz}[x=(90:0.4cm), y=(0:0.4cm), z=(40:0.25cm), axis/.style={->,\mycolor,thick}]{Array example}{fig:ArrayExample}
\def\latnum{3}
\def\lonnum{3}
\def\timenum{3}
\foreach \time in{\timenum,...,0} {
\foreach \lon in{0,...,\lonnum} {
\elemcube{\latnum}{\lon}{\time}
}
}
\node[\mycolor,anchor=west] at (0,\lonnum+1,0.2) {\tiny $0$};
\node[\mycolor,anchor=west] at (0,\lonnum+1.8,0.2) {\tiny 1970 Jan 01};
\end{mytikz}
\end{document}
I produce PDF with pdflatex -synctex=1 -interaction=nonstopmode -shell-escape test.tex
tikzexternal: picture has been externalized. This text is required to avoid empty oats.
In my original document I have my pictures inside the document.