I am using the TikZ externalization to speed up the compilation process and to have the eps files for the admission of the article which I'm writing.
So I have lines like
\begin{figure}
\input{../path/filename.tex}
\end{figure}
, which I want to replace with
\begin{figure}
\includegraphics{../path/filename.eps}
\end{figure}
when I submit my article. The problem is that the TikZ externalization changes both 'path' and 'filename', so that I would have to use
\begin{figure}
\includegraphics{some_other_filename.eps}
\end{figure}
when I use
\usetikzlibrary{external}
\tikzset{external/system call={lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource";pdftops -eps "\image".pdf;}}
\tikzexternalize
in the preamble of the document. I do not know yet how to make a bash script to process this change, but it would already be easier if the original path and filename would be maintained.
UPDATE. I just found in the PGFplots manual that one can change the filename with the command
\begin{figure}
\tikzsetnextfilename{path/nameyouchoose}
\input{../path/filename.tex}
\end{figure}
However, it seems impossible to use a relative path, something like
\begin{figure}
\tikzsetnextfilename{../path/nameyouchoose}
\input{../path/filename.tex}
\end{figure}
How can I use a relative path?
\tikzexternalize[prefix=../path/]
, and\tikzsetnextfilename{figure}
instead of\tikzsetnextfilename{../path/figure}
?