[xsl] XSL:FO -- FOP, Leader Spacing, and Text Alignment

Subject: [xsl] XSL:FO -- FOP, Leader Spacing, and Text Alignment
From: Brook Ellingwood <brook@xxxxxxxxxxx>
Date: Mon, 10 Mar 2003 17:55:08 -0800
Hi,

This is partly a question about whether FOP is actually behaving properly,
and partly a feeler to see if anyone has a cleverer solution than the ones
I've contemplated.

I'm using FOP-0.20.4 to generate a product catalog in PDF and, in the table
of contents section, I'm running into issues with getting the page numbers
to align in an aesthetically pleasing manner.

Here's my code for the block:

<fo:block font-size="12pt"
 font-family="arial"
 font-weight="normal"
 background-color="#ffffff">
    <fo:basic-link internal-destination="{./ProductName}">
        <xsl:value-of select="./ProductName" />
        <fo:leader leader-pattern="dots"/>
        <fo:page-number-citation
         ref-id="{./ProductName}"/>
    </fo:basic-link>
</fo:block>

And here's a, uhm, simulacrum of the part of the output that's ugly:

Foo 1 ..... 9
Foo 2 ..... 10

If that's coming through the listserv right, note that "9" is aligned to be
above the tens place in "10" and not the ones place as you might expect.
There's a version of this catalog online at
http://www.mootkat.com/dds_products.pdf if you want to see the real thing.

My first question is: Shouldn't the leader take up all the whitespace, so
there isn't any trailing space after the shorter strings?

My second question is: Can anyone think of a way to deal with this that
doesn't involve putting the page numbers in a separate table cell? Not that
that would be the end of the world, but I keep thinking there's a simpler
way that I'm missing. Nothing I've tried with <fo:inline> does anything.

Thanks.

++++++++++++++++

Brook Ellingwood
mootkat studio: http://www.mootkat.com
phone: 206.650.4312 ~ email: brook@xxxxxxxxxxx




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread