This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Page number in ToC


On Sat, Jul 20, 2002 at 02:14:40AM +0200, Nicolas Nieswandt wrote:
> Sorry, my last message was a bit confused, so i'll summarize it.
> 
> The Problem was to get a TOC with right aligned page numbers in a PDF
> file rendered with FOP. Rendering my document wth FOP 0.20.3 using the
> XSL-StyleSheets 1.51.0 leads nearly to the predicted result, but only if
> fop.extensions are diabled in the customization layer.
> 
> This was confirmed with FOP 0.20.4, 0.20.3 and docbook-xsl 1.52.2,
> 1.52.1, 1.51.0. An outstanding problem was that the numbers weren't
> smoothly aligned.
> 
> I investigated the Stylesheets and I found the file fo/autotoc.xsl.
> In the template
>   <xsl:template name="toc.line">
> are only some spaces inserted between the TOC title and the page number,
> if fop.extensions are disabled.
> 
> I verified that FOP has the fo:leader element implemented and removed
> the xsl:text elements and copied the fo:leader element, that is used
> with fop.extensions=0.
> 
> If you add the attribute leader-pattern-width="5pt", you also get the
> page numbers smooth aligned on the right.
> 
> So if this doesn't work only for me and there are no other problems, the
> instructions for using fop.extensions (in fo/autotoc.xsl -
> template:"toc.line") could be changed or pherhaps completly removed.

This does indeed work, so I checked it into CVS.  The page
numbers still don't align right in FOP (they align left), but at
least they are lined up in FOP now!

Nice detective work.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]