[pstricks] Defining an option similar to 'dash'
Christoph Bersch
usenet at bersch.net
Tue May 27 00:01:20 CEST 2008
Herbert Voss wrote:
> Christoph Bersch schrieb:
>
>> I am trying to define an option which is similar to 'dash' in pstricks.tex:
>>
>> \documentclass{article}
>> \usepackage{pstricks, pst-xkey}
>> \makeatletter
>> %
>> % a dummy option
>> \define at key[psset]{}{newoption}{\edef\psk at newoption{#1}}%
>
> in nearly every case you shoudn't use \edef
> The following works without an error message
For some reason I thought, that it would be better to use \edef in every
key definition...
> \documentclass{article}
> \usepackage{pstricks, pst-xkey}
> \makeatletter
> % a dummy option
> \define at key[psset]{}{newoption}{\def\psk at newoption{#1}}%
After this change the appropriate error message (the one contained in
\pst at missing) is shown only when the 'newoption' is used later in the
document. But I think it is better to stop with the error at the
erraneous psset definition (here: \psset{lens=1}) as it is done with
option 'dash' when you specify only one number.
Christoph
More information about the PSTricks
mailing list