[pstricks] arrayjob and multiple array elements in one pstricks function does not worked as expected

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed Apr 9 10:21:52 CEST 2014

Am 09.04.2014 09:00, schrieb Juergen Rose:

> I justed wrote my first latex file with array job. I tried to plot a
> series of curves with five different parameters (Rprobe, Rmax,
> LineColor, LabelPos and LabelVal). I am not able to use the array
> elements for LineColor and Rmax. E.g., f I try to use the line
> \psline[linecolor=\LineColors(\iInd)](150,\cachedata)(160,\cachedata) ,
> xelatex complains about:
> ! Undefined control sequence.
> \in@ #1#2->\begingroup \def \in@@
>                                    ##1#1{}\toks@ \expandafter {\in@@
> #2{}{}#1...
> l.39     }
> The complete latex file is in the attachment. Any hint is deeply
> appreciated.

The expressions from arrayjob are not always expandable. Use always
the cached value:




   \readarray{LabelVal}{S_T^{VC}(r), r_p= 0 nm&S_T^{VC}(r), r_p= 0.3 
nm&S_T^{VC}(r), r_p=3 nm&S_T^{VC}(r), r_p=30 nm}
   \def\RatioFacZero{Pi 6 sqrt div 3 div }
     \uput[180](-0.1,95){$S_{total}[\mu m^2]$}
                t \RatioFacZero t 3 exp mul 2 div 0.225 t 2 0.5 exp div add
                2 exp div 1 2 t 2 exp div 2 0.5 exp t div 3 mul sub 2 
add 3 mul
                t mul t \cachedata\space add div sub mul }
       \uput[r](160,\cachedata) {$\LabelVal(\iInd)$}%


And, by the way, using an algebraic expression instead of the postfix
notation makes it easier.


More information about the PSTricks mailing list