[NTG-context] recursion in a table

Hans Hagen j.hagen at xs4all.nl
Mon May 2 09:16:35 CEST 2022


On 5/2/2022 2:30 AM, Aditya Mahajan via ntg-context wrote:

> \expanded{\NC \recurselevel \noexpand\NC ... }

There is no need for \noexpand before \NC. Even \NR is protected. In 
MKIV there are some more sensitive ones like \FR but in LMTX these are 
defined as \noaligned which permits them being protected too (the 
engine's alignments scanners have some lookahead properties that cna 
otherwise interfere).

\starttabulate[||]
     \NC \infofont\meaningasis \NC \NC \NR
     \NC \infofont\meaningasis \NR \NC \NR
     \NC \infofont\meaningasis \HL \NC \NR
     \NC \infofont\meaningasis \FL \NC \NR
\stoptabulate

> Remind me of a more-than-a-decade-old discussion on the mailing list, summarized here:
> 
> https://adityam.github.io/context-blog/post/tex-programming/
> 
>> Also, \HL doesn’t work at the end, and the second line of the error
>> message makes no sense:

As you're not afraid of low level code:

\starttext

\starttabulate[|r|c|]
     \NC $T$ \NC what \NC \NR
     \HL
     \expandedloop 0 359 45 {
         \NC \number\currentloopiterator ˚ \NC \NC \NR
     }
\stoptabulate

\stoptext

So, you can play with:

\expandedloop
\unexpandedloop
\localcontrolledloop
\quitloop
\currentloopiterator
\currentloopnesting
\lastloopiterator

if you want a challenge for a new blog post.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list