[XeTeX] xelatex does not find pdf graphics ?

Bruno Voisin bvoisin at mac.com
Wed Sep 22 08:49:56 CEST 2004


Le 22 sept. 04, à 08:29, Bruno Voisin a écrit :

> Looking more closely, it seems all the work is done in teTeX's default 
> configuration file 
> /usr/local/teTeX/share/texmf.tetex/tex/latex/config/graphics.cfg, 
> which contains code like:
>
> % Select an appropriate default driver
> \begingroup
>   \chardef\x=0 %
>   % check pdfTeX
>   \@ifundefined{pdfoutput}{}{%
>     \ifcase\pdfoutput
>     \else
>       \chardef\x=1 %
>     \fi
>   }%
>   % check VTeX
>   \@ifundefined{OpMode}{}{%
>     \chardef\x=2 %
>   }%
> \expandafter\endgroup
> \ifcase\x
>   % default case
>   \ExecuteOptions{dvips}%
> \or
>   % pdfTeX is running in pdf mode
>   \ExecuteOptions{pdftex}%
> \else
>   % VTeX is running
>   \ExecuteOptions{vtex}%
> \fi
>
> So what could be done in this case would be to add code for automatic 
> recognition of XeTeX, and have this modified graphics.cfg be inserted 
> in /usr/local/teTeX/share/texmf.tetex/tex/xetex/ at the time XeTeX is 
> installed.

This modification of the above seems to work (namely, recognition of 
XeTeX based on \XeTeXversion being defined):

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

Bruno



More information about the XeTeX mailing list