f011aa5
diff -ruNp docbook-xsl-1.74.0.orig/fo/pagesetup.xsl docbook-xsl-1.74.0/fo/pagesetup.xsl
f011aa5
--- docbook-xsl-1.74.0.orig/fo/pagesetup.xsl	2008-06-01 23:36:39.000000000 +0200
f011aa5
+++ docbook-xsl-1.74.0/fo/pagesetup.xsl	2008-08-06 13:31:11.000000000 +0200
f8d850b
@@ -1697,45 +1697,99 @@
eb2f94a
         <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
       </xsl:call-template>
f011aa5
 
eb2f94a
-      <fo:table-column column-number="1">
eb2f94a
-        <xsl:attribute name="column-width">
859d76a
-          <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
-          <xsl:call-template name="header.footer.width">
eb2f94a
-            <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
-            <xsl:with-param name="position" select="$column1"/>
f8d850b
-            <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
-            <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
-          </xsl:call-template>
859d76a
-          <xsl:text>)</xsl:text>
eb2f94a
-        </xsl:attribute>
eb2f94a
-      </fo:table-column>
eb2f94a
-      <fo:table-column column-number="2">
eb2f94a
-        <xsl:attribute name="column-width">
859d76a
-          <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
-          <xsl:call-template name="header.footer.width">
eb2f94a
-            <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
-            <xsl:with-param name="position" select="2"/>
f8d850b
-            <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
-            <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
-          </xsl:call-template>
859d76a
-          <xsl:text>)</xsl:text>
eb2f94a
-        </xsl:attribute>
eb2f94a
-      </fo:table-column>
eb2f94a
-      <fo:table-column column-number="3">
eb2f94a
-        <xsl:attribute name="column-width">
859d76a
-          <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
-          <xsl:call-template name="header.footer.width">
eb2f94a
-            <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
-            <xsl:with-param name="position" select="$column3"/>
f8d850b
-            <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
-            <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
-          </xsl:call-template>
859d76a
-          <xsl:text>)</xsl:text>
eb2f94a
-        </xsl:attribute>
eb2f94a
-      </fo:table-column>
eb2f94a
+      <xsl:choose>
eb2f94a
+        <xsl:when test="$passivetex.extensions != 0">
eb2f94a
+          <fo:table-column column-number="1">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="$column1"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>%</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:when>
eb2f94a
+        <xsl:otherwise>
eb2f94a
+          <fo:table-column column-number="1">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="$column1"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>)</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:otherwise>
eb2f94a
+			</xsl:choose>
eb2f94a
+      <xsl:choose>
eb2f94a
+        <xsl:when test="$passivetex.extensions != 0">
eb2f94a
+          <fo:table-column column-number="2">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="2"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>%</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:when>
eb2f94a
+        <xsl:otherwise>
eb2f94a
+          <fo:table-column column-number="2">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="2"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>)</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:otherwise>
eb2f94a
+      </xsl:choose>
eb2f94a
+      <xsl:choose>
eb2f94a
+        <xsl:when test="$passivetex.extensions != 0">
eb2f94a
+          <fo:table-column column-number="3">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="$column3"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>%</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:when>
eb2f94a
+        <xsl:otherwise>
eb2f94a
+          <fo:table-column column-number="3">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">header</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="$column3"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>)</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:otherwise>
eb2f94a
+      </xsl:choose>
f011aa5
 
eb2f94a
       <fo:table-body>
eb2f94a
         <fo:table-row>
f8d850b
@@ -2021,45 +2066,99 @@
eb2f94a
         <xsl:with-param name="sequence" select="$sequence"/>
eb2f94a
         <xsl:with-param name="gentext-key" select="$gentext-key"/>
859d76a
       </xsl:call-template>
eb2f94a
-      <fo:table-column column-number="1">
eb2f94a
-        <xsl:attribute name="column-width">
859d76a
-          <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
-          <xsl:call-template name="header.footer.width">
eb2f94a
-            <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
-            <xsl:with-param name="position" select="$column1"/>
f8d850b
-            <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
-            <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
-          </xsl:call-template>
859d76a
-          <xsl:text>)</xsl:text>
eb2f94a
-        </xsl:attribute>
eb2f94a
-      </fo:table-column>
eb2f94a
-      <fo:table-column column-number="2">
eb2f94a
-        <xsl:attribute name="column-width">
859d76a
-          <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
-          <xsl:call-template name="header.footer.width">
eb2f94a
-            <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
-            <xsl:with-param name="position" select="2"/>
f8d850b
-            <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
-            <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
-          </xsl:call-template>
859d76a
-          <xsl:text>)</xsl:text>
eb2f94a
-        </xsl:attribute>
eb2f94a
-      </fo:table-column>
eb2f94a
-      <fo:table-column column-number="3">
eb2f94a
-        <xsl:attribute name="column-width">
859d76a
-          <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
-          <xsl:call-template name="header.footer.width">
eb2f94a
-            <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
-            <xsl:with-param name="position" select="$column3"/>
f8d850b
-            <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
-            <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
-          </xsl:call-template>
859d76a
-          <xsl:text>)</xsl:text>
eb2f94a
-        </xsl:attribute>
eb2f94a
-      </fo:table-column>
eb2f94a
+      <xsl:choose>
eb2f94a
+        <xsl:when test="$passivetex.extensions != 0">
eb2f94a
+          <fo:table-column column-number="1">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="$column1"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>%</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:when>
eb2f94a
+        <xsl:otherwise>
eb2f94a
+          <fo:table-column column-number="1">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="$column1"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>)</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:otherwise>
eb2f94a
+      </xsl:choose>
eb2f94a
+      <xsl:choose>
eb2f94a
+        <xsl:when test="$passivetex.extensions != 0">
eb2f94a
+          <fo:table-column column-number="2">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="2"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>%</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:when>
eb2f94a
+        <xsl:otherwise>
eb2f94a
+          <fo:table-column column-number="2">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="2"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>)</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:otherwise>
eb2f94a
+      </xsl:choose>
eb2f94a
+      <xsl:choose>
eb2f94a
+        <xsl:when test="$passivetex.extensions != 0">
eb2f94a
+          <fo:table-column column-number="3">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="$column3"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>%</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:when>
eb2f94a
+        <xsl:otherwise>
eb2f94a
+          <fo:table-column column-number="3">
eb2f94a
+            <xsl:attribute name="column-width">
eb2f94a
+              <xsl:text>proportional-column-width(</xsl:text>
eb2f94a
+              <xsl:call-template name="header.footer.width">
eb2f94a
+                <xsl:with-param name="location">footer</xsl:with-param>
eb2f94a
+                <xsl:with-param name="position" select="$column3"/>
f8d850b
+                <xsl:with-param name="pageclass" select="$pageclass"/>
f8d850b
+                <xsl:with-param name="sequence" select="$sequence"/>
f8d850b
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
eb2f94a
+              </xsl:call-template>
eb2f94a
+              <xsl:text>)</xsl:text>
eb2f94a
+            </xsl:attribute>
eb2f94a
+          </fo:table-column>
eb2f94a
+        </xsl:otherwise>
eb2f94a
+      </xsl:choose>
859d76a
 
eb2f94a
       <fo:table-body>
eb2f94a
         <fo:table-row>