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
___________________________________________________________________________________

Reply via email to