[pstricks] Bookkeeping in pspicture environment

Herbert Voss Herbert.Voss at FU-Berlin.DE
Tue Jul 22 17:00:12 CEST 2008

Christoph Bersch schrieb:

> in the next pst-optexp version I want to integrate some kind of 
> bookkeeping for named objects. The names are defined with a parameter 
> 'compname'. The names are registered in a global list and before every 
> new definition it is checked if the name was already used.
> Now this bookkeeping should be local in every pspicture environment. I 
> thought of doing this by redefining \pspicture as follows:
> \let\old at pspicture\pspicture
> \def\pspicture{\let\@complist\@empty\old at pspicture}%
> A working example would then be

[ ... ]

> This seems to work... The problem does not raise any PackageWarning, 
> only when uncommenting the last \psset{...} it is raised, as expected.
> Are there any problems to be expected with my solution or do you have a 
> better suggestion how to solve this issue?

everything inside the pspicture environment is local. If
I understand well, then you want the list also be local.

\define at key[psset]{}{compname}{%
     \def\pst at temp{#1}%
     \ifx\pst at temp\@empty\else
              {^^Jcompname '#1' already used.^^J}%




More information about the PSTricks mailing list