← Prev in month ← Prev in thread

Formatting numbers in List of Figures

From
Mathias Schindler <>
Date
2009-03-05T10:18:51+00:00
ID
Thread
Formatting numbers in List of Figures
Hello!

 

I use a figure list in my document, but
there’s one small thing that annoys me. The alignment of the separator is
wrong.

 

That’s how it looks right now:

8. Data access ........................................................................................................
24

9. Overview of the
front-end componenents and their dependencies ......................................
25

10.
The model-view-controller pattern of the default statistics module ...................................
27

 

That’s
how it should look:

  8. Data
access ........................................................................................................
24

  9. Overview
of the front-end componenents and their dependencies ......................................
25

10.
The model-view-controller pattern of the default statistics module ...................................
27

 

I customized the toc.line template like
this(only the part where the number gets formatted)

 

<fo:basic-link
internal-destination="{$id}">

<xsl:if test="$label != ''">

<xsl:if test="$label
&lt; '10'">

<fo:inline
color="#FFFFFF"><xsl:text>_</xsl:text></fo:inline>

                <xsl:copy-of
select="$label"/>       

                <xsl:value-of
select="$autotoc.label.separator"/>

          </xsl:if>

                 

          <xsl:if
test="$label &gt; '9'">

               <xsl:copy-of
select="$label"/>       

               <xsl:value-of
select="$autotoc.label.separator"/>

          </xsl:if>

                 

     </xsl:if>

 

<xsl:apply-templates select="."
mode="title.markup"/>

</fo:basic-link>

 

This works, but I’m sure there must
be a better solution J.

 

Thanks in advance,

 

Mathias
← Prev in month ← Prev in thread