docbook-apps

Decimal align labels in a print TOC

  • 1.  Decimal align labels in a print TOC

    Posted 04-27-2016 22:54
    By default, the chapter number in a TOC line is left aligned, as shown here:

    1. Title of chapter 1 ............1
    2. Title of chapter 2 ............5
    ...
    100. Title of chapter 100 ....X

    I'm trying to figure out the best way to have the chapter numbers right align, so the separator (in this case a period) aligns vertically. That would look something like this (simulated in a variable width font):

    1.
    2.
    100.

    I've tried applying various attributes to the fo:inline element in the toc.line template, but to no avail.

    Does anyone have any suggestions on the best way to do this?

    Thanks,
    Dick
    -------
    XML Press
    XML for Technical Communicators
    http://xmlpress.net
    hamilton@xmlpress.net