[pstricks] extend scope of user defined Postscript variable

Alexander Grahn A.Grahn at fzd.de
Mon Jun 29 17:25:29 CEST 2009


On Mon, Jun 29, 2009 at 05:07:20PM +0200, Herbert Voss wrote:
>Alexander Grahn schrieb:
>
>> I would prefere this one, because there is no need for files. However
>> it is not possible to change the value of the variable in the middle of
>> the document, `good bye!!!' is written 4 times to stdout during ps2pdf:
>> 
>> \documentclass{minimal}
>> \usepackage{pstricks}
>> 
>> \begin{document}
>> \special{! /hello (hello!!!) def}
>> \pstVerb{SDict begin hello print end}
>> foo
>> \clearpage
>> \pstVerb{SDict begin hello print end}
>> foo
>> \clearpage
>> \special{! /hello (good bye!!!) def}
>
>\pstVerb{SDict begin /hello (good bye!!!) def end}
>
>> \pstVerb{SDict begin hello print end}
>> foo
>> \clearpage
>> \pstVerb{SDict begin hello print end}
>> foo
>> \end{document}

Now I have the `/undefined in hello' error again:

\documentclass{minimal}
\usepackage{pstricks}

\begin{document}
\pstVerb{SDict begin /hello (hello!!!) def end}
\pstVerb{SDict begin hello print end}
foo
\clearpage
\pstVerb{SDict begin hello print end}
foo
\clearpage
\pstVerb{SDict begin /hello (good bye!!!) def end}
\pstVerb{SDict begin hello print end}
foo
\clearpage
\pstVerb{SDict begin hello print end}
foo
\end{document}

--
Alexander


More information about the PSTricks mailing list