Auto number series

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
SallyD
Propeller Head
Posts: 44
Joined: Wed Mar 24, 2010 12:51 pm

Auto number series

Post by SallyD »

I'm missing a step somewhere. The numbering of my figure captions is starting over at 1 in each chapter. My number format is F:Figure {n+}:. I don't see anything in the Auto-numbers tab of the TOC file properties to tell it to continue from previous. Is there another setting somewhere to make this work? I thought the series would take care of this.

Sally
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Auto number series

Post by Nita Beck »

Forgive my "dumb" question: Are you talking about what you see in the XML Editor or what you see in output? You're going to see "1" in the XML Editor because Flare can't resolve the numbers until it builds the output.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
SallyD
Propeller Head
Posts: 44
Joined: Wed Mar 24, 2010 12:51 pm

Re: Auto number series

Post by SallyD »

Not a dumb question, Nita. A dumb post for not including that info. I'm referring to the output. The fig caps in the PDF restart at 1 in each chapter.

Sally
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Auto number series

Post by LTinker68 »

You need to specify that your format has a global scope. If you don't specify the global scope, then it'll default to a chapter scope. To specify the global scope, you'd add the letter G before the format. In this case, it would be GF:Figure {n+}. You'd still see 1 in the topic in the authoring environment, but when you generate the output the numbers will increment through the entire document. (For print output, that is -- online output would renumber at the beginning of each topic, I believe, although I could be wrong about that. I don't include numbers in figures or table in online output.)
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
SallyD
Propeller Head
Posts: 44
Joined: Wed Mar 24, 2010 12:51 pm

Re: Auto number series

Post by SallyD »

Ah! Thank you, Lisa. I'll have to go back through those help topics to see where I missed that nugget of knowledge! :-)

Sally
LarsLyhne
Propeller Head
Posts: 25
Joined: Tue Nov 01, 2011 6:55 am
Contact:

Re: Auto number series

Post by LarsLyhne »

It is sort of nice, that others experience the same as I do.

I figured out the G (for global), but apparently it opened a new problem.

I created a GT for tables and a GF for figures with the same format GF:Figure {n+}: Text only to see that the only figure in my project is number 6 (six).

So, my question is where is the figure counter? How is it possible to reset it? Or is it counting something not known to me?

Kind regards

Lars Lyhne
Kind regards

~ Lars Lyhne ~
www.retext.dk
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Auto number series

Post by LTinker68 »

LarsLyhne wrote:So, my question is where is the figure counter? How is it possible to reset it? Or is it counting something not known to me?
It's not stored anywhere, at least, not that you can directly affect. If you need to reset the counter, you create a second paragraph class (assuming that's the tag you're using) that uses the same sequence, but with {n=1}. So you could have a set of paragraph classess like the following:

Code: Select all

p.captionTbl {
   mc-auto-number-format:'GT:Table {n+}: ';
}
p.captionTblReset {
   mc-auto-number-format:'GT:Table {n=1}: ';
}
p.captionFig {
   mc-auto-number-format:'GF:Figure {n+}: ';
}
p.captionFigReset {
   mc-auto-number-format:'GF:Figure {n=1}: ';
}
So normally you would use p.captionTbl and p.captionFig and the numbers for each sequence will be sequential. When you need to reset one of them, you use p.captionTblReset or p.captionFigReset at the point you want to reset to 1; thereafter you go back to using p.captionTbl or p.captionFig.

How did you insert/make the captions in the topics?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply