On Fri, Oct 26, 2012 at 11:50 AM, Alan BRASLAU <alan.braslau@cea.fr> wrote:
Does anyone have a solution to \dorecurse within TABLE?
Alan

Minimal example:

\starttext
\dorecurse{8}{\recurselevel\crlf}

\bTABLE
\dorecurse{8}{\bTR\bTD\recurselevel\eTD\eTR}
\eTABLE
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

table are strange, they can be parsed more than one time to achive the result
If you use mkiv maybe the lua version is better
\starttext
\dorecurse{8}{\recurselevel\crlf}
\startluacode
global_cnt=0;
\stopluacode
\bTABLE
%% ok, but why 17 ?
\dorecurse{8}{\bTR\bTD\ctxlua{global_cnt=global_cnt+1;context(global_cnt-17)}:\recurselevel\eTD\eTR}
\eTABLE

%% straight
\startluacode
context.bTABLE()
for i=1,8 do
context.bTR()
context.bTD() context(i) context.eTD()
context.eTR()
end
context.eTABLE()
\stopluacode

\stoptext

--
luigi