How to make figure title below the figure image in task topic(OT2.5)

lisazeng
Posts: 29

How to make figure title below the figure image in task topic(OT2.5)

Fri Sep 01, 2017 5:07 am

Hi Dita expert,

As the default setting, figure title is below the figure image.

However, in my PDF, figure tiles are above the figure images which are added in the Oxygen task topic,while figure tiles are blow the figure images which are added in the Oxygen concept topic.

How should I set?

Thanks!

br

Lisa
Radu
Posts: 5090

Re: How to make figure title below the figure image in task topic(OT2.5)

Mon Sep 04, 2017 9:29 am

Hi Lisa,

There is a DITA OT plugin-in:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.pdf.custom

which Oxygen ships with its default bundled DITA OTs in order to move the figure title above the image no matter in what topic type the figure is included.
If you are using an external DITA OT do you have this plugin installed in the DITA OT that you are using?
Maybe there is a difference in title placement behavior because you have a custom PDF customization plugin which may also match the DITA figure and perform custom processing for it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
lisazeng99
Posts: 1

Re: How to make figure title below the figure image in task topic(OT2.5)

Thu Sep 14, 2017 11:57 am

Hi Radu,

Thanks for your suggestion. I aslo checked the plugin.

To fix this issue
1. In below template, make sure red line (image) is above blue line (figure title)
<xsl:template match="*[contains(@class,' topic/fig ')]">
<fo:block xsl:use-attribute-sets="fig">
<xsl:call-template name="commonattributes"/>
<xsl:call-template name="setFrame"/>
<xsl:call-template name="setExpanse"/>
<xsl:if test="not(@id)">
<xsl:attribute name="id">
<xsl:call-template name="get-id"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="*[not(contains(@class,' topic/title '))]"/>
<xsl:apply-templates select="*[contains(@class,' topic/title ')]"/>
</fo:block>
</xsl:template>

2. after step 1 is confirmed while the figure title is still on the above of image. check the figure structure in dita.
my code is below, so the image will be always under the title, since it is in title.
fig
---title
--image
so, I changed the structure like below: title and image are in the same level. then the title is under image now as the "topic/fig" wishes.
fig
---title
---image

Thanks again!

br,
Lisa
Radu
Posts: 5090

Re: How to make figure title below the figure image in task topic(OT2.5)

Thu Sep 14, 2017 12:08 pm

Hi Lisa,

Thanks for the update.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests