# hyphenation problem with the character &

How to produce the hyphenation of the word (BM&FBOVESPA)

I tried to use \hyphenation{BM\&F-BO-VES-PA} in the preamble but did not work

-
Are you using this "word" often? Otherwise a localized hyphenation would work: BM\&F\-BO\-VES\-PA. –  Werner Oct 2 '12 at 13:44
Not only it doesn't work, but it raises an error: ! Not a letter. In the context of \hyphenation, a letter is something that has nonzero \lccode (and category code 11 or 12, or is produced by \char, as is the case with \&). This is why David's solution works: it sets a nonzero \lccode for \&. –  egreg Oct 2 '12 at 16:11

\documentclass{article}

\lccode`\&`\&
\righthyphenmin2
\hyphenation{BM\&F-BO-VES-PA}

\showhyphens{BM\&FBOVESPA}
\stop

Shows that the hyphenation points are as requested:

[] \OT1/cmr/m/n/10 BM&F-BO-VES-PA
-
Are there any dangerous side effects of globally changing the lccode of & in a LaTeX document? –  Martin Schröder Oct 4 '12 at 13:15
@MartinSchröder The main effect is that foo&bar would be considered as one word not two. the lccode doesn't for example affect the use of & in tables or in \ifx tests. –  David Carlisle Oct 4 '12 at 15:25