\setupheadnumber question
Jim <[email protected]>
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <[email protected]> |
Hi,
the wiki says
If the second argument is signed, the heading’s number will be
increased or decreased by the specified amount instead.
However, that is not what happens for numbers with a leading '+'.
For example, in
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\starttext
\section{First}
\section{Second}
\section{Third}
\setupheadnumber[section][+10]
\section{Plus 10}
\setupheadnumber[section][-4]
\section{Minus 4}
\setupheadnumber[section][+3]
\section{Plus 3}
\setupheadnumber[section][+1]
\section{Plus 1}
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The output is (blank lines removed, editorial comments added)
1 First
2 Second
3 Third <so far so good>
11 Plus 10 <huh, '+10' acted like '10'>
8 Minus 4 <that subtracted 4, then with +1 it is correct>
4 Plus 3 <nope, should have been 12 (or 11).>
2 Plus 1 <nope>
Q: is the wiki wrong, or
is there a bug in the code, or
am I misinterpreting the wiki sentence?
(I don't think I am misinterpreting the wiki, but I have to admit the
possibility.)
If the code is right and the wiki is wrong, then +N is the same as N, which
seems like a lost opportunity and (arguably) a bit surprising.
Would someone be so kind as to give me a definitive answer?
Thanks.
Jim
___________________________________________________________________________________
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
___________________________________________________________________________________