]> granicus.if.org Git - docbook-dsssl/commitdiff
Support make.clean.html in autotoc.xsl.
authorBob Stayton <bobs@sagehill.net>
Fri, 11 Dec 2009 00:33:17 +0000 (00:33 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 11 Dec 2009 00:33:17 +0000 (00:33 +0000)
xsl/html/autotoc.xsl
xsl/html/docbook.css.xml

index ffa50f61c667d5c3e19f9be5792b22915d04f0f7..22a3ed047b5dfe140de5aafbec197cda4ac899e9 100644 (file)
 
   <xsl:variable name="toc.title">
     <xsl:if test="$toc.title.p">
-      <p>
-        <b>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key">TableofContents</xsl:with-param>
-          </xsl:call-template>
-        </b>
-      </p>
+      <xsl:choose>
+        <xsl:when test="$make.clean.html != 0">
+          <div class="toc-title">
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key">TableofContents</xsl:with-param>
+            </xsl:call-template>
+          </div>
+        </xsl:when>
+        <xsl:otherwise>
+          <p>
+            <b>
+              <xsl:call-template name="gentext">
+                <xsl:with-param name="key">TableofContents</xsl:with-param>
+              </xsl:call-template>
+            </b>
+          </p>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:if>
   </xsl:variable>
 
 
   <xsl:if test="$nodes">
     <div class="list-of-{$titles}s">
-      <p>
-        <b>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key">
-              <xsl:choose>
-                <xsl:when test="$titles='table'">ListofTables</xsl:when>
-                <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
-                <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
-                <xsl:when test="$titles='example'">ListofExamples</xsl:when>
-                <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
-                <xsl:otherwise>ListofUnknown</xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:call-template>
-        </b>
-      </p>
+      <xsl:choose>
+        <xsl:when test="$make.clean.html != 0">
+          <div class="toc-title">
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key">
+                <xsl:choose>
+                  <xsl:when test="$titles='table'">ListofTables</xsl:when>
+                  <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
+                  <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
+                  <xsl:when test="$titles='example'">ListofExamples</xsl:when>
+                  <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
+                  <xsl:otherwise>ListofUnknown</xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:call-template>
+          </div>
+        </xsl:when>
+        <xsl:otherwise>
+          <p>
+            <b>
+              <xsl:call-template name="gentext">
+                <xsl:with-param name="key">
+                  <xsl:choose>
+                    <xsl:when test="$titles='table'">ListofTables</xsl:when>
+                    <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
+                    <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
+                    <xsl:when test="$titles='example'">ListofExamples</xsl:when>
+                    <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
+                    <xsl:otherwise>ListofUnknown</xsl:otherwise>
+                  </xsl:choose>
+                </xsl:with-param>
+              </xsl:call-template>
+            </b>
+          </p>
+        </xsl:otherwise>
+      </xsl:choose>
 
       <xsl:element name="{$toc.list.type}">
         <xsl:apply-templates select="$nodes" mode="toc">
index c1f558e03abcc0aec2b7b2bd375bdea9ae812bb5..d12673f84a75ceaa36957514260faeacbda90ba6 100644 (file)
@@ -47,4 +47,14 @@ span.msgexplan-title {
 /********************************/
 /* end of styles in block.xsl */
 /********************************/
+
+/********************************/
+/* start of styles in autotoc.xsl */
+/********************************/
+div.toc-title {
+  font-weight: bold;
+  margin-top: 1em;
+  margin-bottom: 1em;
+}
+
 </style>