How to prevent LaTeX from hyphenating words containing a dash

hyphenhyphenationlatex

I would like to globally prevent LaTeX from hyphenating 'Objective-C'. I am aware of the \hyphenation command, but I don't see how I can make use of it. If I pass 'Objective-C' to this command, the dash will be treated as a hint to hyphenate the word there.

One solution I found is wrapping Objective-C into an mbox each time I use it. However, the document I am writing contains this name a lot, and wrapping it into an mbox each time is ugly (as is defining a command and using this over and over again in the source code).

I'd be happy about any suggestions!

Best,
JP

Best Answer

Why is defining a new command ugly? It's how \LaTeX\ defines itself.

\def\ObjectiveC{\mbox{Objective-C}}