[XeTeX] Handling of parentheses in graphical file names

Bruno Voisin bvoisin at mac.com
Tue May 23 11:31:51 CEST 2006

Le 23 mai 06 à 10:43, Jonathan Kew a écrit :

> The appropriate fix is probably a modification in xetex.def to ensure
> that it properly quotes the name; you can safely use parentheses as
> part of a filename if the whole name is quoted with "..." or '...'.

Alas, this doesn't work:

- \includegraphics{(iii)403} produces the figure prefixed with  
"403.pdf 403.png 403.jpg".

- \includegraphics{(iii)403.jpg} produces the figure prefixed with  

- \includegraphics{"(iii)403"} returns the error message:

> ! LaTeX Error: File `"(iii)403"' not found.
> See the LaTeX manual or LaTeX Companion for explanation.
> Type  H <return>  for immediate help.
> ...
> l.224 ...ox{75mm}{!}{\includegraphics{"(iii)403"}}

- \includegraphics{"(iii)403.jpg"} returns the error message:

> ! Unable to load picture or PDF file '""(iii)403.jpg""}}'.
> <to be read again>
>                    \setbox
> l.224 ...5mm}{!}{\includegraphics{"(iii)403.jpg"}}

Same with simple quotes. As for the succession of double, simple or  
"inclined" quotes in the error messages, I've no idea what this means.

It seems the problem arises because the graphical files are located  
in another directory. In pdfLaTeX always, and in XeLaTeX provided the  
file names do not include parentheses, things work when setting  
\graphicspath through:


But in XeLaTeX, when the file name includes parentheses, it seems  
that it is necessary to specify the full (relative) path of the  
graphical file, namely here (I checked this works):


This seems to indicate that, consistently with the figure inclusion  
messages appearing in the console, such as:

> <use  "../Figures/JPG/perspdip010.jpg">

then (1) the file name is put automatically inside double quotes and  
(2) \graphicspath interacts inconsistently with this mechanism.

Definitely an issue for xetex.def!

Bruno Voisin

More information about the XeTeX mailing list