Skip to main content
hadih26673991
Inspiring
December 28, 2020
Answered

DITA fig element: title distorted if MoveFigureTitleToFollowImage=1

  • December 28, 2020
  • 1 reply
  • 1212 views

Hi,

I have a small problem with the fig element. Here is how I use it:

If I use the flag MoveFigureTitleToFollowImage=1 in the ditafm-ouput.ini as it is per default in FM, the title of the image becomes tiny and the title numbering vanishes:

+

However if I set MoveFigureTitleToFollowImage to 0, the title size will be normal and the numbering is also there but the title appears on top of the image which is not nice:

A remedy to avoid the change of the title would be to separate the image element from the fig element and put the image on top of the fig element. In other words to decouple the two. The bad thing about it is that the two may separate, e.g. if the image is at the end of the page, the title can move to the next page. Any idea how to solve this issue?

This topic has been closed for replies.
Correct answer Kunal Puri

Hi Hadi,

 

Wishing you a very Happy New Year to you as well.

 

Regarding your query, it can be fixed by importing the following DITA Base template in your STS File:
https://documentcloud.adobe.com/link/track?uri=urn:aaid:scds:US:663c11aa-3377-4501-a48d-42f9371ab679

Basically, this template is same as the original DITA Base Template plus it contains element definition of fm-figtitle in the EDD. Here is the screenshot of the element definition:

 

This change may result the Figure Title coming twice in the List of Figures section.

In order to fix it, you have to make some changes in ditafm-output.ini.

  1. Go to [BookWithFM-ListofFigures] section in ditafm-output.ini.
  2. Remove fm-figtitle from ElementTags field.

 

After the changes, your ditafm-output.ini should look like this:

...
[BookWithFM-ListofFigures]
Template=ListofFiguresTpl.fm
ElementTags=
ParaTags=figure.title|FigureTitle.LwDITA
...

 

These changes will surely be integrated in future FM updates.

 

Hope this helps,

Kunal Puri

1 reply

Adobe Employee
January 2, 2021

Hi Hadi,

 

Hope you are doing good.

 

In order to help you with your query, Some additional information is required to fully understand the problem:

 

  1. The FM Version that you are using.
  2. The route through which you are generating PDF (Composite Route / Book with FM Components Route / Flat Book route)
  3. If you are using FM2020, Is the behaviour observed with the default STS?

 

Request you to share the above information.

 

Thanks,

Kunal Puri

hadih26673991
Inspiring
January 4, 2021

Hi Kunal,

Thank you for getting back. 

1. I use FM 2020 16.01.831 (should be the current version). I also tried it with FM2019 same happens.

2. I use the Publish panel to generate PDF. To do this, in DITA options toggle on Save PDF via Book with components route and select all the subsequent options, including Generate flat Book hierarchy.

3. If you follow the steps above you can reproduce the same behavior using the default sts file, otherwise it is fine. But For me it is no option not to use the Book with components and flat book hierarchy.

I hope this helps and wish you a happy new year.

Hadi 

hadih26673991
Inspiring
February 10, 2021

Hi Kunal, I was experimenting with the KeepWithPrevious rule in the edd of ditabase1.3.template.fm file in order to change the behavior of the fig element similarly to keep it on the same page with the previous element that comes on that page, but I was not successful. That is it did not keep the figure together with the previous element in the published pdf file. See a screenshot of the fig element from the edd. There you see under Text format rules, I have added the same block as you did with the figtitle. Any idea what I am doing wrong?


I guess I solved my own mystery. The solution I found is to put the all context rules after the conditional rules. See: