[XeTeX] line spacing

Yves Codet ycodet at club-internet.fr
Tue Mar 22 19:09:24 CET 2005


Le 19 mars 05, à 12:37, Christopher Creutzig a écrit :

Hello.

>
>  You did miss something: translate.  Technically, you could use
>
> <xsl:template match="text()">
>  <xsl:value-of select="translate(., '&#xA0;', '~')"/>
> <xsl:template/>
>
>  This assumes you do not have ~ characters in your xml data.  No, 
> translate can't change ~ to \~ – only single-letter translations are 
> supported.
>
>  Another possibility, but one I never used and have no idea if it 
> requires XSLT 2.0, so it may not work at all, would be to use 
> xsl:output-character instead:
>
> <xsl:output-character character="~"      string="\\~"/>
> <xsl:output-character character="&#xA0;" string="\\nobreakspace{}"/>
>
>  Then again, as long as your definitions work, there's not much point 
> in switching.
>

Thanks for that information. I have a huge book about XSLT, but being 
no computer scientist I have some difficulty to deal with it. As you 
wrote, if "translate" doesn't seem necessary with XeTeX it may be 
useful some day.

It's too bad that the TEI -as I encode literary texts I use TEI XML- 
doesn't provide stylesheets to simply convert their XML into LaTeX 
(without converting the encoding). But XeTeX users are too few  (though 
more numerous, I guess, than those who understand the mysteries of 
Omega or Aleph). Well, if some expert in XSLT felt like it...

Kind regards,

Yves



More information about the XeTeX mailing list