OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: DOCBOOK-APPS: "--" again; this time via passivetex

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 12, 2001 at 06:02:20PM +0200, Jirka Kosek wrote:

> PassiveTeX reads directly XML source so there is no preprocessing stage
> as in JadeTeX which can turn -- into -\/-\/. Standard TeX ligature
> processing cann't be turned off AFAIK. Maybe Sebastian could talk more
> on this topic.
> > Any ideas on how to fix it, or even whereabouts the bug is?
> If you want quick workaround, you can insert zero-width joining space
> character (?) between two -:
> <para>Two dashes or not two dashes: -&#x200b;-?</para>

We already have a preprocessing stage of course: XSL-T.  Here is some
XSL that works around the problem in a better way, by translating '--'
in the XML source into '-&#x200b;-' in the XSL-FO.


<?xml version=3D'1.0'?>
<xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"

<!-- This works around an xmltex bug: two or three dashes -->
<!-- together become a ligature.                          -->
<xsl:template name=3D"fix-dash">
 <xsl:param name=3D"str"/>
  <xsl:when test=3D"contains($str,'--')">
   <xsl:call-template name=3D"fix-dash">
    <xsl:with-param name=3D"str">
     <xsl:value-of select=3D"substring-before($str,'--')"/>
     <xsl:value-of select=3D"substring-after($str,'--')"/>
   <xsl:value-of select=3D"$str"/>

<xsl:template match=3D"text()">
 <xsl:call-template name=3D"fix-dash">
  <xsl:with-param name=3D"str" select=3D"."/>


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC