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

Alexander Grahn A.Grahn at hzdr.de
Fri Nov 23 10:05:11 CET 2012

On Thu, Nov 22, 2012 at 07:20:01PM +0000, Sky Hester (No Email) wrote:
>I am attempting to create an animation with \animateinline using a command that involves \multido. When I compile the following, I receive the error
>"! Missing number, treated as zero.
><to be read again> 
>                   !
>l.44 	}"
>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.

Next, you should use \multiframe macro instead of \whiledo with embedded


\usepackage{expl3} % LaTeX3 interface


%Command to draw diagrams
\newcommand{\cycle}[2]{% #1: n, #2: k, number of edges plotted
%All edges up to k, 




More information about the PSTricks mailing list