[XeTeX] Unicode hyphens etc. and Xe(La)TeX
BPJ
bpj at melroch.se
Tue Nov 2 19:52:01 CET 2010
2010-11-01 13:53, Roland Kuhn skrev:
> Generally, I recommend using the correct unicode characters in
> the TeX source and then define the behavior you want for them.
Yup, that's kind of the idea!
> In this case, this is fairly straight-forward:
Yes. Since I didn't know about discretionaries I looked up the
description of \discretionary at
<http://www.tug.org/utilities/plain/cseq.html#discretionary-rp>
But I ended up replacing Unicode characters with commands anyway.
That the various Unicode hyphens don't look different in the
TeXWorks editor is a real problem. The perl oneliners
perl -pe's/(?<=\pL)\x{2011}(?=\pL)/\\\x{2013}/g'
perl -pe's/(?<=\pL)\x{2027}(?=\pL)/\\\x{b7}/g'
and defining
\def\–{\hbox{-}} % \<en dash> = nobreak hyphen
\def\·{·\discretionary{}{}{}} % Middle dot
pretty much did the trick. Thanks!
/bpj
More information about the XeTeX
mailing list