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
frameexpertCommunity ExpertCorrect answer
Community Expert
June 25, 2020

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.