Lost About Auto-Numbering h1, h2, h3...

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
Lucia
Propeller Head
Posts: 58
Joined: Mon Oct 27, 2008 6:22 am
Location: Blumenau SC Brazil

Lost About Auto-Numbering h1, h2, h3...

Post by Lucia »

Hello.

I'm really confused about how to number the titles in my PDF output. I have four levels of titles, and I wanna them look like this:

1.
1.1
1.1.1
1.1.2
1.1.2.1
1.1.2.2
1.2
2.

I know where to go in order to have it, but I can't see the logic of how displaying the numbers the way I want.

Please, someone help me! :)

Thank you very much
Lucia
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Lost About Auto-Numbering h1, h2, h3...

Post by LTinker68 »

Since you're going four levels deep, you need four styles. If you want the auto-numbering for topic titles and sub-headings within those topics, then you'll most likely want to use the <h1> through <h4> styles.

In the stylesheet (most likely in the print medium unless you want this format for online output, too) set up the following auto-number formats.

For h1: GH: {n+}. --> This results in 1., 2., 3., for the first heading the topic. The GH is telling it to create a global counter so that your numbers don't start over at 1 at each topic. The plus is what tells it to increment.

For h2: GH: {n}.{n+} --> The first brace set (bracelet?) tells it to use the current number of the first set of n, which since it has a global counter will continue to increment from topic to topic. The plus on the second set tells it to increment the second set. This will result in 1.1, 1.2, 1.3 numbering.

For h3: GH: {n}.{n}.{n+}

For h4: GH: {n}.{n}.{n}.{n+}

The system remembers what each value of n is within each brace set. So if you're in a topic and already have an h1, h2, and h3 declared and throw in a few h4 tags, then it'll get the correct values for each set. Note that as you write the topics, they'll always appear to start with the number 1 at the top-most level -- it's only when you build the output that it resolves the numbers so that they increment throughout the file.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Lucia
Propeller Head
Posts: 58
Joined: Mon Oct 27, 2008 6:22 am
Location: Blumenau SC Brazil

Re: Lost About Auto-Numbering h1, h2, h3...

Post by Lucia »

Thanks Lisa, that's exacty what I wanted.

As usual, you're very helpful.
Lucia
Post Reply