• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Figure numbering restarts in every chapter (DITA)

Contributor ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

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?

TOPICS
Formatting and numbering , PDF output , Publishing , Structured

Views

538

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

Based on standard FM, I've taken a quick look at one of my books, and note that:

  • numbering options at book level are set to increase chapter numbers but restart paragraph numbering to 1 for each chapter
  • the numbering definition I've tested for figure captions is F:Figure <$chapnum>-<n+>.\t
  • the cross-reference format is <$paranum> <$paratext>, on page <$pagenum>
  • the result is see Figure 4-3. Removing the battery, on page 22

Hope this gets you a bit closer to what you're aiming for!

[disclaimer: I don't let FM anywhere near my DITA files] 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 18, 2020 Oct 18, 2020

Copy link to clipboard

Copied

  • have you tried <$paranumonly> instead of <$paranum>? I don't use it often, so I can't immediately visualise what results it might give in your case
  • since you ask, I use XML Mind: I was initially put off FM for DITA by the default formatting, which I didn't like and which (at least way back then) appeared impossible to adapt without major surgery, and took just as swift a dislike to Oxygen because of its (then) interface. XML Mind gives me the "there when you want it, not there when you don't" feeling of working with FM, and an unintrusive interface. Visually, it only took two small tweaks to get output – outdented headings, corporate colour for heading texts – that looks very close to the Bookmaster-derived styles I'd defined for FM.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 19, 2020 Oct 19, 2020

Copy link to clipboard

Copied

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! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 19, 2020 Oct 19, 2020

Copy link to clipboard

Copied

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."

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 19, 2020 Oct 19, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 19, 2020 Oct 19, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 20, 2020 Oct 20, 2020

Copy link to clipboard

Copied

LATEST

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines