This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Page number in ToC
- From: Jens Stavnstrup <js at ddre dot dk>
- To: Bob Stayton <bobs at caldera dot com>
- Cc: Nicolas Nieswandt <Nicolas dot N at gmx dot de>, docbook-apps at lists dot oasis-open dot org
- Date: Fri, 09 Aug 2002 08:21:29 +0200 (CEST)
- Subject: Re: DOCBOOK-APPS: Page number in ToC
Great, this look much nicer. But, I am stille wondering, if we shouldn't
let the use of this be optional, and still keeo Norm's old style at least
for now. I still don't get at page number for each component (chapter,
appendix etc.)
Regards
Jens
On Thu, 8 Aug 2002, Bob Stayton wrote:
> 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
>
Regards,
Jens
------------------------------------------------------------------------
Jens Stavnstrup Phone :
Danish Defence Research Establishment Voice : + 45 - 39 15 17 97
Ryvangs Alle 1 - P.O. Box 2715 Fax : + 45 - 39 29 15 33
DK - 2100 Copenhagen O. E-Mail (Internet) :
Denmark js@ddre.dk
------------------------------------------------------------------------