[pstricks] Is it possible to pass an expression to \multido's repetitions argument?

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Nov 23 10:57:49 CET 2012


Alexander Grahn schrieb:

>>Which I assume means I can't put postscript expressions where I'm trying
>> to use them.
> Right, the second argument of \multido needs to be known at LaTeX
> run-time, but Postscript expressions are evaluated only at the PS to PDF
> conversion step, which is too late.
>
> In the example below, the floating point unit of LaTeX3 is used to do
> the calculation.

I think, we do not need latex3 here

> %All edges up to k,
>             \multido{\ii=0+1}{#2}{%
>                 \multido{\ij=0+1}{\calculate{#1}{\ii}}{%

     \multido{\ij=0+1}{\numexpr#1/2+\ii}{%


should do the same.

Herbert




More information about the PSTricks mailing list