]> granicus.if.org Git - docbook-dsssl/commitdiff
Improved computation of variablelist indents.
authorBob Stayton <bobs@sagehill.net>
Thu, 14 Aug 2003 20:51:31 +0000 (20:51 +0000)
committerBob Stayton <bobs@sagehill.net>
Thu, 14 Aug 2003 20:51:31 +0000 (20:51 +0000)
xsl/fo/lists.xsl

index 6c991354d8c7195ad2ddc884a4cfbe531ee46a71..8c5c167e564914cf77968156d92de83870d520a1 100644 (file)
           </xsl:when>
           <xsl:otherwise>
             <xsl:value-of select="@termlength"/>
-            <xsl:text>em</xsl:text>
+            <xsl:text>em * 0.50</xsl:text>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
-        <!-- FIXME: this should be a parameter! -->
         <xsl:call-template name="longest.term">
           <xsl:with-param name="terms" select="varlistentry/term"/>
-          <xsl:with-param name="maxlength" select="12"/>
+          <xsl:with-param name="maxlength" select="$vlist.max.termwidth"/>
         </xsl:call-template>
-        <xsl:text>em</xsl:text>
+        <xsl:text>em * 0.50</xsl:text>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
   </xsl:message>
 -->
 
+  <xsl:variable name="label-separation">1em</xsl:variable>
+
   <xsl:if test="title">
     <xsl:apply-templates select="title" mode="list.title.mode"/>
   </xsl:if>
                                   or self::titleabbrev)]"/>
 
   <fo:list-block id="{$id}"
-                 provisional-distance-between-starts="{$termlength}"
-                 provisional-label-separation="0.25in"
+                 provisional-distance-between-starts=
+                         "{$termlength}+{$label-separation}"
+                 provisional-label-separation="{$label-separation}"
                  xsl:use-attribute-sets="list.block.spacing">
     <xsl:apply-templates select="varlistentry" mode="vl.as.list"/>
   </fo:list-block>
     </xsl:call-template>
     <fo:table-body>
       <xsl:call-template name="simplelist.vert">
-       <xsl:with-param name="cols">
-         <xsl:choose>
-           <xsl:when test="@columns">
-             <xsl:value-of select="@columns"/>
-           </xsl:when>
-           <xsl:otherwise>1</xsl:otherwise>
-         </xsl:choose>
-       </xsl:with-param>
+        <xsl:with-param name="cols">
+          <xsl:choose>
+            <xsl:when test="@columns">
+              <xsl:value-of select="@columns"/>
+            </xsl:when>
+            <xsl:otherwise>1</xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
       </xsl:call-template>
     </fo:table-body>
   </fo:table>
     </xsl:call-template>
     <fo:table-body>
       <xsl:call-template name="simplelist.horiz">
-       <xsl:with-param name="cols">
-         <xsl:choose>
-           <xsl:when test="@columns">
-             <xsl:value-of select="@columns"/>
-           </xsl:when>
-           <xsl:otherwise>1</xsl:otherwise>
-         </xsl:choose>
-       </xsl:with-param>
+        <xsl:with-param name="cols">
+          <xsl:choose>
+            <xsl:when test="@columns">
+              <xsl:value-of select="@columns"/>
+            </xsl:when>
+            <xsl:otherwise>1</xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
       </xsl:call-template>
     </fo:table-body>
   </fo:table>
     </xsl:call-template>
     <fo:table-body>
       <xsl:call-template name="simplelist.vert">
-       <xsl:with-param name="cols">
-         <xsl:choose>
-           <xsl:when test="@columns">
-             <xsl:value-of select="@columns"/>
-           </xsl:when>
-           <xsl:otherwise>1</xsl:otherwise>
-         </xsl:choose>
-       </xsl:with-param>
+        <xsl:with-param name="cols">
+          <xsl:choose>
+            <xsl:when test="@columns">
+              <xsl:value-of select="@columns"/>
+            </xsl:when>
+            <xsl:otherwise>1</xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
       </xsl:call-template>
     </fo:table-body>
   </fo:table>