[pstricks] New macro addtopsstyle

Herbert Voss Herbert.Voss at fu-berlin.de
Sun Sep 9 14:42:29 CEST 2007

Christoph Bersch wrote:
> for me it would be comfortable to have a macro which adds some 
> additional settings to an existing psstyle. Something like
> \newpsstyle{Fiber}{linecolor=green}
> \addtopsstyle{Fiber}{linewidth=0.1}
> -> style Fiber contains both informations
> The following code seems to work, but it uses the LaTeX macro 
> \g at addto@macro. As I plan to include this into a PSTricks package, the 
> question is, if I should rewrite it in plain TeX (don't know how), or if 
> use of a LaTeX macro is ok.

\def\addto at psstyle#1#2{%
    \pst at toks=\expandafter{#1#2}%
    \edef#1{\the\pst at toks}}
    \def\pst at tempA{#2}%
    \ifx\pst at tempA\@empty\else
      \expandafter\addto at psstyle\csname pscs@#1\endcsname{\psset{#2}}}\fi}





More information about the PSTricks mailing list