OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Sidebar in XSL-FO


Just in case anybody's interested, the following XSL customization creates a
decent-looking side-floating sidebar in XEP with footnotes:

  <xsl:attribute-set name="sidebar.properties">
    <xsl:attribute name="width">2.5in</xsl:attribute>
    <xsl:attribute name="padding-left">1em</xsl:attribute>
    <xsl:attribute name="padding-right">1em</xsl:attribute>
    <xsl:attribute name="start-indent">2em</xsl:attribute>
  </xsl:attribute-set>

  <xsl:template match="sidebar">
    <fo:float float="outside">
      <fo:block xsl:use-attribute-sets="sidebar.properties">
        <xsl:if test="./title">
          <fo:block font-weight="bold"
            keep-with-next.within-column="always"
            hyphenate="false">
            <xsl:apply-templates select="./title"
mode="sidebar.title.mode"/>
          </fo:block>
        </xsl:if>
        
        <xsl:apply-templates/>
        <xsl:if test=".//footnote">
          <fo:block font-family="{$body.font.family}"
            font-size="{$footnote.font.size}"
            keep-with-previous="always">
            <xsl:apply-templates select=".//footnote"
mode="table.footnote.mode"/>
          </fo:block>
        </xsl:if>
      </fo:block>
    </fo:float>
  </xsl:template>

  <xsl:template match="sidebar//footnote">
    <xsl:call-template name="format.footnote.mark">
      <xsl:with-param name="mark">
        <xsl:apply-templates select="." mode="footnote.number"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:template>

Jeff Beal
Tools Specialist
ANSYS, Inc.
(724) 514-3150


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]