Skip to main content
hadih26673991
Inspiring
June 25, 2020
Answered

building block <$chapnum> not showing the correct chapter number in the list of figures

  • June 25, 2020
  • 1 reply
  • 859 views

I am trying to modify the ListofFiguresTpl.fm template that I use in my DITA project in order to change the numbering of the figures, appearing in the List of figures part.

The reason is that the default numbering, as it is, restarts the figure numbers in each chapter to 1 then adds up the numbers throughout the chapter. However, in the list of figures, appearing in the end of the book, the numbers are accumulating. Consequently for the same figure you get two different numbers in the chapter and in the LOF. So I decided to change the numbering by adding the chapter number first then the figure number within that chapter. I first modified the ChapterOutputTpl.fm using the paragraph designer: f:Figure <$chapnum>.<n+>:\t. This works fine. However when I do the same in the ListofFiguresTpl.fm, the chapter number is always 1.

This topic has been closed for replies.
Correct answer frameexpert

Don't use autonumbering in the list of figures paragraphs. Use the <$paranum>, <$paranumonly>, <$elemnum>, or <$elemnumonly> building blocks to pick up the numbers from the source paragraphs themselves.

1 reply

frameexpert
Community Expert
Community Expert
June 25, 2020

Please post a screenshot of the LOF reference page in your list of figures.

hadih26673991
Inspiring
June 25, 2020

Hi, here is the screenshot, including the paragraph designer

frameexpert
Community Expert
Community Expert
June 30, 2020

Thank you, it makes sense what you suggested. So, I did as you said: changed the format in all my local templates. Unfortunately, it did not do the job as the chapter number in the cross-referenced figures (in this case) is stubornly 1 everywhere.

Then, in order to double check this, I changed the original FM templates in ...\Adobe FrameMaker 2020\Structure\xml\DITA\outputTemplates to see if the FM graphical user interface changes the <$elemparanumonly> to <$paranumonly> which it did not. The text appearing in my previous screenshot should have come from some template, or is it hard-coded?


The chapter number is usually set at the book level by right-clicking on the book component and choosing Numbering. Or you can set it at the document level by choosing Format > Document > Numbering. If you want me to look at it via a web meeting, please contact me offlist. Thanks. rick at frameexpert dot com