docbook-apps

  • 1.  Re: [docbook-apps] indenting refsection titles

    Posted 01-26-2009 18:01
    Hi,
    This one is harder than it should be. The templates for refsection call some of the templates for section elements. I think that's done because the titles need to fit into the hierarchy of title typography, and refentry can appear an a variety of locations and section levels, so that the title size needs to be adjusted based on its context. As written, the templates call the "section.heading" template last, making those properties the innermost of the fo:blocks and hence overriding other attributes set for refsection.

    The simplest solution is to adjust the attribute-set "section.title.properties" in your customization layer. Something like this:

    <xsl:attribute-set name="section.title.properties">
    <xsl:attribute name="start-indent">
    <xsl:choose>
    <xsl:when test="ancestor-or-self::refsection"><xsl:value-of
    select="$body.start.indent"/></xsl:when>
    <xsl:otherwise>0pt</xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    </xsl:attribute-set>

    This assumes you don't want normal section titles indented. If you do, then adjust this as needed.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net





  • 2.  RE: [docbook-apps] indenting refsection titles

    Posted 01-27-2009 07:43
    Hi,
    thank you. Now it works as expected. The pitfall was the "ancestor-or-self::refsection". Before I only tried to test for "self::refsection" which did not give me the desired indentation.
    Pavel