[XeTeX] graphics inclusion

Jonathan Kew jonathan_kew at sil.org
Sat Dec 8 22:40:14 CET 2007

On 8 Dec 2007, at 10:59 am, Guy wrote:

> Hi and thanks for the help.  I think it must be a basic configuration
> problem.  The same minimal file will compile perfectly as a pdf with
> pdflatex but just show an empty box where the figure should be with
> latex in a dvi file, and just an empty space in place of the figure
> with xelatex.  The error with xelatex is:
>
>> ! Unable to load picture or PDF file 'srikanthacrop.pdf'.
>>                    \unhbox
>
> Here is the minimal file (1st 2 lines removed for latex and pdflatex):
>
> %&program=xelatex
> %&encoding=UTF-8 Unicode
> \documentclass[10pt]{article}
> \usepackage{graphicx}
> \usepackage{fontspec,xltxtra,xunicode}
> \defaultfontfeatures{Mapping=tex-text}
> \setromanfont[Mapping=tex-text]{Gentium}
> \begin{figure}[htp]
> \includegraphics[scale=0.8]{srikanthacrop}
> \caption{srikanthacrop}
> \end{figure}
> \end{document}
>
> (I have both an .eps and a .pdf file of my graphic in the local
> directory.) Do I need to specify a particular output driver for latex
> / xetex?  I'm using the TeXLive implementation from the Ubuntu
> repositories.  Thanks again for the assistance.

That certainly looks like it should work. Could you show us the
complete .log file output of the run?

Have you tried different PDF files, especially files created by a
version?) that prevents xetex from reading it successfully.

The other possibility is that the Ubuntu package you're using has a