Page 1 of 1

Moving Figure Title Below Figure

Posted: Fri May 13, 2016 10:18 pm
by dgallo
Hello,

How can I move the a figure and/or table's <title> and <desc> below the image and/or table in webhelp output?

Re: Moving Figure Title Below Figure

Posted: Mon May 16, 2016 3:38 pm
by Radu
Hi,

There are no parameters to control this. Also in my opinion if you have a large table setting the title below it will not work as the end user will not see the title from the beginning.
But you can probably create an XHTML XSLT customization for this.
The XSLTs which are used to generate the XHTML output are located here:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT2.x/plugins/org.dita.xhtml/

so maybe you could try to use our Find/Replace in Files utility to search in it for XSLT templates matching topic/fig and topic/table and try to see how the XSLT can be changed to output the table and figure titles at the end.

Regards,
Radu

Re: Moving Figure Title Below Figure

Posted: Mon May 16, 2016 4:11 pm
by dgallo
Is there an easy way to move the title and desc for images wrapped in a figure below the image?

Re: Moving Figure Title Below Figure

Posted: Mon May 16, 2016 4:19 pm
by Radu
For anybody else reading this thread, I'm adding the link to the question you asked on the DITA Users List:

https://groups.yahoo.com/neo/groups/dit ... ages/40110

Regards,
Radu

Re: Moving Figure Title Below Figure

Posted: Mon May 16, 2016 4:27 pm
by dgallo
Your first suggestion was not very specific. I do not know xls or xlst so that is not helpful. Also, there are a ton of files in the org.dita.xhtml plugin folder, so I am not sure which one I need to be looking at.

Re: Moving Figure Title Below Figure

Posted: Tue May 17, 2016 10:54 am
by Radu
Hi,

For a possible XSLT patch, assuming that you are publishing using the DITA Open Toolkit 1.8.5 bundled with Oxygen, in the XSLT stylesheet:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl

there is an XSLT template which outputs the figure element:

Code: Select all

  <xsl:template match="*[contains(@class,' topic/fig ')]" mode="fig-fmt">
in which you can move the code:

Code: Select all

<xsl:call-template name="place-fig-lbl"/>
one line lower in the XSLT so that the title is output after the image reference.

As another possible approach in a similar post one of my colleagues suggested a CSS-based approach for this:

post37671.html

so this might be easier to accomplish than an XSLT customization.

Regards,
Radu

Re: Moving Figure Title Below Figure

Posted: Fri Oct 22, 2021 1:15 pm
by ionela
Hi,

Just to update the thread, version 24.0 of oXygen XML has been released the following improvement was implemented:
Control the Placement of Titles for Tables and Figures
New transformation parameters (webhelp.figure.title.placement and webhelp.table.title.placement) can be used to control whether the titles of tables or figures appear at the top or bottom of the component.

The complete what's new list is available here:
What's New in Oxygen XML WebHelp 24
What's New in Oxygen XML Editor 24

You can download v24.0 from our website:
Download Oxygen XML Products

Let us know if you encounter further problems with the new version.

Regards,
Ionela