[pstricks] Pstricks and pdftex

John Culleton john at wexfordpress.com
Sun Sep 29 21:31:48 CEST 2002


On Sunday 29 September 2002 11:14 am, Sebastian Rahtz wrote:
> On Sun, 29 Sep 2002 10:18:56 -0400
>
> John Culleton <john at wexfordpress.com> wrote:
> > Pdftex and Context open new vistas to the TeX user. Unfortunately
> > they shut the door to the original pstricks. For pdflatex users
> > there is pdftricks.sty. Is there anything the user of pdftex or
> > Context can do to utilize pstricks?
>
> You'll never be able to harness the full power of PSTricks without
> having a full PostScript interpreter in pdftex. You might want to
> look at VTeX, which has such I thing (I gather; I have not tried it).
> What pdftricks does is grab each pspicture, write it out to file, run
> LaTeX on it, run GS on the result, and pull back the resulting PDF.
> This is clever, but not completely general (ie you can't interfere in
> running text). If that approach does not horrify you, rewriting it to
> use your own macros and not depend on LaTeX is a fairly simple
> exercise now that Radhakrishnan has demonstrated it is possible.
> Alternatively, write your own preprocessor to do the same thing.
>
Here are my thoughts, probably erroneous.
1. pdftex is supposedly a superset of plain tex.
2. pdftex can output dvi.
3. Therefore, pdftex should have the capability for putting out
a dvi file with the embedded postscript specials that are generated by
the pstricks macros.

Obviously the above enthymeme is false. I just don't know why it is
false. 

Why not just use plain tex? Because pdftex is better in many ways. The
fact that it bypasses two steps (dvips and ps2pdf) is a minor virtue.
But there are other features that are more important, such as improved
paper size specification, the potential at least of optically
justified margins (not yet fully realized) and so on. 

My need for graphics goes beyond drawing pictures. I like to take a
headline, surround it with a box with rounded ends, and give it a
background. This could be done with Metafun I suppose, based on the
principle that you can do anything with anythng if you work hard
enough at it.

> The Context manuals have plenty of examples of how to do graphics
> using Metapost, so that seems the obvious way to go if you use
> Context. Did PStricks ever work with Context?
>
AFAIK no, but Hans Hagen did make noises about perhaps handling that
feature somewhat like Metapost is handled now, i.e. generate an output
file, run it though Metapost/pstricks, and reincorporate the finished
drawing into the document on a subsequent run. I don't know if this
handles the kind of situation I am referring to, such as doing funky
things with headers, chapter heads etc.   And I have a general problem 
with
Context and (more so) LaTeX in that they are too abstract and
structured. I want someting closer to the actual mechanism, in other
words something like plain tex. 

> Of course, if you want to have real fun, try implementing an SVG
> interpreter using ConTeXt's XML parser, and write "svgtricks".
> Eminently doable, I believe, for someone with a few months to spare.

And of course far more skill than I can muster. Still I will root
around for the right combination, and hope that someone more talented
will address the basic problem.

It would have been nice if Han The Thanh had instead of inventing
pdftex had invented pstex. 

John Culleton




More information about the PSTricks mailing list