[XeTeX] xetex (plain tex) and graphicx
Bruno Voisin
bvoisin at mac.com
Sat Feb 19 20:14:26 CET 2005
Le 19 févr. 05, à 12:48, Éric DÉTREZ a écrit :
> Le 19 févr. 05, à 07:23, Bruno Voisin a écrit :
>
>> Normally it can. It's difficult to diagnose without knowing exactly
>> which LaTeX packages you used,
>
> I don't use laTex, I just use plain tex with graphics.
Thus you're not using the standard LaTeX graphicx package inside
/usr/local/teTeX/share/texmf.tetex/tex/latex/graphics/, but the
modified plain TeX version inside
/usr/local/teTeX/share/texmf.tetex/tex/plain/graphics/.
What does the modification do for graphicx.tex? Let's see:
% Plain TeX interface to graphicx package.
% David Carlisle
\input miniltx
\def\Gin at driver{dvips.def}
\input graphicx.sty
\resetatcatcode
First it loads the file miniltx.tex emulating in plain TeX a basic set
of LaTeX commands, then it selects the [dvips] option (= loads
dvips.def) for the LaTeX package graphicx.sty, and finally it loads
this package.
Same holds for color.tex:
% Plain TeX interface to color package.
% David Carlisle
\input miniltx
\makeatletter
\def\Gin at driver{dvips.def}
\input color.sty
\resetatcatcode
which loads, in plain TeX, the LaTeX package color.sty with the [dvips]
option.
Personally I wouldn't trust the modifications to be robust enough for
allowing use of graphicx.tex and color.tex in plain TeX in all
situations, and I would either use the graphicx and color packages
inside LaTeX or the driver-specific syntax (i.e. specific to dvips,
pdfTeX or XeTeX) inside plain TeX.
>> with which options and in which order.
>
> so, no options seems available.
>
>> Did you specify the [xetex] option to the {graphicx} package
>> explicitly,
>
> How could I do it ?
Normally, as explained above, you can't. I see two possible remedies
though, assuming you've installed a recent TeX i-Package and thus your
file /usr/local/teTeX/share/texmf/web2c/texmf.cnf contains:
% XeTeX
TEXINPUTS.xelatex = .;$TEXMF/{xetex,tex}/{xetex,latex,generic,}//
TEXINPUTS.xetex = .;$TEXMF/{xetex,tex}/{xetex,plain,generic,}//
which defines which TeX directories are searched when XeTeX is used and
in which order.
First solution: create inside ~/Library/texmf/tex/xetex/latex/graphics/
a file graphics.cfg containing:
\ExecuteOptions{xetex}
This should make sure that when graphicx.sty is read the file xetex.def
is read automatically, superseding the choice of dvips.def made in
graphicx.tex.
Second solution: create inside
~/Library/texmf/tex/xetex/plain/graphics/ a copy of graphicx.tex, and
replace the line:
\def\Gin at driver{dvips.def}
by:
\def\Gin at driver{xetex.def}
Finally another solution would be to use XeTeX's graphic insertion
primitives instead of the graphicx package. Namely, to replace
$$\includegraphics[width= 10cm]{Fourier5.pdf}$$
by:
$$\hbox{\XeTeXpdffile "Fourier5.pdf" width 10cm}$$
> I didn't find /Library/teTeX/ directory .
>
> I created a /Library/texmfl/tex/xetex/ directory
> then /Library/texmfl/tex/xetex/config in wich i created a file
> graphics.cfg with the line
> ***********************
> \ExecuteOptions{xetex}
> ***********************
> But this didn't change anything.
This should work (see above). But I don't understand what you mean
about /Library/teTeX/ and /Library/texmfl/ (why the "l"?). A directory
Library/texmf/ should exist inside your home directory, not at the root
level of your hard drive, namely it should be ~/Library/texmf/ not
/Library/texmf/. The directory /Library/teTeX/ at the root level of
your hard drive should be an alias to the invisible directory
/usr/local/teTeX/, which contains everything installed by the TeX
i-Package inside i-Installer. Did you install TeX without using
i-Installer? If so, I can't be of much help.
Bruno Voisin
More information about the XeTeX
mailing list