docbook-apps

  • 1.  Re: [docbook-apps] landscape appendix

    Posted 01-30-2007 07:40
    Actually, you don't need to resort to PSMI if you are landscaping and
    entire chapter, appendix, or any other element that generates its own
    page-sequence. Each page sequence has a page-master that can be defined
    with landscape dimensions if you choose. You can use the
    'user.pagemasters' template to define a landscape page-master, and
    'select.user.pagemaster' to select it. See this reference for more
    information:

    http://www.sagehill.net/docbookxsl/PageDesign.html

    For example, if you define a page-sequence-master with
    master-name="body-landscape", then you can use @role to select it:

    <xsl:template name="select.user.pagemaster">
    <xsl:param name="element"/>
    <xsl:param name="pageclass"/>
    <xsl:param name="default-pagemaster"/>

    <xsl:choose>
    <xsl:when test="@role = 'land'">
    <xsl:value-of select="concat($default-pagemaster, '-landscape')"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$default-pagemaster"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>

    The PSMI is needed when you want to landscape only part of a page-sequence,
    typically for long tables. PSMI breaks one page-sequence into several in a
    post-processing step.

    Bob Stayton
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net





  • 2.  Re: [docbook-apps] landscape appendix

    Posted 02-01-2007 20:46
    Thanks Bob, that works perfectly for an <appendix> in a <book>. It
    also works for an <appendix> on its own.

    ***BUT*** it does not work for <appendix> in an
    , or an
    <appendix> in an
    within a book.

    I presume that
    must generate its own page-sequence which
    includes any <appendix>. Is this correct?

    For appendices in an article we seem to be stuck with a second pass PSMI.

    Ron

    >Actually, you don't need to resort to PSMI if you are landscaping
    >and entire chapter, appendix, or any other element that generates
    >its own page-sequence. Each page sequence has a page-master that
    >can be defined with landscape dimensions if you choose. You can use
    >the 'user.pagemasters' template to define a landscape page-master,
    >and 'select.user.pagemaster' to select it. See this reference for
    >more information:
    >
    >http://www.sagehill.net/docbookxsl/PageDesign.html
    >
    >For example, if you define a page-sequence-master with
    >master-name="body-landscape", then you can use @role to select it:
    >
    ><xsl:template name="select.user.pagemaster">
    > <xsl:param name="element"/>
    > <xsl:param name="pageclass"/>
    > <xsl:param name="default-pagemaster"/>
    >
    > <xsl:choose>
    > <xsl:when test="@role = 'land'">
    > <xsl:value-of select="concat($default-pagemaster, '-landscape')"/>
    > </xsl:when>
    > <xsl:otherwise>
    > <xsl:value-of select="$default-pagemaster"/>
    > </xsl:otherwise>
    > </xsl:choose>
    ></xsl:template>
    >
    >The PSMI is needed when you want to landscape only part of a
    >page-sequence, typically for long tables. PSMI breaks one
    >page-sequence into several in a post-processing step.
    >
    >Bob Stayton
    >Sagehill Enterprises
    >DocBook Consulting
    >bobs@sagehill.net
    >
    >
    >