[XeTeX] xelatex does not find pdf graphics ?

Bruno Voisin bvoisin at mac.com
Wed Sep 22 01:12:21 CEST 2004

Le 21 sept. 04, à 23:58, Jonathan Kew a écrit :

> On 21 Sep 2004, at 9:17 pm, Michael Gedalin wrote:
>> I tried to include a pdf graphics using
>> \usepackage[xetex]{graphicx}
>> ...
>> \includegraphics{filename.pdf}
>> The file resided in the same directory where all my style files are. 
>> Usual latex/pdftex found the file without problem.
> XeTeX doesn't use search paths to look for graphics files; it simply 
> looks for the name as given, relative to the current directory. So 
> unless the graphicx package has some way of prefixing other paths to 
> the name, it wouldn't be found.

In my case \graphicspath, which is the way the graphicx package sets 
these prefixes, works in XeLaTeX. For example I'm using currently:


> From your report, I'm guessing that pdfTeX uses a kpathsearch function 
> to locate graphics files, similarly to how .tex input files, .sty 
> files, etc., are located. I should probably consider adding similar 
> path-searching to the \XeTeXpicfile and \XeTeXpdffile commands. How do 
> others feel about this....any comments?

I think that's a useful functionality. For example, my department has a 
letterhead format (a Word template) for which I created plain TeX and 
LaTeX lookalikes, defined by files legiletter.tex and legiletter.cls, 
both inputting a file legi150.jpg. On my PowerBook these all reside in 

I just checked that in XeTeX this does not work, in that I need to put 
a copy of the logo along with each letter using this class 

In the meantime, regarding this problem as well as that of the original 
poster, could a temporary (dirty) fix be to write a file graphics.cfg 
making known to XeTeX some of the most obvious directories for storing 

BTW (this one is for Ross more than Jonathan), I think (not sure) that 
the graphics package does not recognize automatically that it is used 
with XeLaTeX, contrary to what is the case for TeX or pdfTeX: it seems 
that with XeLaTeX you need to write explicitly 
\usepackage[xetex]{graphics} whereas for LaTeX or pdfLaTeX you just 
need to write \usepackage{graphics} instead of 
\usepackage[dvips]{graphics} or \usepackage[pdftex]{graphics} 
explicitly. This makes writing classes or packages that can be used 
indifferently with LaTeX, pdfLaTeX or XeLaTeX more difficult. Is it 
possible (technically or time-wise) that this functionality be added to 
some future release of the graphics package for XeTeX?

BTW2 (for Ross or Jonathan?), I just comme across an error "Error 
creating cg colorspace from csync profile" which I think arises at the 
time xvd2pdf is working:

Document Class: legiletter 2002/02/15 v5.0 LEGI letter class
Document Class: letter 1999/04/29 v1.2z Standard LaTeX document class
...supports rotation and scaling
)) (/usr/local/teTeX/share/texmf.local/tex/xetex/color.sty
<use  "legi150.jpg">)
(./letsampl-latex.aux) [1] (./letsampl-latex.aux [2])Error creating cg 
colorspace from csync profile )
Output written on letsampl-latex.pdf (2 pages).
Transcript written on letsampl-latex.log.

Unfortunately I don't have time to investigate this or provide a 
reduction or reproducible example. In that document colors are defined 
like this:


and used like that (sorry for the LaTeX atrocity!):

             \color{darkblue}\bbaddfont LEGI}} &
           \baddfont\fromname \\

Is it linked to color.cfg and dvipsnam.def being apparently read by 

HTH nonetheless,


More information about the XeTeX mailing list