[pstricks] Preserving dict across pages.

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Thu Feb 10 22:45:53 CET 2005


Richard Hensh wrote:

> The following code works as long as both pictures appear on the same page.
> The raw ps code suggests there is a way (using bop and eop hooks, etc. ) to
> preserve such dictionaries across pages but I'm not sure how to do it. Any
> suggestions? I'm sorry if this is more of a postscript question and belongs
> somewhere else.

save the variables in a macro and modify variables outside
of psplot

Herbert


\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-plot}

\def\psdef{%
   \pstVerb{%
       /const {1} def %
       /curve {x dup mul const mul} def }}%

\begin{document}

\psset{unit=0.5cm}
\begin{pspicture}*(-6,-6)(6,6)
\psdef
\pstVerb{/const {0.2} def}
\psplot{-6}{6}{ curve }
\end{pspicture}

\clearpage
\begin{pspicture}*(-6,-6)(6,6)
\psdef
\pstVerb{/const {0.5} def}
\psplot{-6}{6}{curve }
\end{pspicture}

\end{document}



-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list