[NTG-context] Label loops within a XeConTeXt document
nicola
vitacolo at dimi.uniud.it
Sun Jun 24 10:33:01 CEST 2007
> > how do I change
> >
> > \startTeXtexts
> > \dorecurse{10}{\TeXtext{\recurselevel}{$x_{\recurselevel}$}}
> > \stopTeXtexts
> >
> > so that I can print labels from x_0 up to x_9? Do I need to use
> > \defineconversion and \convertnumber?
>
> No, use \dostepwiserecuse. The general syntax is
>
> \dostepwiserecurse {from} {to} {step} {action}
>
> so
>
> \dostepwiserecurse {0} {9} {1}
I guess it must be \dostepwiserecurse {0} {9} {1} {}
> {\TeXtext{\recurselevel}{$x_{\recurselevel}$} should work.
I have tried that, but sometxt(0) prints nothing. Anyway, I have solved
it like this:
\startTeXtexts
\TeXtext{0}{$x_0$}
\dorecurse{30}{\TeXtext{\recurselevel}{$x_{\recurselevel}$}}
\stopTeXtexts
Thanks again!
Nicola
More information about the ntg-context
mailing list