[XeTeX] line spacing
Christopher Creutzig
christopher at creutzig.de
Sat Mar 19 12:37:23 CET 2005
Yves Codet wrote:
> XML, so in "pure" Unicode. Unless I missed something, XSLT doesn't allow
> to convert characters. So I have a rule such as:
You did miss something: translate. Technically, you could use
<xsl:template match="text()">
<xsl:value-of select="translate(., ' ', '~')"/>
<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=" " string="\\nobreakspace{}"/>
Then again, as long as your definitions work, there's not much point
in switching.
Christopher
More information about the XeTeX
mailing list