[OS X TeX] pstricks in pdftex and xetex
Bruno Voisin
bvoisin at mac.com
Tue Oct 12 14:37:44 CEST 2004
Le 12 oct. 04, à 14:23, Jan Eden a écrit :
>> Ross Moore wrote on 12.10.2004:
>>
>> Including pdf images is certainly possible with XeTeX. Please
>> provide an example file that is giving you difficulty.
>>
> Of course it is possible. It just does not work when using the beamer
> class and pgf as the underlying graphics package. I always get an
> option clash when using [xetex] and the xetex errors when leaving it
> out (as in \usepackage{graphicx}).
Did you try what I suggested in an earlier message, namely creating
custom files graphics.cfg and color.cfg, for example in
~/texmf/tex/latex/config/, based on copying the default ones from
/usr/local/teTeX/share/texmf.tetex/tex/latex/config/color.cfg and
/usr/local/teTeX/share/texmf.tetex/tex/latex/config/graphics.cfg, and
replacing in them:
% 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
by
% 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
The default commands select automatically the option [pdftex] when
pdfTeX is run, and [dvips] otherwise (to the extent that you won't run
VTeX on a Mac). Since pgf.sty, as available at
<ftp://ftp.cam.ctan.org/tex-archive/graphics/pgf/>, starts with:
\RequirePackage{graphicx}
then when you read it with XeTeX the package graphicx is loaded with
the [dvips] option because no explicit option is specified, and then
when later in your LaTeX file the instruction
\usepackage[xetex]{graphicx} is found an option clash occurs.
The modified graphics.cfg and color.cfg have the effect that the option
[pdftex] is selected automatically when pdfTeX is run, [xetex] when
XeTeX is run, and [dvips] only otherwise. Hence reading pgf.sty with
XeTeX should load the graphicx package with the option [xetex] from the
start, and no option clash should occur afterwards.
HTH,
Bruno
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives
mailing list