I am facing a problem which is becoming a boomerang:
What is the best way to get consistent figure numbering in DITA documents throughout the chapters?
It is worth mentionming that I publish my DITA bookmap via the publish panel not using File-> Save as...
The problem is: If I use the Format: f:Figure <n+>:\t for figure:title, FrameMaker restarts the Figure caption number to 1 in every chapter. Consequently you have multiple figures with the same number in your document (bad idea).
If I set the figure.title Format to: f:Figure <$chapnum>.<n+>: \sn, the numbering becomes consistent but the cross referencing to those figures is not.
For this case, I have tried the following cross reference formats:
1. Figure with Number:
In the first case the chapnum is set to one in every chapter, i.e. all referenced Figures start with 1.some number follows.
2. any combination with Page number:
In this case the page number restarts from 1 in every chapter.
Conclusion is that none of the formats above would result in a correct referenced number. The only way to avoid wrong numbering would be to use the DITA Default Format, i.e. to avoid any number in the caption and to use just the text. The main issue with this format is that if you print the pdf on paper, it becomes difficult to go to the page where the figure is located, as you do not have any number rather than the text itself.
So my question is: how should I refer to figures in a DITA application in a reasonable way?
Based on standard FM, I've taken a quick look at one of my books, and note that:
Hope this gets you a bit closer to what you're aiming for!
[disclaimer: I don't let FM anywhere near my DITA files]
Hi, thank you for your reply. Your solution would work for standard or unstructured FM as you mentioned. I gave your solution a try on a DITA bookmap with xml content files. Unfortunately, I do not get the chapter numbers correctly. They stay 1. In other words <$paranum> generates something like: 1.# and # is the number of figure in that chapter.
Out of curiosity what software or package do you use to publish your DITA files?
Interestingly if I publish my DITA bookmap as it is using dita ot all the cross references as well as caption numbers come out just correctly. The only thing that I would miss would be the appearance that I currently get from the FM templates.
Thanks for letting me know. I would consider XML Mind in my next project. Yes I had tried <$paranumonly> as well. I guess the issue is rooted somewhere else. If i convert the ditamap to book with fm components, the references come out correctly in the book file, but not in the pdf!
I can't help you directly with this since I worked in DITA for barely 3 months and had nothing to do with creating EDDs or DTDs, but have you looked at Leximation's DITA-FMx plugin? It's a tool that assists in using DITA in the FM front-end, and one of its functions is to "Generate a PDF-ready FrameMaker book from a DITA map or bookmap; automatically apply pagination, numbering, custom templates, etc."
I haven't yet looked into Leximation as I thought I have to pay extra for a license.
I also noticed that using FM2019, the references come out correctly. Maybe there is an issue with FM2020.
Leximation isn't free, no. A single user license is $235 and includes a year of maintenance. My general opinion is that if something saves you time and pain, it's usually worth the cost.
Also, Scott Preston is very accessible and willing to help with issues.
I agree. On the other hand FM2020 has made great progress with DITA applications compared with the previous versions. And I believe by the time the final 2020 version is released, it will be near to perfect. I was also informed that the issue with xref numbering will be fixed soon.