[XeTeX] avoiding line break after dash

Ulrike Fischer news3 at nililand.de
Mon Dec 8 11:22:40 CET 2014


Am Sun, 7 Dec 2014 18:34:53 -0500 schrieb Mike Maxwell:

> Using a Unicode non-breaking hyphen (U+2011) appears to prevent
> the line break when I try this with a different font. 
> Unfortunately, the font I need to use doesn't have a glyph for
> this code point, so I get a box in the PDF.  (Is there a way to
> use the ASCII dash glyph for this code point, while preserving
> the non-breaking status of the U+2011 code point?  Short of
> hacking the font.)


You can make U+2011 active and define it so that is uses \mbox{-}:

\catcode`\^^^^2011=\active
\def^^^^2011{\mbox{-}}


babel also has the command \babelhyphen{nobreak}. And if you
activate the german shortcuts you can also use "~ for this type of
hyphens. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



More information about the XeTeX mailing list