# How do I prevent TeX from hyphenating acronyms?

Upper-case words look awkward when hyphenated. How do I suppress this behavior?

-
Are there many of these upper-case words? How do you write them? A usual way would be, put them into an \mbox. –  Speravir Mar 18 '12 at 1:32
Assuming your document doesn't contain a whole avalanche of these words and assuming further that these words don't also occur in lowercase spellings (in which case hyphenation might be permissible after all), you can just put them into a \hyphenation command somewhere in the document's preamble. Example: \hyphenation{unhcr unesco unctad} will suppress hyphenation of these words (in uppercase, lower case, and mixed-case spelling). Left to its own devices, TeX might hyphenate these words as UN-HCR, UN-ESCO, and UNC-TAD... –  Mico Mar 18 '12 at 2:27
Please have a look at this meta discussion: Asking a question and answering it yourself straight away. For keeping this page readable, let's remove the first "captain" comments, which are a bit chatty. –  Stefan Kottwitz Mar 18 '12 at 10:43
@Stefan Kottwitz I believe, even after reading that discussion, that it's useful to ask a question and answer it immediately afterward-- but that one should never accept one's own answer before giving a chance for the community to provide a better one (exactly as it turned out here). –  Will Mar 18 '12 at 16:30

I recommend to define a style for acronyms. This allows consistent style changes later, for example if you change the typographic design of acronyms (such as using small caps) or introducing index commands.

And in this macro it's easy to prevent hyphenation, such as with \mbox.

\newcommand{\Acronym}[1]{\mbox{\textsc{#1}}}


Some typographers recommend to space out all-caps words a bit. That's what \textsc does here for you.

\documentclass{article}
\usepackage[english]{babel}
\newcommand{\Acronym}[1]{\mbox{\textsc{#1}}}
\begin{document}
\parbox{5em}{An EXAMPLE}
\parbox{5em}{An \Acronym{EXAMPLE}}
\end{document}


-
Thanks, the \textsc is a very nice touch. –  Will Mar 18 '12 at 16:36

If the word that shouldn't be hyphenated doesn't occur frequently, boxing it with \mbox{} could be an option.

If it occurs frequently, then \hyphenation could be used to declare no-hyphenation; something like:

\hyphenation{ACRONYM}


However, as lockstep mentions in his comment, this will also prevent hyphenation of the lowercase variant(s) of the same word(s).

-
This will also prevent hyphenation of the lowercase variant(s) of the same word(s). –  lockstep Mar 18 '12 at 1:34

Simply add \uchyph=0 to the preamble.

Edit:
This will actually suppress hyphenation on all words that begin with a captial letter, not just those that are entirely capital letters.

-
This will prevent hyphenation for every word that starts with an uppercase letter, not only for all-uppercase words. –  lockstep Mar 18 '12 at 1:10
@lockstep Thanks for catching that, my mistake. –  Will Mar 18 '12 at 1:17