Command/recurselevel

From ConTeXt wiki

\recurselevel

Syntax

\recurselevel

Description

The iteration count in a \dorecurse, \dostepwiserecurse or \doloop block.

Example

Counting up slow:
\dorecurse{10}
    {\recurselevel...\ }

Counting down fast:
\dostepwiserecurse{10}{1}{-2}
    {\recurselevel...\ }
Counting stopped.

Counting up to 3:
\doloop{
    \ifnum \recurselevel=3 
        \exitloop % exit at end of current iteration
    \fi
    \recurselevel!
}

See also

Help from ConTeXt-Mailinglist/Forum

All issues with:

table cellspacing="4" cellpadding="2" class="cmd">