docbook-apps

  • 1.  Monospaced digits

    Posted 10-17-2008 16:30
    Hi,

    When dealing with numbers in tables is there a way to set the type in
    DocBook so that the numbers are displayed "monospaced" instead of
    "proportional spaced"? More specifically, the numerical label in the table
    of contents.

    Lillian



  • 2.  RE: [docbook-apps] Monospaced digits

    Posted 10-21-2008 15:01
    Lillian,

    The only way I can think of to do this would be use a monospaced
    font for the toc numbering. Character spacing is a property of
    the font itself.

    This section in Bob Stayton's XSL book describes how to customize
    lines in the TOC:

    http://www.sagehill.net/docbookxsl/PrintToc.html#PrintTocEntries

    Looks to me like you could either set the font in toc.line.properties,
    which would give you the same font for the entire toc, or modify
    the toc.line template if you want a monospace font for the numbers,
    but a different font for the rest of the toc.

    Hope that helps.

    Dick Hamilton
    http://managingwriters.com





  • 3.  Re: [docbook-apps] Monospaced digits

    Posted 10-21-2008 15:16
    2008/10/21 Dick Hamilton <rlhamilton@frii.com>:
    > The only way I can think of to do this would be use a monospaced
    > font for the toc numbering. Character spacing is a property of
    > the font itself.

    This is the only way I know of too. You don't necessarily need a font
    that's monospaced for all characters - a lot of fonts that are
    otherwise proportional have the same width for all numerals.

    Andy