[pdftex] PSTricks

George N. White III WhiteG at mar.dfo-mpo.gc.ca
Thu Jan 17 09:12:22 CET 2002


On Wed, 16 Jan 2002, John S. Dey wrote:

> First thanks to all the developers of pdftex.  Great product.
>
> I have discovered "The Latex Graphics Companion" and have been trying out
> some of the techniques presented using pdflatex.  I haven't been able to
> get some of the color examples to work.  Could someone suggest changes to,
> as an example, 4-5-14, which uses pstcol and pst-char packages to place a
> background color in a character font while the border of the character has
> a different color.  The example works with the dvips driver but not
> pdflatex.  I am using the standard pdftex that comes with RH7.1 Linux.  I
> have updated the pdftex.def file.
>
> Is pdftex compatible with all the packages used in the book.  And if not,
> is there information available that describes limitations.  I have seen
> that some enterprising sole has worked up the Metapost examples.
>
> Any help would be greatly appreciated.  Thanks.

It is useful to consider the differences between PostScript, a Turing
complete programming language, and PDF, which is a document description
"language" that happens to use the PostScript imaging model. PStricks uses
\specials to pass PostScript language commands to do calculations
when the document is rendered using a PostScript interpreter.
With PDFtex, such calculations must be done when the PDF file is
created so the results can be put into the PDF file. In practice, this
means you have to run some sort of interpreter, either PostScript (e.g.,
ghostscript) or metapost while you are formatting with pdftex.

Metapost produces PostScript that does not require runtime calculations,
so can be translated directly into PDF using TeX macros.  The graphics
package has this capability.

You can use PStricks to create PS files, translate these to PDF, and
embed the results in pdftex documents.  This can be automated so it
is relatively transparent.

Pdftex has reliable means to embed one-page pdf documents.  While
there is support for embedding images (PNG, TIFF, JEPG, etc. depending
on how your version was compiled), converting graphics to PDF
independently of pdftex is the most robust approach.  Many tools
now provide PDF output, including Adobe Illustrator and Photoshop,
ImageMagick, and of course Adobe Acrobat Distiller or ghostscript.

In the days before PDF, I used PStricks routinely, but now I prefer
MetaPost for most purposes where I would have used PStricks. There have
been several significant developments since Graphics Companion was
written: Denis Roegel's metaobj and Hans Hagen's metafun are worth
investigating. Both have good manuals that can be downloaded as pdf files.

-- 
George N. White III <gnw3 at acm.org> Bedford Institute of Oceanography





More information about the pdftex mailing list