[NTG-context] Overriding the number on a float

Henning Hraban Ramm texml at fiee.net
Mon Aug 24 15:29:48 CEST 2020

> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall <dh at capdm.com>:
> I think there was a question on this very recently but I don;t think it got an answer and I can't find it to reply to, so apologies for the extra noise. I have a large text with floats numbered sequentially by chapter and then figure/table number, but at the last minute I've had a request for two figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 and 27.2. It's not a combination - they are separate figures on different pages.
> I've experimented with the options I can see, but it's not obvious if there is a facility to override the numbering of two figures in a stream of normally numbered figures like this. I was thinking of the equivalent of the old \sym{symbol} command that used to work as a way to override a single item in an otherwise sequential list.
> I guess there's a brute force method of setting up a new type of figure with the label "Figure 27.1" and having them numbered as lowercase alpha, but if there's an easier way that would be great.

I’m also interested in overriding automatical numbering, e.g. of chapters or itemization items.

E.g. in my songbook, I’d like to have the verses numbered but interrupted by a chorus numbered as "C" (i.e. "R" in German).
Similarly the paragraphs of some (by)laws that were changed a lot and use a numbering like 1, 2, 3, 3a, 4, 7...

Something like
would be nice.
If I set it to an integer, ConTeXt should set the counter accordingly, otherwise continue counting from the previous calculated number. Would that be possible?

BTW do sections, items and floats all use counters (\setnumber/\getnumber) or other mechanisms?


More information about the ntg-context mailing list