Edit: I think I found the issue: GNUplot adds a to the second timestamp to the top of the *.tex file it generates, so of course latexmk thinks it has changed. %% 2021-01-18 11:32:42 AM
I usually use latexmk to compile my documents as that saves a lot of manual work figuring out how many times I need to compile it. However, if I use gnuplottex with it, every single run it says Changed files, or newly in use since previous run(s): 'loop-gnuplottex-fig1.tex'
Which...shouldn't be true? It might be being written every time, but it isn't changed. Is there a way around this, so that minor changes to my document don't trigger five runs of pdflatex, as that takes a very long time on my desktop, and an interminable one on my laptop.
Here is a MWE that triggers this issue. It is not as easy to compile as I would like as one needs to install Gnuplot for it to work, then copy three files from GNUplot's \share\texmf\tex directory structure to somewhere TeX can find them. (It appears at one point this was supposed to happen automatically if you installed LaTeX after GNUplot based on the config files in GNUplot).
Also, this MWE only works on Windows: You must unset the "miktex" option if compiling it on a Postix system.
\documentclass{article}
\usepackage{shellesc}
\usepackage{gnuplot-lua-tikz}
%Note, you need GNUplot installed for this to compile,
%and need to copy three files from GNUplot to somewhere TeX can find them!
\usepackage[miktex]{gnuplottex} %MiKTeX means windows since they can't do basic testing, unset if on *nix
\begin{document}
\begin{gnuplot}[terminal=tikz, terminaloptions=color]
plot sin(x)
\end{gnuplot}
\end{document}
I SUSPECT that this issue might be related to this question, but there is no worked examples, so I'm not exactly sure about how to set up my document to use what they are talking about, but it sounds like it bypasses this package entirely and speeds compilation a lot.