Damn Figure Numbers

Arggh! After sorting out a lot of figure number issues, they have reared their ugly heads again!

Within my CreativeComponent chapter, I refer to a Figure from another chapter. This reference to a figure from another chapter seems to be upsetting the numeric progression of all Figure numbers. The following markup:

Figure <$n:chapter:CreativeComponent>.<$n:figure:TheChampPickupLick-2BeatDisplacement>
Figure <$n:chapter:CreativeComponent>.<$n:figure:TheChampPickupLick-2BeatDisplacement>
Figure <$n:chapter:CreativeComponent>.<$n:figure:TheChampPickupLick-2BeatDisplacementVideo>
Figure <$n:chapter:JimmySmith>.<$n:figure:JOSThePreacherCH16M1-16>
Figure <$n:chapter:CreativeComponent>.<$n:figure:TheChampPickupLick-Decontextualised-DoubleTime>


Figure 1.1
Figure 1.1
Figure 1.2
Figure 2.3
Figure 1.4

As you can see, there is no Figure 1.3. What on earth have I down wrong here?


Umm … I’ve never had to use any of these, but what struck me immediately is that you have a different chapter reference in the offending line, and I would presume that it is that that is producing the 2.x.

I may well be wrong and someone more savvy will be along soon. But that’s the first thing I’d check.



Looks like your fourth figure number spec is just counting up, not referring back to the figure from the previous chapter. If the figure num in the previous chapter is in fact a 3 this is a coincidence, I think. Test this by placing another in-chapter reference right before that line. I suspect you will then get a 2.4 on that line rather than a 2.3.


Also note that if you are referencing, it is better to use the <$x#y:z> formation rather than <$x:y:z>. The latter will work on accident to so long as every reference follows the initial use of the placeholder, but if any reference precedes its initial use then it will prematurely increment the counter, upsetting the order of placeholders on the same numbering stream around it.

As AmberV suggests, it is always better to reference using <$[auto-number-type]#[name]:[keyword]>. What you get is what I expect: I thought counters are independent, so <$n:fig:T1> (increment counter=1) — <$n:fig:T1> (ref counter#1=1) — <$n:fig:T2> (increment=2) — <$n:fig:T3> (increment=3) — <$n:fig:T4> (increment=4) gives what you get…

But first off, are you force reseting counters for each chapter using <$rst_figure>?

Otherwise, if my memory is correct (independent counters), then you may try to give each figure chapter name stream a unique name:

Figure <$n:chapter:CreativeComponent>.<$n:figureC1:TheChampPickupLick-2BeatDisplacement>
Figure <$n:chapter:CreativeComponent>.<$n#figureC1:TheChampPickupLick-2BeatDisplacement>
Figure <$n:chapter:CreativeComponent>.<$n:figureC1:TheChampPickupLick-2BeatDisplacementVideo>
Figure <$n:chapter:JimmySmith>.<$n:figureC2:JOSThePreacherCH16M1-16>
Figure <$n:chapter:CreativeComponent>.<$n:figureC1:TheChampPickupLick-Decontextualised-DoubleTime>

I haven’t tested this (and its been a while since I’ve compiled using complex counters) so YMMV!

Many thanks everyone - fixed!


What was the solution?