Next in thread → Next in month →

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

From
Jirka Kosek <>
Date
2011-10-25T12:41:18+00:00
ID
Thread
Re: [docbook-apps] Tag to not break at hyphen
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:       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
------------------------------------------------------------------
Next in thread → Next in month →