Moving Figure Title Below Figure

Here should go questions about transforming XML with XSLT and FOP.
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

Moving Figure Title Below Figure

Post 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?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Moving Figure Title Below Figure

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

Re: Moving Figure Title Below Figure

Post by dgallo »

Is there an easy way to move the title and desc for images wrapped in a figure below the image?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Moving Figure Title Below Figure

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

Re: Moving Figure Title Below Figure

Post 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.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Moving Figure Title Below Figure

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ionela
Posts: 402
Joined: Mon Dec 05, 2011 6:08 pm

Re: Moving Figure Title Below Figure

Post 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
Ionela Istodor
oXygen XML Editor and Author Support
Post Reply