[XeTeX] No includegraphics?

Hans van Maanen hans at vanmaanen.org
Sun Nov 23 16:18:59 CET 2008


Hi all,

I'm stumped. I can't get pictures in my document... This is a simple  
test I use, straight from Will Robertson Figures and Graphics:

\documentclass[article]{memoir}
\usepackage{graphicx}
\begin{document}
Figures are placed as floats.
\begin{figure}[hbtp]
  \centering
  \includegraphics[width=0.9\textwidth]{kamikaze2.jpg}
  \caption{Kamikaze!}
\end{figure}
See the document.
\end{document}

It produces correct output, and the following console:

> This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
> \write18 enabled.
> %&-line parsing enabled.
> entering extended mode
> (./fengrobertson.tex
> LaTeX2e <2003/12/01>
> Babel <v3.8l> and hyphenation patterns for english, usenglishmax,  
> dumylang, noh
> yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek,  
> ibycus, ar
> abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech,  
> danish, dutc
> h, esperanto, estonian, farsi, finnish, french, galician, german,  
> ngerman, mono
> greek, greek, hungarian, icelandic, indonesian, interlingua, irish,  
> italian, la
> tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese,  
> romanian, rus
> sian, sanskrit, serbian, slovak, slovenian, spanish, swedish,  
> turkish, ukenglis
> h, ukrainian, uppersorbian, welsh, loaded.
> (/Users/hans/Library/texmf/tex/latex/memoir/memoir.cls
> Document Class: memoir 2002/11/22 v1.3a configurable document class
> (/Users/hans/Library/texmf/tex/latex/memoir/mem10.clo)
> (/Users/hans/Library/texmf/tex/latex/memoir/mempatch.sty
> mempatch.sty 2003/09/16 v1.8 Patches for memoir class v1.3a
> )) (/Users/hans/Library/texmf/tex/latex/graphics/graphicx.sty
> (/Users/hans/Library/texmf/tex/latex/graphics/keyval.sty)
> (/Users/hans/Library/texmf/tex/latex/graphics/graphics.sty
> (/Users/hans/Library/texmf/tex/latex/graphics/trig.sty)
> (/Users/hans/Library/texmf/tex/latex/texlive/graphics.cfg)
> (/Users/hans/Library/texmf/tex/latex/graphics/pdftex.def)))
> (./fengrobertson.aux)
> (/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex
> [Loading MPS to PDF converter (version 2006.09.02).]
> ) <kamikaze2.jpg, id=1, 277.78781pt x 258.9675pt> <use  
> kamikaze2.jpg> [1{/usr/l
> ocal/texlive/2008/texmf-var/fonts/map/pdftex/updmap/pdftex.map} <./ 
> kamikaze2.jp
> g>] (./fengrobertson.aux) )</usr/local/texlive/2008/texmf-dist/fonts/ 
> type1/blue
> sky/cm/cmr10.pfb>
> Output written on fengrobertson.pdf (1 page, 56835 bytes).
> SyncTeX written on fengrobertson.synctex.gz
> Transcript written on fengrobertson.log.



However, if I use almost the same document:

\documentclass[article]{memoir}
\usepackage{graphicx}
\usepackage{fontspec, xunicode, xltxtra}
\setmainfont[Mapping=tex-text]{Times}
\begin{document}
Figures are placed as floats.
\begin{figure}[hbtp]
  \centering
  \includegraphics[width=0.9\textwidth]{kamikaze2.jpg}
  \caption{Kamikaze!}
  \label{fig:pdf}
\end{figure}
See the document.
\end{document}

... and compile it in XeLatex, I get no output, and the following  
console:

> This is XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)
> %&-line parsing enabled.
> entering extended mode
> (./fengvanmaanen.tex
> LaTeX2e <2003/12/01>
> Babel <v3.8l> and hyphenation patterns for english, usenglishmax,  
> dumylang, noh
> yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek,  
> ibycus, ar
> abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech,  
> danish, dutc
> h, esperanto, estonian, farsi, finnish, french, galician, german,  
> ngerman, mono
> greek, greek, hungarian, icelandic, indonesian, interlingua, irish,  
> italian, la
> tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese,  
> romanian, rus
> sian, sanskrit, serbian, slovak, slovenian, spanish, swedish,  
> turkish, ukenglis
> h, ukrainian, uppersorbian, welsh, loaded.
> (/Users/hans/Library/texmf/tex/latex/memoir/memoir.cls
> Document Class: memoir 2002/11/22 v1.3a configurable document class
> (/Users/hans/Library/texmf/tex/latex/memoir/mem10.clo)
> (/Users/hans/Library/texmf/tex/latex/memoir/mempatch.sty
> mempatch.sty 2003/09/16 v1.8 Patches for memoir class v1.3a
> )) (/Users/hans/Library/texmf/tex/latex/graphics/graphicx.sty
> (/Users/hans/Library/texmf/tex/latex/graphics/keyval.sty)
> (/Users/hans/Library/texmf/tex/latex/graphics/graphics.sty
> (/Users/hans/Library/texmf/tex/latex/graphics/trig.sty)
> (/Users/hans/Library/texmf/tex/latex/texlive/graphics.cfg)
> (/Users/hans/Library/texmf/tex/latex/graphics/dvips.def)))
> (/usr/local/texlive/2008/texmf-dist/tex/xelatex/fontspec/fontspec.sty
> (/Users/hans/Library/texmf/tex/latex/ifxetex/ifxetex.sty)
> (/Users/hans/Library/texmf/tex/latex/tools/calc.sty)
> (/Users/hans/Library/texmf/tex/latex/xkeyval/run/xkeyval.sty
> (/Users/hans/Library/texmf/tex/latex/xkeyval/run/xkeyval.tex))
> (/Users/hans/Library/texmf/tex/latex/base/fontenc.sty
> (/usr/local/texlive/2008/texmf-dist/tex/xelatex/euenc/eu1enc.def)
> (/usr/local/texlive/2008/texmf-dist/tex/xelatex/euenc/eu1lmr.fd))
> fontspec.cfg loaded.
> (/usr/local/texlive/2008/texmf-dist/tex/xelatex/fontspec/ 
> fontspec.cfg))
> (/usr/local/texlive/2008/texmf-dist/tex/xelatex/xunicode/xunicode.sty)
> (/usr/local/texlive/2008/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
> (/usr/local/texlive/2008/texmf-dist/tex/latex/etex-pkg/etex.sty)
> (/Users/hans/Library/texmf/tex/latex/base/fixltx2e.sty)) (./ 
> fengvanmaanen.aux)
>
> ! LaTeX Error: Cannot determine size of graphic in kamikaze2.jpg (no  
> BoundingBo
> x).
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type  H <return>  for immediate help.
> ...
>
> l.15 ...aphics[width=0.9\textwidth]{kamikaze2.jpg}
>
> ?



And finally, if I use \documentclass{article} instead of memoir with  
Will's Latex file, I get an error

> ! LaTeX Error: No counter 'lastsheet' defined.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type  H <return>  for immediate help.
> ...
>
> l.3 \setcounter{lastsheet}{1}

I'm on a Mini, 10.5.5, TexLive 2008. Something rotten?

Please help!

Hans van Maanen
Amsterdam


More information about the XeTeX mailing list