1

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

2
  • 1
    Are you using this "word" often? Otherwise a localized hyphenation would work: BM\&F\-BO\-VES\-PA.
    – Werner
    Oct 2 '12 at 13:44
  • 1
    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
1
\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
2
  • Are there any dangerous side effects of globally changing the lccode of & in a LaTeX document? 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. Oct 4 '12 at 15:25

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.