Difference between revisions of "Command/recurselevel"

From ConTeXt wiki
Jump to navigationJump to search
m (looplevel --> recurselevel; add this into example)
 
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>recurselevel</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==

Latest revision as of 16:30, 11 November 2019

\recurselevel

Syntax (autogenerated)


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">