0

To reproduce the error:

  1. Create b.eps file that contains anything. For example, the following command will create b.eps:

    asy -noV -o b -c 'draw((0, 0)--(1, 1));'
    
  2. Create folder ./d/, put b.eps to it.

  3. Create ./a.tex in the current directory with content:

    \documentclass{article}
    \usepackage{graphicx}
    \begin{document}
    \graphicspath{{d/}}
    \includegraphics{b}
    \end{document}
    
  4. Compile with pdflatex --shell-escape --recorder --output-directory=d/ a.tex.

  5. 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.

user202729
  • 7,143

0 Answers0