[pstricks] fp and pstricks

Herbert Voss Herbert.Voss at FU-Berlin.DE
Thu Feb 18 18:32:53 CET 2010


Am 18.02.2010 17:31, schrieb E. Krishnan:
> 
> 
> With the LaTeX package "fp", I can do
> 
>   \newcommand{\funcvalcalc}[1]{%
>     \FPeval{\fv}{2*#1}}
> 
>   \begin{pspicture}(0,0)(2,4)
>     \funcvalcalc{2}
>     \psdots(2,\fv)
>   \end{pspicture}
> 
> But if I wrap "\funcvalcalc" and "\fv" into a single macro like
> 
>   \newcommand{\funcval}[1]{%
>     \FPeval{\fv}{2*#1}
>     \FPprint\fv}
> 
> and try
> 
>   \begin{pspicture}(0,0)(2,4)
>     \psdots(2,\funcval{2})
>   \end{pspicture}
> 
> I get the error
> 
>   ! Argument of \doaction has an extra }.

It is a problem with the expansion. However, there is no need
to use fp for coordinates, you can do it with PostScript

    \psdots(!2 dup dup mul)

needs only a \SpecialCoor

Herbert


More information about the PSTricks mailing list