[XeTeX] includegraphics and filenames with spaces

Álex Bueno lists+tex+xetex at bueno.imap.cc
Fri Feb 8 13:58:53 CET 2008


Andreas,

Thanks very much for your reply. Sorry I didn't notice your emails  
until now; I posted this later to the mactex list where conversation  
ensued and wasn't looking here.

I changed \IfFileExists{\filename at area\filename at base#1}% in  
graphics.sty to \IfFileExists{"\filename at area\filename at base#1"}%
But unfortunately I get this error:

Runaway argument?
'exif copy.tiff' \edef \Gin at ext {\Gin at sepdefault \filename at ext }\ifx  
\ETC.
! File ended while scanning use of \@tempa.
<inserted text>
                 \par
<*> spaces.tex

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Emergency stop.
<*> spaces.tex

The pdf prints in huge letters
copy".tiff "

I'm guessing that I've quoted out the wrong thing, but other  
arrangements within the IfFileExists I tried don't work either.

Best,
Alex

On 07 Feb 2008, at 8:23 pm, Andreas Matthias wrote:

> Andreas Matthias wrote:
>
>> Álex Bueno wrote:
>>
>>> As far as I've read on this list, it seems xetex should allow spaces
>>> in filenames of included graphics. Yet I can't get this to work
>>> properly.
>>
>>> 		\includegraphics[width=3in]{foo bar.tiff}
>>
>>> This includes the image, but I get this text next to the image:
>>>
>>> bar.tiff bar.bb
>>
>>
>> Same here. I just stumbled across it.
>
> Well, it simply fails because of an inadequate \IfFileExists.
> Quoting the file name in the definition of \IFfileExists would
> fix the problem. -- Who was talking about a modified xelatex
> format?
>
>
> Ciao
> Andreas
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex



More information about the XeTeX mailing list