[XeTeX] Hyphenation of "--" with tex-text mapping on
Bruno Voisin
bvoisin at mac.com
Thu Nov 24 14:29:39 CET 2005
Le 5 nov. 05 à 03:27, Jonathan Kew a écrit :
> It's a known limitation of using the font mapping mechanism to
> simulate this legacy TeX convention. (Well, it was known to me,
> anyhow! But I don't think it's been discussed previously.) You'll
> find em-dashes entered as --- are similarly vulnerable.
>
> [...]
>
> When writing for TUGboat recently, I noted that the proper style
> there involves use of a \Dash macro, rather than ---, as the way to
> generate a dash. Doing something like this makes it easy to ensure
> the proper behavior in both legacy and Unicode cases; I used a
> XeTeX-friendly Unicode definition of \Dash in my document in order
> to avoid this precise issue.
A late follow-up to this thread: I've just realized that, in LaTeX
2e, the recommended way of entering en- and em-dashes is through the
commands \textendash and \textemdash. That solves the above problem
(like the \Dash macro you used with plain TeX, I guess).
Another advantage: if an en-dash is entered in this way in a section
title, and the hyperref package is used to create bookmarks, then the
en-dash will appear as en-dash in the bookmarks; otherwise, if
entered as a ligature --, then it would show up as -- in the
bookmarks. That's what happens with the xunicode.sty package loaded,
anyway. And no need, in this way, to use the low-level hyperref
command \texorpdfstring, which is the solution I was contemplating.
Bruno Voisin
More information about the XeTeX
mailing list