When compiling via latexmk with nontrivial $aux_dir, the ___.gnuplot file is put under aux_dir. Because the invocation of gnuplot tries to find it in project root directory, it can not produce ___.table.
There is a following workaround, namely manually changing directory to aux_dir before calling gnuplot
Is there a possibility to implement something like remembering full path of ___.gnuplot file (or relative path to root of project), and automatically changing directory before invoking gnuplot? This would have the advantage of automatically working with packages like robust-externalize, which can put (some) files in different directories.
Brief outline of the bug
When compiling via
latexmk
with nontrivial$aux_dir
, the___.gnuplot
file is put underaux_dir
. Because the invocation ofgnuplot
tries to find it in project root directory, it can not produce___.table
.There is a following workaround, namely manually changing directory to
aux_dir
before callinggnuplot
However, this is rather impractical.
Is there a possibility to implement something like remembering full path of
___.gnuplot
file (or relative path to root of project), and automatically changing directory before invokinggnuplot
? This would have the advantage of automatically working with packages likerobust-externalize
, which can put (some) files in different directories.Minimal working example (MWE)