Re: \setupheadnumber question

Wolfgang Schuster <[email protected]>
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>
Am 21.03.2026 um 21:43 schrieb Hans Hagen via ntg-context:
> On 3/21/2026 8:24 PM, Jim wrote:
> 
>> They currently are.  But as Florent points out, a very small change fixes
>> this.  But should the change be made?
> 
> you know the answer ... wolfgang has to check if it fits in the 
> interface (consistency, interference, etc)

The currrent entry is

\setupheadnumber [.1.] [.2.]
1  SECTION
2  [-+]NUMBER

and unless a count register is expected as argument dropping \number 
shouldn't be a problem.

Another option is to add a + check (no need to check for -):

\permanent\tolerant\protected\def\setupheadnumber[#1]#*[#2]%
  
{\setstructurenumber{\thenamedheadlevel{#1}}{\ifhastoks{+}{#2}+\fi\number#2}}

Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.