How to get auto chapter numbers in TOC

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
kmorrison
Sr. Propeller Head
Posts: 107
Joined: Mon Nov 11, 2013 3:04 pm
Location: Ottawa, Canada
Contact:

How to get auto chapter numbers in TOC

Post by kmorrison »

I've been trying to figure out how to add chapter numbers to the TOC for my PDF output. Ideally this should happen automatically, because it's a long document in which chapters get split/merged/rearranged fairly often. I don't want to have to manually re-number dozens of chapters, because it's a tedious and probably error-prone process.

I added an mc-auto-number-format, "Chapter {chapnum}:" to the chapter-level TOC paragraph style in the CSS, (p.TOC2). I checked that it's in the print medium. The autonumber is ignored when I generate the PDF, though other changes that I made to the style appear. Does anyone have any ideas? Am I missing something? Am I using an entirely wrong approach?

:?:
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: How to get auto chapter numbers in TOC

Post by Lydia »

The mc-auto-number-format should be set on the heading style, e.g. the h1 style. If you don't have/want numbers in your content, I don't think you can make them appear in the TOC.
Using Flare 10.2 and Flare 11 on Win 7
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: How to get auto chapter numbers in TOC

Post by LTinker68 »

kmorrison wrote:I added an mc-auto-number-format, "Chapter {chapnum}:" to the chapter-level TOC paragraph style in the CSS, (p.TOC2). I checked that it's in the print medium. The autonumber is ignored when I generate the PDF, though other changes that I made to the style appear.
If you use the {chapnum} placeholder, then I believe you also have to specify to use the chapter number in the TOC entry (entries?), or at least set the first chapter and set the rest to auto-increment. I normally use the {n+} placeholder instead, so it doesn't matter if I identify a TOC entry as being the start of a chapter or not; it's just based on the presence of an h1 tag to increment the number. Other users are more familiar with the {chapnum} placeholder, so if I missed something, hopefully one of them will speak up.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: How to get auto chapter numbers in TOC

Post by Nita Beck »

Yes, Lisa, you're right. One must edit the TOC properties for the books that begin the various chapters.

For the Chapter 1 TOC item, one needs to set a Chapter break and then to set the autonumbers to begin at 1. For all other chapter books, one must set a Chapter break but set the autonumbers to increment.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Post Reply