docbook-apps

Re: [docbook-apps] Left aligning

  • 1.  Re: [docbook-apps] Left aligning

    Posted 07-14-2007 16:53
    Well, it worked because it is a global parameter that sets the default for
    the entire document. You will notice that all your paragraphs are
    left-aligned now.

    In my opinion, certain elements should always be left-aligned, and
    glossterm is one of them because it fits inside a small area. If you want
    to fix yours, you can customize the template that starts this way instead:

    <xsl:template match="glossentry" mode="glossary.as.list">
    <xsl:variable name="id">
    <xsl:call-template name="object.id"/>
    </xsl:variable>

    <fo:list-item xsl:use-attribute-sets="normal.para.spacing">
    <xsl:call-template name="anchor">
    <xsl:with-param name="conditional">
    <xsl:choose>
    <xsl:when test="$glossterm.auto.link != 0
    or $glossary.collection != ''">0</xsl:when>
    <xsl:otherwise>1</xsl:otherwise>
    </xsl:choose>
    </xsl:with-param>
    </xsl:call-template>

    <fo:list-item-label end-indent="label-end()">
    <fo:block text-align="left">
    ....

    I changed the last line shown to add the text-align property. This is the
    block inside the left part of the list-block that contains the term and the
    acronym, so now they will stay within the same block and not produce a line
    break.

    Bob Stayton
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net