Page 1 of 1
labelling figures
Posted: Mon Jun 07, 2010 11:33 pm
by bjlockie
I created a 'fig' in a topic and it is labelled 'Figure 1: my title'.
The my title is what I put in the 'title' element.
When it is assembled into a book, it might be Figure 7.1 (chapter 7, first figure).
How do I control how DITA numbers figures?
Re: labelling figures
Posted: Tue Jun 08, 2010 8:45 am
by Radu
Hi,
There is a default configuration file located in:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/cfg/common/vars/en_US.xml
which contains the standard pattern for rendering a figure using IDIOM PDF:
<variable id="Figure">........
This pattern is then used from the:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/commons.xsl
in the template:
<xsl:template match="*[contains(@class,' topic/fig ')]/*[contains(@class,' topic/title ')]">........
By default the figure number seems to be represented by the total number of figures with title which were generated before it.
Regards,
Radu
Re: labelling figures
Posted: Wed Mar 23, 2011 9:46 am
by samuelraymonds
any links to tutorials related to this?
Re: labelling figures
Posted: Wed Mar 23, 2011 11:33 am
by Radu
Hi,
This tutorial explains some DITA Open Toolkit PDF customizations:
http://www.scriptorium.com/whitepapers/ ... tweaks.pdf
The DITA Users List is also a good place to ask DITA customization questions:
http://tech.groups.yahoo.com/group/dita-users/
Regards,
Radu
Re: labelling figures
Posted: Wed Jul 13, 2011 9:14 am
by daz
Is there any way you can cross reference <fig> numbering in the body paragraph?
As far as I know you can add a <ph> phrase element tag on a figure title. Add an ID to that <ph> element and cross reference it.
Re: labelling figures
Posted: Wed Jul 13, 2011 11:44 am
by Radu
Hi,
As far as I know, if you set an id on the <fig> and then make a cross reference <xref/> to that id, the figure number and title will be displayed in the published output.
Regards,
Radu