[pstricks] declare variable and initialize with a value

Christoph Bersch usenet at bersch.net
Sun Sep 16 00:12:15 CEST 2007


Doris Wagner wrote:
> and how can I use coordinates with computations, for example (1+r2, 
> 1-r2)?
\SpecialCoor
\pstVerb{/r2 { 2 sqrt } bind def}
\psline(1,1)(! 1 r2 add 1 r2 sub)

The \SpecialCoor is necessary in order to use the (!...) notation. It is
set by some PSTricks packages (e.g. pstricks-add), but you may have to
call it by yourself.

Christoph



More information about the PSTricks mailing list