Hi,

I have been able to follow http://www.sagehill.net/docbookxsl/Endnotes.html for End notes and got it working. I also got end of component - chapter etc working perfect as an alternative.

I would like to add two modifications to end notes at the back of the book:

1. Add the Title (ie. Notes) to the TOC with page number. Is there an
   easy way to do this for any new page.sequence? I have a contributors
   list that pulls from /d:book/d:info/d:authorgroup/d:author and the
   corresponding d:personblurb. I just need to add "Contributors" to
   the TOC just like "Notes".
2. Rather than a long list of the end notes. I would like the component
   and title as a header followed by the notes for that component. For
   example:

   *Chapter 1: Title of First Chapter*
   ^1. First note.
   ^2. Second note.

   *Chapter 2: Title of Second Chapter*
   ^1. First note.
   ^2. Second note.

My current xsl is below:

 <xsl:template match="d:footnote">
        <xsl:choose>
            <xsl:when test="ancestor::d:table or ancestor::d:informaltable">
                <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:when>
            <xsl:otherwise>
                <fo:inline>
                    <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>
                </fo:inline>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
<xsl:template match="d:footnote" mode="endnote">
        <fo:block xsl:use-attribute-sets="footnote.properties">
            <xsl:apply-templates />
        </fo:block>
    </xsl:template>
<xsl:template name="make.endnotes.list">
        <xsl:call-template name="page.sequence" mode="page.sequence">
            <xsl:with-param name="master-reference">back</xsl:with-param>
            <xsl:with-param name="content">
                <fo:block font-family="{$title.fontset}" text-align="center" font-weight="bold" 
font-size="14pt" space-before.optimum="0.25in">
                    <xsl:text>Notes</xsl:text>
                </fo:block>
                <xsl:apply-templates mode="endnote" select="//d:footnote" />
            </xsl:with-param>
            <xsl:with-param name="format">1</xsl:with-param>
        </xsl:call-template>
    </xsl:template>


Peter

Reply via email to