This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: [docbook-apps] Line breaks in para: literallayout unsuitable
- From: "David Cramer \(Tech Pubs\)" <dcramer at motive dot com>
- To: "Dan Gilleland" <dagilleland at shaw dot ca>,"Frans Englich" <frans dot englich at telia dot com>,<docbook-apps at lists dot oasis-open dot org>
- Date: Sun, 1 Aug 2004 23:28:43 -0500
- Subject: RE: [docbook-apps] Line breaks in para: literallayout unsuitable
We needed to allow for the insertion of arbitrary newlines to satisfy our translation vendor. There were some cases, especially in Japanese translations and especially in section titles, were it was necessary to force a break, in part due to the limitations of our fo renderer. I added the following templates to our xsl customization layer to cause a newline to appear wherever the <?hbr?> processsing-instruction was used (i.e. in section titles and paras), but not in the title when it was uses as a xref: <title>I want a new line here <?hbr?>Ok, now I'm happy.</title>
<xsl:template match="processing-instruction('hbr')" mode="titlepage.mode"><fo:block/></xsl:template>
<xsl:template match="processing-instruction('hbr')" mode="section.titlepage.recto.auto.mode"><fo:block/></xsl:template>
<xsl:template match="processing-instruction('hbr')" mode="section.titlepage.recto.mode"><fo:block/></xsl:template>
<xsl:template match="processing-instruction('hbr')"><fo:block/></xsl:template>
Of course, if you want the same thing to happen in html, you'd have to put similar templates in that customization layer. Also, this assumes you're using the xsl stylesheets.
David