[pstricks] Rendering modified arguments inside a macro

Jorge Nto jorgento at gmail.com
Fri Dec 11 14:39:12 CET 2009


I have a macro like:

\makeatletter
\def\psMyMacro{\pst at object{psMyMacro}}
\def\psMyMacro at i#1{\begin at SpecialObj\expandafter\psMyMacro at ii#1}
\def\psMyMacro at ii #1{\psMyMacro at iii#1}
\def\psMyMacro at iii#1 #2 #3 #4 #5 #6{%
 ...
  \rput(!#2 2 mul,#4){ ?MathematicalExpressionToEval? }%
 ...
   \@ifnextchar D{\psMyMacro at iii}{\end at SpecialObj}}
\makeatother
\begin{document}

Were < ?MathematicalExpressionToEval? > is what I want to display inside a
graphic.
As it can be seen, the evaluation of the expression for the x coordinate <
!#2 2 mul > works well
But the RPN syntax doesn't seem to be evaluated. For example if I write:

\rput(!#2 2 mul, #4){ ! #6 20 mul 2 add }%

and lets say #2 = 10, # 4 = 5 and #6 = 4  then at coordinate (10,5) I get
just : "! #6 20 mul 2 add " .
Although it should display 82 (4*20 + 2).
How can I evaluate this?

Thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20091211/55b2f4c1/attachment.html>


More information about the PSTricks mailing list