[pstricks] A little bit more complicated function definition fails again. Was: Can't use a mathematical function defined with FPeval in \psplot
Juergen Rose
rose at rz.uni-potsdam.de
Mon Apr 14 07:52:37 CEST 2014
Am Samstag, den 12.04.2014, 18:39 +0200 schrieb Juergen Rose:
> Am Samstag, den 12.04.2014, 16:16 +0200 schrieb Juergen Rose:
>
> > ...
...
> ...
> I tried to use a little bit more complicated definition of a function:
>
> \documentclass{article}
>
> \usepackage[nomessages]{fp}
> \usepackage{pst-plot}
>
> \def\Vre{700}
>
> \begin{document}
>
> \def\myMathFunction#1{
> \def\nonr##1{1000*(\Vre/2)^(1/3)/((2)^0.5*(##1))+(6)^0.5/2-1}
> (\nont{(#1)}) * 5 - (\nonr{(#1)})^2
> }
>
> \pspicture[shift=*](-1,0)(6,7)
> \psaxes{->}(5.5,6)
> \psplot[algebraic,linecolor=red,linewidth=1.5pt]{1}{5}{%
> \myMathFunction{x}%
> }
> \endpspicture
> \end{document}
>
> xelatex fails with:
>
> No file define_math_function_test_3__fp_table_plot.aux.
> ! Undefined control sequence.
> \myMathFunction #1-> \def \nonr
>
> ##1{1000*(\Vre /2)^(1/3)/((2)^0.5*(##1))+(6)...
> l.23 }
There is still a typo in the definition, it should be:
\def\myMathFunction#1{
\def\nonr##1{1000*(\Vre/2)^(1/3)/((2)^0.5*(##1))+(6)^0.5/2-1}
(\nonr{(#1)}) * 5 - (\nonr{(#1)})^2
}
But this fails with the same error.
More information about the PSTricks
mailing list