[pstricks] Optional {} argument as in \psline{->}()()

Christoph Bersch usenet at bersch.net
Tue Apr 15 11:45:53 CEST 2008


for my package pst-optexp I want to allow an optional {} argument like 
the arrow argument in \psline: \psline{->}(A)(B)

At the moment all my components are defined in the following way.

\def\lens{\@ifnextchar[{\pst at lens}{\pst at lens[]}}

\def\pst at lens[#1](#2)(#3)#4{{%
    \pst at regNodes{#2}{#3}%
    \pst at draw@component{#1}{#4}\pst at draw@lens%

The components can then be called with


I want to allow a supplementary optional argument before the nodes:


is there an easy way to incorporate this in the above code?

Thank you,

More information about the PSTricks mailing list