Heading numbering

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
ajturnersurrey
Sr. Propeller Head
Posts: 348
Joined: Fri Nov 05, 2010 3:30 am

Heading numbering

Post by ajturnersurrey »

I have managed to get my head around the basics of Flare heading numbering, but have now reached the limit of my understanding!

My document has a lot of levels:

h1 is numbered {chapnum}
h2 is numbered {chapnum}.{secnum}
h3 is numbered SH:{chapnum}.{secnum}.{Sn+}

up to this point everything is working fine.

but I've now decided I really ought to put numbers against h4 items too... and I can't figure out the appropriate syntax to describe the automunbering I want.

Can anyone suggest what I might try next in the sequence?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Heading numbering

Post by LTinker68 »

Others might have a different suggestion, but I personally don't use the chapnum and secnum variables. Using them relies on how you've set up the TOC entries. The method I use doesn't care about where the topic falls in the TOC or whether or not you've set it up to be a new chapter, so to my mind I have a bit more flexibility.

Anyway, I do something like the following:

h1 mc-auto-number-format: 'GH:{n+} '
h2 mc-auto-number-format: 'GH:{n}.{n+} '
h3 mc-auto-number-format: 'GH:{n}.{n}.{n+} '

and so on. The "G" in the format means it's a global counter and the "H" is the ID for this numbering sequence. If I wanted to use different numbering for an appendix, for example, my numbering (and classes) would be something like the following.

h1.appx mc-auto-number-format: 'GA:Appendix {n+} '
h2.appx mc-auto-number-format: 'GA:Appendix {n}.{n+} '

and so on.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
schultza
Propeller Head
Posts: 58
Joined: Thu Jan 13, 2011 3:29 pm

Re: Heading numbering

Post by schultza »

I'm in Flare 7.1, but still found this post extremely helpful. I am working on Appendices, and had been trying to figure out how to get my H1 heading to display "Appendix" instead of "Chapter." Well, this post showed me I had to add a style class.

However...I am having trouble with resetting of the numbers. I had originally just wanted one new style class, h1.Appendix where I had the mc-auto-number-format property set to GH:Appendix {A+1}. However, even though this DID change my heading to include the title "Appendix" instead of "Chapter," the count did not start at Appendix A (since I had previous chapters, it started at Appendix E).

It seems the only way I could get around this was to create a second new style class, h1.AppendixFirst where I had the mc-auto-number-format property set to GH:Appendix {A=1}.

Anyone have advice to give on whether I'm going about this the right way?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Heading numbering

Post by LTinker68 »

Yes, it's the "H" after the G. The "H" is the identifier for the sequence. If you used "H" as the identifier for the standard chapters and used "H" again for the appendices, then it's the same sequence of numbers. The class name has nothing to do with the sequence -- only that single-letter ID is what differentiates which sequence to use. So you could have 26 different sequences. (Or maybe only 24 -- G and C might be reserved since they're used to identify the counter scope.)

So you need to specify a different letter ID for the appendices, such as GA:Appendix {A+1}.
Image

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