[XeTeX] Unicode-named macros in XeTeX
Philip Taylor (Webmaster, Ret'd)
P.Taylor at Rhul.Ac.Uk
Thu Jan 13 15:51:16 CET 2011
Bogdan Butnaru wrote:
> However, I’m not satisfied with the way em-dashes behave in this
> setup. I’d like to define a macro that does what I want (e.g. control
> spacing and line breaking around the dash), but I want to call by just
> typing an em-dash, i.e. just “—” instead of “\dash”.
>
> I anticipate the problem of having to actually generate the em-dash
> character instead of recursively calling the em-dash macro inside the
> macro, so please mention this if you have a solution for me, but I’m
> already stumped at the “how to call a macro ‘—’” part.
Can't help with the "How to type one", because for me that remains
the least accessible part of Unicode, but "how to call a macro" is
easy. Let us pretend (for the purposes of this e-mail) that | is
the Unicode em-dash (it's actually a solidus here : I hope it is
also one when it arrives). Then all you need is the following
\def \emdash {whatever}
\catcode `\| = \active
\let | = \emdash
Philip Taylor
More information about the XeTeX
mailing list