docbook-apps

  • 1.  Tag to not break at hyphen

    Posted 10-25-2011 10:31
    Hi All,

    I'm trying to tell the processor and FO *not* to break at a hyphen for
    the word '-Wformat-security'. I searched the reference
    (http://www.docbook.org/tdg/en/html/part2.html) for a tag relating to
    breaks, but did not see anything like <nobreak>. <literallayout> was
    close, but it added an extra linefeed (which I don't want).

    What tag am I looking for?

    Jeff



  • 2.  Re: [docbook-apps] Tag to not break at hyphen

    Posted 10-25-2011 12:41
    On 25.10.2011 12:30, Jeffrey Walton wrote:

    > I'm trying to tell the processor and FO *not* to break at a hyphen for
    > the word '-Wformat-security'. I searched the reference
    > (http://www.docbook.org/tdg/en/html/part2.html) for a tag relating to
    > breaks, but did not see anything like <nobreak>. <literallayout> was
    > close, but it added an extra linefeed (which I don't want).

    An alternative to Tony's solution is to use FO markup.

    In your DocBook source use:

    <phrase role="nobreak">-Wformat-security</phrase>

    and add following into your customization layer:

    <xsl:template match="phrase[@role = 'nobreak']">
    <fo:inline keep-together.within-line="always">
    <xsl:apply-imports/>
    </fo:inline>
    </xsl:template>

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------