[tex-live] Graphics Inclusion Problem.

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Thu Oct 14 14:43:21 CEST 2010

Herbert Schulz <herbs at wideopenwest.com> wrote:

> This was originally brought up on the xetex list since it was related
> to a similar problem there which has been solved. It is really off
> topic for that list and, possibly, more on topic here.
>
> Given the file abc&def.eps if you compile the file
>
> \documentclass{article}
> \usepackage{graphicx}
> \begin{document}
> \includegraphics{abc&def}
> \end{document}
>
> using pdfltex WITH --shell-escape, i.e., full shell escape, you get an
> error implying a missing quote in the epstopdf.pl call:
>
> **********
> l.6 \includegraphics{abc&def}
>
> ? epstopdf ($Id: epstopdf.pl 18319 2010-05-17 16:34:21Z karl$) 2.16
> !!! Error: Cannot open abc: No such file or directory
> **********

so the shell is forking off a command in response to &

> while the compile runs without error if you use the default restricted
> shell escape, i.e., you don't use the --shell-escape option.

perhaps the assumption is that --shell-escape users know what they're
doing?

anyway, if you surround your zany & character with quotes --
abc"&"def.eps it works ok, but quoting the whole file name prevents
pdflatex from realising that the file needs conversion at all.

> escape backwards in my original comment there) but haven't heard any
> more.
>
> I'm not trying to rush anything but just want an acknowledgement that
> it is a known problem.

well, it plainly is, now.

> (PS: someone else on the xetex list confirmed the problem.)

the effect is not limited to xetex; it happens equally with pdftex