Author: pete.muir(a)jboss.org
Date: 2008-03-28 13:41:31 -0400 (Fri, 28 Mar 2008)
New Revision: 7738
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-pdf.xsl
Log:
Better TOC
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-pdf.xsl
===================================================================
---
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-pdf.xsl 2008-03-28
17:10:29 UTC (rev 7737)
+++
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-pdf.xsl 2008-03-28
17:41:31 UTC (rev 7738)
@@ -225,4 +225,56 @@
</xsl:template>
+ <!--###################################################
+ Custom TOC (bold chapter titles)
+ ################################################### -->
+
+ <!-- Improve the TOC. -->
+ <xsl:template name="toc.line">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id" />
+ </xsl:variable>
+
+ <xsl:variable name="label">
+ <xsl:apply-templates select="." mode="label.markup"
/>
+ </xsl:variable>
+
+ <fo:block text-align-last="justify"
end-indent="{$toc.indent.width}pt"
+ last-line-end-indent="-{$toc.indent.width}pt">
+ <fo:inline keep-with-next.within-line="always">
+ <fo:basic-link internal-destination="{$id}">
+
+ <!-- Chapter titles should be bold. -->
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'chapter'">
+ <xsl:attribute
name="font-weight">bold</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:if test="$label != ''">
+ <xsl:copy-of select="$label" />
+ <xsl:value-of select="$autotoc.label.separator" />
+ </xsl:if>
+ <xsl:apply-templates select="."
mode="titleabbrev.markup" />
+ </fo:basic-link>
+ </fo:inline>
+ <fo:inline keep-together.within-line="always">
+ <xsl:text> </xsl:text>
+ <fo:leader leader-pattern="dots"
leader-pattern-width="3pt"
+ leader-alignment="reference-area"
+ keep-with-next.within-line="always" />
+ <xsl:text> </xsl:text>
+ <fo:basic-link internal-destination="{$id}">
+ <fo:page-number-citation ref-id="{$id}" />
+ </fo:basic-link>
+ </fo:inline>
+ </fo:block>
+ </xsl:template>
+
+ <!-- Include the chapter no -->
+ <xsl:param name="section.label.includes.component.label"
select="1"/>
+
+ <!-- Make the section depth in the TOC 2, same as html -->
+ <xsl:param name="toc.section.depth">2</xsl:param>
+
</xsl:stylesheet>
Show replies by date