docbook-apps

Re: [docbook-apps] hyphenate.verbatim.characters format for multiple characters?

  • 1.  Re: [docbook-apps] hyphenate.verbatim.characters format for multiple characters?

    Posted 02-26-2007 21:04
    Hi Paul,
    The hyphenate.verbatim feature only affects content in programlisting,
    screen, and synopsis, not replaceable.

    The other problem is that the hyphenate.verbatim feature inserts soft
    hyphen characters, which FOP does not yet support. It just prints hyphens
    at each point.

    I think you are looking for something more like ulink.hyphenate, which uses
    a template named hyphenate-url to insert the character specified by the
    ulink.hyphenate parameter after every character specified in the
    ulink.hyphenate.chars parameter. Since FOP doesn't support soft hyphens,
    you will have to use zero width spaces, which do work in FOP:

    <xsl:param name="ulink.hyphenate">​</xsl:param>
    <xsl:param name="ulink.hyphenate.chars">. ,</xsl:param>

    Of course, this doesn't automatically work with replaceable text. You will
    need to customize the replaceable template to call hyphenate-url. And it
    will affect your printed ulink URLs too, unless you differentiate the
    customization.

    Bob Stayton
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net