How to disable table and figure title auto caption labeling
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 48
- Joined: Sat Jan 26, 2013 6:07 pm
How to disable table and figure title auto caption labeling
Post by mstrubberg »
How can I disable the auto caption labeling in a table to prevent the html output from applying Table (number) on each table <title> element?
How can I disable the auto caption labeling in a figure to prevent the html output from apply Figure (number) on each figure <title> element?
How can I disable the auto caption labeling in a figure to prevent the html output from apply Figure (number) on each figure <title> element?
-
- Posts: 48
- Joined: Sat Jan 26, 2013 6:07 pm
Re: How to disable table and figure title auto caption label
Post by mstrubberg »
Is this done in the strings files?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: How to disable table and figure title auto caption label
Post by sorin_ristache »
Hi,
There is no parameter in the transformation for that. To disable the static label that precedes a table title please remove or comment out the entire element xsl:choose that starts at line 3724 in file [Oxygen-install-dir]\frameworks\dita\DITA-OT\xsl\xslhtml\dita2htmlImpl.xsl.
Disabling the static label for the figure titles is already implemented in Oxygen. I checked in the installation directory of Oxygen 15.0 and 14.2. The entire xsl:choose element at line 3805 in the same file dita2htmlImpl.xsl is already comment out, so you should not get a label like Figure 1. in a figure title in the DITA XHTML transformation, or the DITA Webhelp one, or the DITA Windows Help (CHM) one. Do you get a label like Figure 1. in a figure title in Oxygen 15.0 or in Oxygen 14.2?
Regards,
Sorin
There is no parameter in the transformation for that. To disable the static label that precedes a table title please remove or comment out the entire element xsl:choose that starts at line 3724 in file [Oxygen-install-dir]\frameworks\dita\DITA-OT\xsl\xslhtml\dita2htmlImpl.xsl.
Disabling the static label for the figure titles is already implemented in Oxygen. I checked in the installation directory of Oxygen 15.0 and 14.2. The entire xsl:choose element at line 3805 in the same file dita2htmlImpl.xsl is already comment out, so you should not get a label like Figure 1. in a figure title in the DITA XHTML transformation, or the DITA Webhelp one, or the DITA Windows Help (CHM) one. Do you get a label like Figure 1. in a figure title in Oxygen 15.0 or in Oxygen 14.2?
Regards,
Sorin
-
- Posts: 48
- Joined: Sat Jan 26, 2013 6:07 pm
Re: How to disable table and figure title auto caption label
Post by mstrubberg »
Sorin, The xsl:choose you indicated was not already commented out in our download of 14.2 but we see that it is already commented out in 15.0. After commenting out the xsl:choose in 14.2 in dita2htmlImpl.xsl, on compose to webhelp and xhtml, the table and figure caption no longer contains the auto generated Table 1 or Figure 1 caption text and only the <title> text displays.
Many thanks!
Many thanks!
-
- Posts: 1
- Joined: Wed Nov 20, 2013 10:26 pm
Re: How to disable table and figure title auto caption label
Post by JasonDavis »
Hi Sorin,
Can you provide guidance on how to do this for a PDF transform? I was looking through the templates for tables as that seemed like the right place to address this. While it's easy to remove the autonumbering, removing the label all together without deleting the title was a bit more complicated.
Thanks,
Jason
Can you provide guidance on how to do this for a PDF transform? I was looking through the templates for tables as that seemed like the right place to address this. While it's easy to remove the autonumbering, removing the label all together without deleting the title was a bit more complicated.
Thanks,
Jason
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: How to disable table and figure title auto caption label
Post by sorin_ristache »
Hi Jason,
For PDF output you have to customize the template that creates the tables in the XSLT stylesheets for PDF output. You should look in the template:
in the file:
Regards,
Sorin
For PDF output you have to customize the template that creates the tables in the XSLT stylesheets for PDF output. You should look in the template:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/table ')]/*[contains(@class, ' topic/title ')]">
Code: Select all
[Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\xsl\fo\tables.xsl
Regards,
Sorin
-
- Posts: 2
- Joined: Tue Sep 27, 2016 8:25 pm
Re: How to disable table and figure title auto caption labeling
Hello,
An old thread, but I've the current issue. How would I disable the auto caption/label for table titles in Oxygen 18? Apparently the path to the XSL has changed.
Thanks.
An old thread, but I've the current issue. How would I disable the auto caption/label for table titles in Oxygen 18? Apparently the path to the XSL has changed.
Thanks.
-
- Posts: 404
- Joined: Thu Aug 21, 2003 11:36 am
- Location: Craiova
- Contact:
Re: How to disable table and figure title auto caption labeling
Post by radu_pisoi »
Hi,
oXygen 18 comes bundled with two versions of DITA-OT: 1.8.5 and 2.2.3. The path for DITA-OT 1.8.5 is [Oxygen-install-dir]\frameworks\dita\DITA-OT while the path for DITA-OT 2.2.3 is [Oxygen-install-dir]\frameworks\dita\DITA-OT2.x. The default DITA-OT used by oXygen is DITA-OT 2.3.2.
However, the XSLT stylesheet used to handle the tables is in the same location: {DITA-OT folder}/plugins/org.dita.pdf2/xsl/fo/tables.xsl.
Another option to change the text generated for table title is to redefine the 'Table.title' variable. By default its value is:
For instance, to display only the table title you can redefine it to the value:
The PDF plugin variables are declared in the '{DITA-OT folder}/plugins/org.dita.pdf2/cfg/common/vars/en.xml'. You need to create a PDF customization plugin that overrides the above variable. You can read about how to create a PDF customization plugin here:
http://www.dita-ot.org/dev/dev_ref/pdf- ... ample.html
Please note that I've tested this solution only with DITA-OT 2.2.3.
oXygen 18 comes bundled with two versions of DITA-OT: 1.8.5 and 2.2.3. The path for DITA-OT 1.8.5 is [Oxygen-install-dir]\frameworks\dita\DITA-OT while the path for DITA-OT 2.2.3 is [Oxygen-install-dir]\frameworks\dita\DITA-OT2.x. The default DITA-OT used by oXygen is DITA-OT 2.3.2.
However, the XSLT stylesheet used to handle the tables is in the same location: {DITA-OT folder}/plugins/org.dita.pdf2/xsl/fo/tables.xsl.
Another option to change the text generated for table title is to redefine the 'Table.title' variable. By default its value is:
Code: Select all
<variable id="Table.title">Table <param ref-name="number"/>: <param ref-name="title"/></variable>
Code: Select all
<variable id="Table.title"><param ref-name="title"/></variable>
http://www.dita-ot.org/dev/dev_ref/pdf- ... ample.html
Please note that I've tested this solution only with DITA-OT 2.2.3.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 26
- Joined: Tue Aug 27, 2019 10:55 pm
Re: How to disable table and figure title auto caption labeling
Hrrumph! For Oxygen 22 (and probably 21), I thought that the file is:
{DITA-OT}\dita-ot-3.4\plugins\org.dita.html5\xsl\tables.xsl
and the "xsl:choose" section to comment out is lines 376-424
But commenting out those lines doesn't change the behaviour.
{DITA-OT}\dita-ot-3.4\plugins\org.dita.html5\xsl\tables.xsl
and the "xsl:choose" section to comment out is lines 376-424
But commenting out those lines doesn't change the behaviour.

-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to disable table and figure title auto caption labeling
Hi,
The thread above is for the PDF output. You seem to be making changes to the HTML5 XSLT stylesheets.
Could you maybe tell us again what behavior you want to change and for what output format?
Regards,
Radu
The thread above is for the PDF output. You seem to be making changes to the HTML5 XSLT stylesheets.
Could you maybe tell us again what behavior you want to change and for what output format?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service