Subfigure numbering with docbook 5

The Docbook definitive Guide does not mention subfigures. The Docbook xsl complete Guide does not either. I have a figure too large that the text can only be read by magnifying glass. So I wand two parts of it on two pages. But I cannot see how to number it correctly Fig. 1a and Fig. 1b. Can please point me in correct direction? Many thanks Bernhard -- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

Hi Bernhard, This is more of a DocBook issue than an Oxygen XML issue. Currently DocBook 5.1 does not support subfigures, but version 5.2 under development will support a new element named <formalgroup> which can contain one or more "formal" elements (table, figure, example, equation). That would allow for subfigures. However, there is currently no release date for DocBook 5.2, nor do the stylesheets support that element yet. For the current releases, I can only suggest a workaround. Put two mediaobjects in a figure element (they are allowed), and give each mediaobject a <caption> element whose para includes "a." or "b." and include subtitles there if needed. Maybe someone else has a better suggestion. Bob Stayton Sagehill Enterprises bobs@sagehill.net On 10/26/2018 12:09 PM, Bernhard Kleine wrote:
The Docbook definitive Guide does not mention subfigures.
The Docbook xsl complete Guide does not either.
I have a figure too large that the text can only be read by magnifying glass. So I wand two parts of it on two pages. But I cannot see how to number it correctly Fig. 1a and Fig. 1b. Can please point me in correct direction?
Many thanks
Bernhard
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hi Bob, unfortunately, your suggestion did not work. Obviously a figure is glued to one page, it cannot be spread on more than one. Therefore, the only thing that comes to my mind would be to reset the figure number by -1. Is this possible? Regards Bernhard Am 26.10.2018 um 22:48 schrieb Bob Stayton:
Hi Bernhard,
This is more of a DocBook issue than an Oxygen XML issue.
Currently DocBook 5.1 does not support subfigures, but version 5.2 under development will support a new element named <formalgroup> which can contain one or more "formal" elements (table, figure, example, equation). That would allow for subfigures. However, there is currently no release date for DocBook 5.2, nor do the stylesheets support that element yet.
For the current releases, I can only suggest a workaround. Put two mediaobjects in a figure element (they are allowed), and give each mediaobject a <caption> element whose para includes "a." or "b." and include subtitles there if needed. Maybe someone else has a better suggestion.
Bob Stayton Sagehill Enterprises bobs@sagehill.net On 10/26/2018 12:09 PM, Bernhard Kleine wrote:
The Docbook definitive Guide does not mention subfigures.
The Docbook xsl complete Guide does not either.
I have a figure too large that the text can only be read by magnifying glass. So I wand two parts of it on two pages. But I cannot see how to number it correctly Fig. 1a and Fig. 1b. Can please point me in correct direction?
Many thanks
Bernhard
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

Hi Bernhard, Actually, a figure does not have to be confined to one page. That is a stylesheet feature, not a feature of DocBook XML. In DocBook XSL, a figure element is processed to use the attribute-set named 'figure.properties', which by default is defined in fo/param.xsl as: <xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"/> In other words, it inherits the attributes set in 'formal.object.properties', and one of those attributes is: <xsl:attribute name="keep-together.within-column">always</xsl:attribute> It is this setting that tries to keep a figure to one page, which in most cases is what users want. However, a customization can change that behavior. For example: <xsl:attribute-set name="figure.properties"> <xsl:attribute name="keep-together.within-column"> <xsl:choose> <xsl:when test="count(d:mediaobject) > 1">inherit</xsl:when> <xsl:otherwise>always</xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:attribute-set> This is an example of overriding one xsl:attribute in an attribute-set. It also shows how the attribute-set is applied separately to each instance of figure, so you can count d:mediaobjects and relax the keep-together for those instances. These two sections in my book illustrate this method of customization: http://www.sagehill.net/docbookxsl/AttributeSets.html http://www.sagehill.net/docbookxsl/PrintTableStyles.html#TableTitle Bob Stayton Sagehill Enterprises bobs@sagehill.net On 10/26/2018 8:32 PM, Bernhard Kleine wrote:
Hi Bob,
unfortunately, your suggestion did not work. Obviously a figure is glued to one page, it cannot be spread on more than one. Therefore, the only thing that comes to my mind would be to reset the figure number by -1. Is this possible?
Regards
Bernhard
Am 26.10.2018 um 22:48 schrieb Bob Stayton:
Hi Bernhard,
This is more of a DocBook issue than an Oxygen XML issue.
Currently DocBook 5.1 does not support subfigures, but version 5.2 under development will support a new element named <formalgroup> which can contain one or more "formal" elements (table, figure, example, equation). That would allow for subfigures. However, there is currently no release date for DocBook 5.2, nor do the stylesheets support that element yet.
For the current releases, I can only suggest a workaround. Put two mediaobjects in a figure element (they are allowed), and give each mediaobject a <caption> element whose para includes "a." or "b." and include subtitles there if needed. Maybe someone else has a better suggestion.
Bob Stayton Sagehill Enterprises bobs@sagehill.net On 10/26/2018 12:09 PM, Bernhard Kleine wrote:
The Docbook definitive Guide does not mention subfigures.
The Docbook xsl complete Guide does not either.
I have a figure too large that the text can only be read by magnifying glass. So I wand two parts of it on two pages. But I cannot see how to number it correctly Fig. 1a and Fig. 1b. Can please point me in correct direction?
Many thanks
Bernhard
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com,www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user

HI Bob, works like a charm! Thanks a lot Bernhard Am 27.10.2018 um 07:39 schrieb Bob Stayton:
<xsl:attribute-set name="figure.properties"> <xsl:attribute name="keep-together.within-column"> <xsl:choose> <xsl:when test="count(d:mediaobject) > 1">inherit</xsl:when> <xsl:otherwise>always</xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:attribute-set>
-- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
participants (2)
-
Bernhard Kleine
-
Bob Stayton