[XeTeX] Help with xdvipdfmx and \includegraphics

Bruno Voisin bvoisin at mac.com
Tue May 15 17:48:52 CEST 2007


Le 15 mai 07 à 17:25, Nicola Vitacolonna a écrit :

> On 15/mag/07, at 16:16, Akira Kakuto wrote:
>
>> Solution (2):
>>  \usepackage[xetex]{graphicx}
>>
>>  Then pdf files can be included without .bb files.
>
> I have tried that, but that gives an option clash, i guess because
> beamer already loads graphicx.

Doesn't your TeX distribution include a file graphics.cfg containing  
code similar to (taken from graphics.cfg in MacTeX):

% Select an appropriate default driver
\begingroup
   \chardef\x=0\relax
   % check pdfTeX
   \@ifundefined{pdfoutput}{}{%
     \ifnum\pdfoutput<1 %
     \else
       \chardef\x=1\relax
     \fi
   }%
   % check VTeX
   \@ifundefined{OpMode}{}{%
     \chardef\x=2\relax
   }%
   % check XeTeX
   \@ifundefined{XeTeXversion}{}{%
     \chardef\x=3\relax
   }%
\expandafter\endgroup
\ifcase\x
   % default case
   \def\Gin at driver{dvips.def}%
   \ExecuteOptions{dvips}%
\or
   % pdfTeX is running in pdf mode
   \def\Gin at driver{pdftex.def}%
   \ExecuteOptions{pdftex}%
\or
   % VTeX is running
   \def\Gin at driver{vtex.def}%
   \ExecuteOptions{vtex}%
\else
   % XeTeX is running
   \def\Gin at driver{xetex.def}%
   \ExecuteOptions{xetex}%
\fi

This code ensures that the appropriate option is chosen automatically  
at the time XeLaTeX reads graphics.cfg, unless another option has  
been specified explicitly. This should ensure that the [xetex] option  
is used whenever the graphicx package is loaded, be it when  
processing \usepackage{graphicx} or beforehand when loading the  
beamer class.

Or is beamer imposing an option itself (most likely [dvips], [pdftex]  
or [dvipdfm])?

Bruno Voisin


More information about the XeTeX mailing list