I'm trying to prevent a word that contains an underscore to be hyphenated.

I have tried:

\hyphenation{Word\textunderscore With\textunderscore Underscore}

Improper \hyphenation will be flushed.
\PD1-cmd ...\TextSymbolUnavailable #1}\fi \global 
                                                  \expandafter \let \csname ...
l.50  \hyphenation{Word\textunderscore
                                       With\textunderscore Underscore} 



Improper \hyphenation will be flushed. l.50 \hyphenation{Word_

Package underscore does the opposite, it tries to allow hyphenation before and after the underscore. The macro \BreakableUnderscore can be redefined by modifying the original definition:


% Redefine to an unbreakable underscore
  \null % prevent hyphenation before the underscore
  % \nobreak
  % \hskip\z@skip
  % \usc@dischyph\nobreak\hskip\z@skip



| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.