labelling figures

Questions about XML that are not covered by the other forums should go here.
bjlockie
Posts: 7
Joined: Fri Jun 04, 2010 8:41 pm

labelling figures

Post by bjlockie » Mon Jun 07, 2010 11:33 pm

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?

Radu
Posts: 6654
Joined: Fri Jul 09, 2004 5:18 pm

Re: labelling figures

Post by Radu » Tue Jun 08, 2010 8:45 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

samuelraymonds
Posts: 2
Joined: Tue Dec 28, 2010 8:31 am
Contact:

Re: labelling figures

Post by samuelraymonds » Wed Mar 23, 2011 9:46 am

any links to tutorials related to this?

Radu
Posts: 6654
Joined: Fri Jul 09, 2004 5:18 pm

Re: labelling figures

Post by Radu » Wed Mar 23, 2011 11:33 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

daz
Posts: 13
Joined: Wed Nov 17, 2010 8:44 am

Re: labelling figures

Post by daz » Wed Jul 13, 2011 9:14 am

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.

Radu
Posts: 6654
Joined: Fri Jul 09, 2004 5:18 pm

Re: labelling figures

Post by Radu » Wed Jul 13, 2011 11:44 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply