- From: Kenneth J. Hughes <kjh@entel.com>
- Date: Wed, 14 Nov 2001 14:06:07 -0500
- To: Laurent Vaills <laurent.vaills@laposte.net>, www-xsl-fo@w3.org
At 05:23 AM 11/14/2001 -0500, Laurent Vaills wrote:
>Hi.
>
>I want to be able, for example to generate a table of contents like this
>one : (best view with a fixed font)
>Chapter 1.................................1
> Section 1...............................2
> Subsection 1..........................3
> Subsection 2..........................4
>
>With all the page numbers aligned on the right.
>Most word processors do this by inserting a tabulation between the text
>and the page numbers and we can choose whatever we want instead of the
>dots.
>I've watched the fo:leader and the examples of FOP but it doesn't suit
>my needs because the page numbers are not aligned to the right.
>
>Is there a way to do this with xsl:fo ?
Hi Laurent,
The following construct should suit your needs, aligning the page numbers
to the right, leading with dots, and giving you control over indentation:
<fo:block text-align-last="justify" end-indent="2pc" last-line-end-indent="-2pc">
<fo:inline keep-with-next.within-line="always">Chapter 1</fo:inline>
<fo:inline keep-together.within-line="always">
<fo:leader leader-pattern="dots" keep-with-next.within-line="always"/>
1
</fo:inline>
</fo:block>
Cheers,
Kenneth J. Hughes kjh@entel.com
Entelechy Corporation http://www.entel.com/
Received on Wednesday, 14 November 2001 14:04:14 UTC