Am 06.03.2009 um 04:05 schrieb Aditya Mahajan:
My summary of this thread: http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-t...
Nice article but I have a few corrections for you. Table setup: To achieve horizontal and vertical centered content in the table cell you need 'align={middle,lohi}'. Pure table code: You forgot the \bTR and \eTR before and after each row. Expandafter solution: You don't need as many \expandafter as you did in your example, one before \bTD in each loop is enough. \bTABLE \bTR \bTD $(+)$ \eTD \dorecurse{6} {\expandafter \bTD \recurselevel \eTD} \eTR \dorecurse{6} {\bTR \edef\firstrecurselevel{\recurselevel} \expandafter\bTD \recurselevel \eTD \dorecurse{6} {\expandafter \bTD \the\numexpr\firstrecurselevel+\recurselevel\relax \eTD} \eTR} \eTABLE \for loop: If you really want to show this loop you also the correct commands to access the counters. #1 did also work but only because the command is wrapped around \dostepwiserecurse. \bTABLE \bTR \bTD $(+)$ \eTD \for \y=1 \to 6 \step 1 \do {\bTD \y \eTD} \eTR \for \x=1 \to 6 \step 1 \do {\bTR \bTD \x \eTD \for \y=1 \to 6 \step 1 \do {\bTD \the\numexpr\x+\y \eTD} \eTR} \eTABLE Thank you for the article and I'm looking forward for the next. Best regards, Wolfgang