Update documentation for 4.61 and some of the preparation tools.
[exim.git] / doc / doc-docbook / MyStyle-fo.xsl
index a23da64966a73c67dfe113a5b3682495a7c4a51f..f6731d392779240f25bfc01ddec297f3764d307d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Cambridge: exim/doc/doc-docbook/MyStyle-fo.xsl,v 1.3 2006/02/01 11:01:01 ph10 Exp $ -->
+<!-- $Cambridge: exim/doc/doc-docbook/MyStyle-fo.xsl,v 1.4 2006/04/04 14:03:49 ph10 Exp $ -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
@@ -25,6 +25,19 @@ specification. It is imported by MyStyle-filter-fo.xsl and MyStyle-spec-fo.xsl.
 
 <xsl:param name="fop.extensions" select="1"></xsl:param>
 
+<!-- Arrange for the table of contents to be an even number of pages. The name
+"lot" includes all pages that contain a "list of titles", which in our case is
+only the TOC. -->
+
+<xsl:template name="force.page.count">
+  <xsl:param name="element" select="local-name(.)"/>
+  <xsl:param name="master-reference" select="''"/>
+  <xsl:choose>
+    <xsl:when test="$master-reference = 'lot'">end-on-even</xsl:when>
+    <xsl:otherwise>no-force</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
 <!-- Allow for typed index entries. The "role" setting works with DocBook
 version 4.2 or earlier. Later versions (which we are not currently using)
 need "type". -->