[pstricks] pst-key versus xkeyval

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sat Jun 5 10:03:25 CEST 2004


Hendri Adriaens has a working TeX version of his
xkeyval - package. This package has some advantages.
The problem with the pstricks-packages is the large number
of optional arguments which sometimes have the same name
for different different packages with a different definition.

The xkeyval package provides a "family" parameter, so you
can use something like

\psset[pst-plot]{plotpoints=20}
\psset[pst-3dplot]{plotpoints=20}

What I want to say is, that it may be a good idea when
authors of new packages use the xkeyval package and
define new parameters with (e.g. for a package pst-new)

%Define keys.
\xdefine at key{pst-new}{keyi}{....#1...}

%Set keys.
\xsetkeys{pst-new}{keyi=test 1}

It is now possible to define keys with the same name
for multiple packages without any clash.

the LaTeX version of xkeyval is available at CTAN.
For the TeX(PSTricks)-Version drop me a line if
you are interested.

Herbert




More information about the PSTricks mailing list