This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]