[texhax] how to create a non-breaking hyphen
Barbara Beeton
bnb at ams.org
Mon May 15 00:01:04 CEST 2006
On Sun, May 14, 2006 at 05:04:11PM -0400, Barbara Beeton wrote:
>
> to suppress a single hyphen, it's probably easiest
> to pop the word into an mbox:
> \mbox{hyphen-word}
> -- bb
Thanks. I just discovered the mbox in my LaTeX book. However, that
presents another problem. I am not writing the LaTeX directly.
Instead, I am converting XML into LaTeX. I guess there is no way to
stop a hypen *after* the hyphen itself?
since you're converting xml, the no-break hyphen
is identifiable as something different from a
regular hyphen, i believe.
try this in the preamble:
\newcommand\nobrkhyph{\mbox{-}}
and then convert the appropriate hyphen(s) to
"\nobrkhyph " or "\nobrkhyph{}".
(uwe's suggestion is actually much cleaner than
mine was.)
-- bb
More information about the texhax
mailing list