[pstricks] Psset and accessing key values inside pstricks
Hendri Adriaens
Hendri at uvt.nl
Tue Feb 15 08:57:08 CET 2005
> > \define at key[psset]{pstTxtBx}{name}{%
> > \edef\psset at pstTxtBx@name{#1}%
> > }
>
> this depends on using xkeyval and should be \def instead of \edef
Furthermore, your \edef redefines the key macro
as the names coincide. Once you've used the key,
you can't use it anymore.
> > \makeatother
> > \psline[linecolor=blue,name=lineA](2,1)
> > \psline[linecolor=red,name=lineB](-2,1)
>
> linecolor depends on using the old pstricks mechanism of
> creating optional parameter
>
> \def\psset at linecolor#1{\pst at getcolor{#1}\pslinecolor}
> \psset at linecolor{black}
Or via \define at key[psset]{}{linecolor}{...}
Alan:
> As I recall, the keys
> are not named in a way that is terribly systematic (more like several
> separate systems), so I think you'll have to tabulate them from the .tex
> file.
Wrong. It has always been systematic, but pstricks used a
system that was a modification of keyval. Compare keyval keys
\KV at fam@key
with original pstricks keys:
\psset at key
xkeyval has unified both systems in allowing to also choose
the prefix. Now, original pstricks keys are defined with a
psset prefix and with an empty family.
Please read the docs of pst-xkey and xkeyval for this and
more information.
BTW, Richard, I have an entire section devoted to structures
of internal macro names in my docs...
-Hendri.
More information about the PSTricks
mailing list