Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
Please post a screenshot of the LOF reference page in your list of figures.
Copy link to clipboard
Copied
Hi, here is the screenshot, including the paragraph designer
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks Rick! <$paranum>, <$paranumonly> did the job 🙂
Copy link to clipboard
Copied
I noticed that the cross referenced Figures are using the <$elemparanumonly> building block in order to number the figures within the text. This causes inconsistensy as the numbering of the referenced figures always starts from 1, ignoring the actual chapter number. If I would have been able to change the format to <$paranumonly>, the reference numbering should get corrected, I believe. Is there a way to replace the <$elemparanumonly> with <$paranumonly> under Format or get the <$elemparanumonly> block to reflect the current chapter number? See the attached screen shot for clarity.
Copy link to clipboard
Copied
As far as I know, the only way to edit Cross-Reference formats is through the Edit Format button of the unstructured Cross-Reference panel. In order to display this panel, go to one of the master pages, click in a text frame and choose Insert > Cross-Reference. Now you will see the Cross-Reference panel with the Edit Format button. You can click this button to change your Cross-Reference formats. There may be a more elegant way to display this, but I haven't figured it out yet.
Note that if you are working with .dita or .xml files, you will want to change the formats in your template.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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