On Mon, Jul 13, 2009 at 11:05 AM, R. Bastian
<rbastian@free.fr> wrote:
What is the sense of \startPSTRICKS ... \stopPSTRICKS ?
A wrapper around \executesystemcommand,
\long\def\dostartPSTRICKS[#1]#2\stopPSTRICKS
{\doifelse{\jobsuffix}{dvi} % will some day move to app as switch
{\hbox{#2}}
{\startTEXapplication[#1]{\usemodule[pstric]}#2\stopTEXapplication}}
for \startTEXapplication see
page-app.tex
\long\def\dostartTEXapplication[#1]#2#3\stopTEXapplication
{\bgroup
\bgroup
\let\f!temporaryextension\c!tex
\setbuffer[\@@texapp]%
\starttext
#2% preamble
\startTEXpage[#1]%
\topskip\zeropoint
\setbox\scratchbox\hbox{#3}%
\saveTEXapplication02% dimensions
\box\scratchbox
\stopTEXpage
\stoptext
\endbuffer
\egroup
\doifelse\jobsuffix{dvi}\donetrue\donefalse
\executesystemcommand{texexec \bufferprefix\@@texapp.tex --once --batch}%
\ifdone % eps
\executesystemcommand{dvips -E* -o \@@texapp.eps \@@texapp}%
\else % pdf
\executesystemcommand{dvips \bufferprefix\@@texapp}%
\executesystemcommand{ps2pdf \bufferprefix\@@
texapp.ps \bufferprefix\@@texapp.pdf}%
% \executesystemcommand{texmfstart pstopdf \bufferprefix\@@
texapp.ps \bufferprefix\@@texapp.pdf}%
\fi
\restoreTEXapplication % dimensions
\doifelse\jobsuffix{dvi}\donetrue\donefalse
\setbox\scratchbox\hbox
{\expanded{\externalfigure
[\bufferprefix\@@texapp.\ifdone eps\else pdf\fi]
[\c!object=\v!no]}}%
\setbox\scratchbox\hbox
{\lower\ht\scratchbox\hbox{\raise\dimen2\box\scratchbox}}%
\wd\scratchbox\dimen0
\ht\scratchbox\dimen2
\dp\scratchbox\zeropoint
\box\scratchbox
\egroup}