Hi, I'm trying to avoid the hyphenation of some acronyms including hyphens (for example: MPEG-1, ITU-T), so they appear always in a single line. I know I can use
\hyphenation{MPEG-1,ITU-T}
but I think it won't solve anything, because the '-' is actually telling Latex where they can be hyphenated. Besides, I get an error because the character '1' after the hyphen is not a letter.
Another option is to use \mbox{MPEG-1} every time I use any of them, but I really would appreciate a better solution.
So, does anyone know any other way to solve this problem?
Thanks in advance.
Text Formatting ⇒ Hyphenation of hyphenated acronyms
NEW: TikZ book now 40% off at Amazon.com for a short time.

Hyphenation of hyphenated acronyms
I frankly don't know of a better way of doing it than using \mbox. You could put the mbox just around the dash MPEG\mbox{-}1, but that's not any easier to type or read. If you're going to be using this a lot, I'd probably just define your own command:
If you're using XeLaTeX with a font that supports it, you could also use the unicode character U+2011 ‑ in LaTeX for a nonbreaking hyphen: MPEG‑3. It looks just like a normal hyphen, but you probably can't type it directly from your keyboard, and doing a lot of shifting to the Character map, or copying and pasting may be a little annoying.
Code: Select all
Code, edit and compile here:
\usepackage{xspace}\newcommand{\mpegone}{\mbox{MPEG-1}\xspace}
Hyphenation of hyphenated acronyms
...or you could use \nobreakdash (from amsmath). So you could do
Code: Select all
Code, edit and compile here:
\usepackage{amsmath}\usepackage{xspace}\newcommand{\mpegone}{MPEG\nobreakdash-1\xspace}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Hyphenation of hyphenated acronyms
Good to know about those alternatives. But, as with \mbox, the drawback is that the text has to be changed for every instance, which I was trying to avoid. Hard to believe that it cannot be done somehow in the preamble with some hyphenation command without having to bother about the rest of the text. Thanks anyway for the help.