[NTG-context] Giving a float its own number

Duncan Hothersall dh at capdm.com
Thu Oct 19 11:13:00 CEST 2006

I have a book with parts and chapters; figures in the chapters are
numbered 1.1, 2.1 etc. but sometimes a part has a figure in it as well,
before the chapters start. The desired numbering for such figures is to
follow the Part numbers, and be in capitalised roman numerals (in other
words, Figure II would be the figure in the intro of Part 2).

So I define a new clone of figure called Partfigure, and give it the
necessary setups to make the numbering come out in cap roman; and I
thought the easiest way of managing the number itself would be just to
increment it each time \part is called. (Not every part has a figure.)

But I can't seem to get the number to come out when I place the figure.

Minimal example below (I have culled the actual \parts and just put in
two increments, but the effect is the same).

\setuplabeltext[en][Partfigure=Figure ]

TrackingPartfigurenumber now equals
\rawnumber[TrackingPartfigurenumber], which will display as
\convertednumber[TrackingPartfigurenumber]. But it doesn't get used:
\placefloat[Partfigure][here][-:PMRWFII]{A cow}{\externalfigure[koe]}
Why not?

I tried also \increment[Partfigure] but this produces exactly the same

I also tried using ownnumber=true in the Partfigure setup and then
feeding it the value {2} in the \placefloat call but that wouldn't compile.

Where did I go wrong? I'm sure there is an easy way to do this.

This one is a bit desperate, again, a very fussy author is waiting on
it, so...

Thanks all.


More information about the ntg-context mailing list