[XeTeX] \includegraphics problem

Jonathan Kew jonathan_kew at sil.org
Fri Aug 25 09:22:33 CEST 2006


On 25 Aug 2006, at 1:18 am, Ross Moore wrote:

>
> On 25/08/2006, at 9:37 AM, Stephen Moye wrote:
>
>> I am having a problem with \includegraphics. If I TeX this file:
>
>> This is XeTeX, Version 3.141592-2.2-0.995 (Web2C 7.5.5)
>
>> (./xetex.def
>> ...supports rotation and scaling
>> ))) (./grxtest.aux)
>> ! Unable to load picture or PDF file 'AMSseal.pdf}'.
>
> Ouch.   That included '}' looks ominous.
>
> Haven't there been recent internal changes in XeTeX with regard
> to determining what is a file-name, so as to make it easier
> to allow spaces in names ?

Yes, there have.

> Perhaps this is a side-effect of such changes, which now affects
> LaTeX packages that need to construct file-names "on-the-fly"
> from other pieces (e.g.  extensions and \graphicspath etc.).

Yes, it is.

> If so, then some rethinking may be needed, to retain
> backwards-compatibility.

The xetex.def that is included with xetex has been updated so that (I  
believe) it works correctly.

Stephen, I notice you have a local copy (./xetex.def); that's why  
you're seeing this problem. Try removing it, so that the latest  
xetex.def from the distribution is used instead.

The issue is that a "quoted filename" (for \input, \openin,  
\XeTeXpicfile, etc) is no longer necessarily terminated at the  
closing quote; you need a space (or \relax, I guess) to terminate it,  
just as if it were an unquoted name. This can be a little surprising  
sometimes, but matches the behavior of pdftex, and is necessary when  
macro packages want to take a quoted name (e.g., \jobname with a  
space in it) and append extensions (like .toc, .aux, etc).

xetex.def previously had lines such as:

    \edef\picfileargs{ \XeTeXquote#1\XeTeXquote\picpage}%

which used to be OK, because the quotes around #1 ensured it was  
terminated at the "expected" place; but this now needs to be changed to:

    \edef\picfileargs{ \XeTeXquote#1\XeTeXquote\space\picpage}%

As mentioned, the latest shipping xetex.def includes these updates  
(which is why the test file worked fine for Akira).

JK



More information about the XeTeX mailing list