[OS X TeX] PSTricks in Context

Wolfgang Schuster schuster.wolfgang at googlemail.com
Mon Apr 27 04:37:41 EDT 2009


Dear Mr. Arnold,

questions regarding ConTeXt and modules for ConTeXt are better asked
on the ConTeXt mailing list and if you would have done this I could
have given you the following answer.


The default output format for ConTeXt is PDF since about three years
while PSTricks needs the files in PostScript format which requires
a intermediate DVI file. To get a DVI file with ConTeXt you could set
it either with \setupoutput[dvi] in your document or you use the
backend switch on the command line, because the code between the
PSTRICKS-environment is written in a external file which is converted
to dvi, ps and pdf you have to do this in the pstric-module and not
in your document.


In my own installation I made a copy from the file m-pstric.tex and
added the \dostartTEXapplication macro from the page-app.tex file
where I now changed the line

   \executesystemcommand{texexec --once --batch \bufferprefix 
\@@texapp.tex}%

to

   \executesystemcommand{texexec --once --batch --backend=dvips  
\bufferprefix\@@texapp.tex}%

and switched from ps2pdf command to pstopdf

   %\executesystemcommand{ps2pdf \bufferprefix\@@texapp.ps  
\bufferprefix\@@texapp.pdf}%
   \executesystemcommand{texmfstart pstopdf \bufferprefix\@@texapp.ps  
\bufferprefix\@@texapp.pdf}%

to get a cropped page for the image.


As a last change I added the following two definition to m-pstrics.tex
because pstricks.tex use them but are not defined in ConTeXt:

   \letvalue{@unused}\plussixteen
   \letvalue{alloc@}\gobblefivearguments


After these changes I was able to produce PSTricks images in ConTeXt
but people had use never given enough time on the ConTeXt list to answer
their questions and fix the problem and so PSTricks support is broken
since a long time and this will not change.


Best regards,
Wolfgang Schuster




More information about the MacOSX-TeX mailing list