I guess, this won't work as the command will affect the next sections. It
won't look back.
But, why do you use such a solution instead of modifying the correct section
directly?

> -----Ursprüngliche Nachricht-----
> Von: [email protected] <[email protected]>
> Gesendet: Montag, 27. Oktober 2025 15:13
> An: [email protected]
> Betreff: [NTG-context] remove number in some sections
> 
> Hello, list. I need to remove the number from the header of some sections
(2 and 5
> in my example code, but in the compiled PDF they're removed from 3 and 6).
> Please help me remove them from the correct ones.
> 
> \setupbodyfont[ibmplex,rm,9pt]
> \setuplayout[tight]
> 
> \setuphead
>   [section]
>   [style=bfb,color=red,before={\mysetup\blank[2*big]}]
> 
> \def\mysetup{
>   \doifelse{\namedstructureuservariable{section}{number}}{no}{
>     \setuphead
>       [section]
>       [number=no,incrementnumber=list]
>   }{
>     \setuphead
>       [section]
>       [number=yes,incrementnumber=yes]
>   }
> }
> 
> \starttext
> 
> \startsection[title=A Section]            \input knuth\par\mysetup
\stopsection
> \startsection[title=A Section][number=no] \input knuth\par\mysetup
\stopsection
> \startsection[title=A Section]            \input knuth\par\mysetup
\stopsection
> \startsection[title=A Section]            \input knuth\par\mysetup
\stopsection
> \startsection[title=A Section][number=no] \input knuth\par\mysetup
\stopsection
> \startsection[title=A Section]            \input knuth\par\mysetup
\stopsection
> 
> \stoptext
> ___________________________________________________________________
> ________________
> If your question is of interest to others as well, please add an entry to
the Wiki!
> 
> maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  :
> https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________
> ________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to