docbook-apps

  • 1.  Re: [docbook-apps] Caption spacing in mediaobject

    Posted 02-13-2007 09:40
    Hi,
    You could do two things:

    1. Remove the para wrapper in the caption. A caption doesn't require a
    para to contain its text, and the para uses the normal.para.spacing
    attribute-set that adds extra space.

    2. Customize the template that handles caption, from fo/graphics.xsl:

    <xsl:template match="caption">
    <fo:block>
    <xsl:if test="@align = 'right' or @align = 'left' or @align='center'">
    <xsl:attribute name="text-align"><xsl:value-of
    select="@align"/></xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
    </fo:block>
    </xsl:template>

    You can add spacing properties to the fo:block element. There really ought
    to be a caption.properties attribute-set, if you care to file a feature
    request on the DocBook SourceForge site. 8^)

    Bob Stayton
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net





  • 2.  Re: [docbook-apps] Caption spacing in mediaobject

    Posted 02-15-2007 07:43
    Thanks! Removing the <para> wrapper helped a lot.

    Tav

    On Tue, 2007-02-13 at 01:39 -0800, Bob Stayton wrote:
    > Hi,
    > You could do two things:
    >
    > 1. Remove the para wrapper in the caption. A caption doesn't require a
    > para to contain its text, and the para uses the normal.para.spacing
    > attribute-set that adds extra space.
    >
    > 2. Customize the template that handles caption, from fo/graphics.xsl:
    >
    > <xsl:template match="caption">
    > <fo:block>
    > <xsl:if test="@align = 'right' or @align = 'left' or @align='center'">
    > <xsl:attribute name="text-align"><xsl:value-of
    > select="@align"/></xsl:attribute>
    > </xsl:if>
    > <xsl:apply-templates/>
    > </fo:block>
    > </xsl:template>
    >
    > You can add spacing properties to the fo:block element. There really ought
    > to be a caption.properties attribute-set, if you care to file a feature
    > request on the DocBook SourceForge site. 8^)
    >
    > Bob Stayton
    > Sagehill Enterprises
    > DocBook Consulting
    > bobs@sagehill.net
    >
    >
    >