[pstricks] help : pst-tools

cyrille piatecki cyrille.piatecki at univ-orleans.fr
Tue Apr 29 07:29:50 CEST 2014


Dear alls (more specificaly Herbert),

in pst-tools.tex there is --- to my demand --- the possibility to save 
the resul of an operation under VarName .

This is a little latex tex which borrowed to Basil Malychev wich shows 
that it is not clear how to use it.

\newcommand{\fcos}[1]{\psPrintValue [algebraic] {#1, cos(x)}}

\newcommand{\fsincos}[1]{
\psPrintValue [algebraic, VarName=sincos] {#1, sin(cos(x))}}

\newcommand{\fsquarre}[1]{
\psPrintValue[algebraic]{#1, x^2}}


$\sin(2) =\, \fsin{2}$

$\cos(1) =\, \fcos{1}$

$2^2 =\, \fsquarre{2}$

$\sin(\cos(2))=\fsincos{2}$

\newcounter{result}{\fsincos{3}}

The result then equal  \theresult

\vspace{.5cm}
\hrule
\vspace{.5cm}
\newcounter{x}
\setcounter{x}{5/2}
\thex
\vspace{1cm}

toto=\pstVerb{\sincos  10 string cvs 0 0 moveto show}

\vspace{1cm}
$toto^2$ = \psPrintValue[algebraic]{\pstVerb{sincos \showPSVal}, x^2}

Thanks for the answer

Cyrille Piatecki



More information about the PSTricks mailing list