To reproduce the error:
Create
b.epsfile that contains anything. For example, the following command will createb.eps:asy -noV -o b -c 'draw((0, 0)--(1, 1));'Create folder
./d/, putb.epsto it.Create
./a.texin the current directory with content:\documentclass{article} \usepackage{graphicx} \begin{document} \graphicspath{{d/}} \includegraphics{b} \end{document}Compile with
pdflatex --shell-escape --recorder --output-directory=d/ a.tex.See error.
I believe the error happens because: when the graphics is in the output directory, LaTeX is unable to correctly determine the path to the .eps file relative to the current directory,
in order to pass to epstopdf --- consequently, it cannot be converted to pdf.
Is it possible for this issue to be fixed?
As a workaround, it is possible to explicitly specify the path to the graphics:
\includegraphics{d/b}
But I'd like to know if there's a proper solution as well.
The context is that I'm using asypictureB package with some patches to make it work with arbitrary --output-directory,
and the .asy file is of course created in output-directory, which makes the .eps also generated there.
--output-directorycomplicates almost every aspect of tex processing, simply not using it is always my recommendation – David Carlisle Feb 01 '24 at 09:23output-directory, most packages (that involves shell-escape) does not supportoutput-directorydifferent from the current directory, and consequently it's poorly supported nowadays. – user202729 Feb 01 '24 at 09:25