[OS X TeX] pstricks in pdftex and xetex
Bruno Voisin
bvoisin at mac.com
Tue Oct 12 17:45:40 CEST 2004
Le 12 oct. 04, à 17:25, Jonathan Kew a écrit :
> On 12 Oct 2004, at 1:12 pm, Ross Moore wrote:
>
>> It should indeed be possible to use {ps4pdf}, but perhaps not yet
>> "out-of-the-box".
>> When Jonathan fixes the reported \write18 problem, this should be
>> tested again, and a full workable solution devised, if necessary.
>
> \write18 should be fixed now, in XeTeX 0.88 (released today); so if
> anyone with a good understanding of these packages wants to
> investigate how to configure them for XeTeX, there's at least a chance
> of making things work.
Regarding the pgf package (where pgf stands, ironically enough, for
"Portable Graphics Format"), I have been having a quick look at
pgf.sty. Sure enough, it can't work with XeTeX. There are only two
options, one, [pdf], producing PDF output and using instructions like:
\DeclareOption{pdf}
{
% Driver commands for pdf
\ifx\pdfximage\@undefined% less than version 14
\let\pdfxform\pdfform
\let\pdflastxform\pdflastform
\let\pdfrefxform\pdfrefform
\fi
which are specific to pdfTeX, and the other, [postscript], producing
PostScript output and using instructions like:
\DeclareOption{postscript}
{
% Driver commands for postscript
\def\pgfsys at lineto#1#2{\pgf at ps{#1 #2 lineto}}
\def\pgfsys at moveto#1#2{\pgf at ps{#1 #2 a}}
\def\pgfsys at closepath{\pgf at ps{closepath}}
[...]
\def\pgfsys at openpicture{\special{ps: }%
\special{ps::[begin]}\pgf at ps{pgfo}}
\def\pgfsys at closepicture{\pgf at ps{pgfc}\special{ps::[end]}}
which are specific to dvips (especially the \special syntax).
More of the same:
\ifcase\pdfoutput
\ExecuteOptions{postscript} % default if no pdf
\else
\ExecuteOptions{pdf} % default if pdf
\fi
implies the [postscript] option is used whenever \pdfoutput (specific
to pdfTeX) is undefined. And:
\def\pgf at pdf#1{{\edef\a{{#1}}\pdfliteral\a}}
\def\pgf at ps#1{{\edef\a{{ps:: #1}}\special\a}}
which seem to be the most important commands for PDF and PS output,
respectively, use pdfTeX- and dvips-specific instructions,
respectively.
Thus, though advocated as portable, producing PS or PDF graphics at
will, the package pgf.sty relies actually on two specific TeX drivers,
dvips for PS and pdfTeX for PDF.
Moreover, the fact that the code associated with the options [pdf] and
[postscript] is contained inside pgf.sty instead of being delegated to
separate definition files, say pdftex.def and dvips.def, respectively,
indicates that the package was designed only with these two drivers in
mind.
Not that the graphical concepts and language defined by pgf.sty aren't
great, though. It looks quite powerful. But it would require
programming skills in PS and PDF far beyond mine for adapting it to
XeTeX. (Ross?)
Bruno Voisin
--------------------- 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