[XeTeX] No-Break Space
enrico.gregorio at univr.it
enrico.gregorio at univr.it
Sun Feb 20 18:03:25 CET 2011
Alexander wrote:
> I decided to try to replace the sign "~" in my text on the analogue of
> the Unicode (code 00a0), and the words that are connected in such a
> space no longer hyphenated. Is this normal? Or a feature not yet
> implemented?
The problem is that U+00A0 has zero lccode and (Xe)TeX abandons hyphenation
whenever it finds such a character. So the solution would be to add
\lccode"A0="A0
to you preamble. However, this is not a good solution, because this "space" will
not stretch or shrink together with the other interword spaces on the same line.
The explicit tie is way better. You can achieve the same behavior as ~ with
\catcode`<NBS>=\active
\protected\def<NBS>{\nobreakspace{}}
or, loading the new package newunicodechar,
\newunicodechar{<NBS>}{\nobreakspace{}}
Here <NBS> denotes the character U+00A0, of course and that
character must be used.
Ciao
Enrico
--
Enrico Gregorio + Dipartimento di Informatica + Tel: +39 045 8027937
Enrico.Gregorio at univr.it + Università degli Studi di Verona +
(gregorio at math.unipd.it) + Strada le Grazie 15 / I-37134 Verona + Fax: +39 045 8027928
More information about the XeTeX
mailing list