[XeTeX] graphics inclusion

Guy camatkara at gmail.com
Sat Dec 8 17:59:03 CET 2007


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'.
> <to be read again>
>                    \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.

Guy


On Dec 8, 2007 12:36 AM, Jonathan Kew <jonathan_kew at sil.org> wrote:
> On 7 Dec 2007, at 11:15 pm, Guy wrote:
>
> > Thanks for the responses, Jonathan and Bruno.  The problem is probably
> > very basic; is there any documentation I could read on graphics and
> > XeTeX?  Including my graphic works fine under the graphicx package in
> > latex, but I'm missing something with XeTeX.  I followed the advice
> > below, but still got the same error ("! Unable to load...").  Can I
> > ask the newbie question of what packages or preamble commands, if any,
> > are required to use the \XeTeXpdffile command?  And is there a special
> > option to use when issuing the "xelatex <file.tex>" command?  I tried
> > also "xelatex -no-pdf file.tex" and "xdvipdfmx -v file.xdv," which did
> > produce a pdf, but since there was still the same problem to begin
> > with ("! Unable to load..."), the graphic was not included.  I had the
> > same problem with an otherwise blank article and got the same result,
> > so I'm assuming I'm just missing a basic command or bit of
> > configuration.  Thanks again for the help,
> >
>
> If you're running xelatex, rather than "plain" xetex, just use the
> graphicx package, and it should automatically do the right thing.
> (And if it doesn't, please show us a minimal but complete example of
> a document that fails, so we can try to diagnose the problem.)
>
> For details of the primitive \XeTeXpdffile command, you'd need to
> look at the "XeTeX-notes" document that I think is included in
> TeXLive; try "texdoc XeTeX-notes". But within xelatex, you don't need
> that; just use graphicx.
>
>
> JK
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>


More information about the XeTeX mailing list