I'm getting a few "overfull \hbox" error with compounded words of the "longword1-longword2" kind, with "longword1-" exceeding the margin. This can be solved by defining custom hyphenation ("\long-word1-longword2").

Issue #1: I have many different occurences with different words and I'd like to avoid to manually fix all of them.

Issue #2: I noticed that


does not work, maybe because of the hyphen between the two words.

Issue #3: most of these words are defined using glossary package:


For example, one of the acronyms is defined as

\newacronym{cbm}{CBM}{Condition-based Maintenance}

and when I call it with

...a component (\textit{``\acrlong{cbm}''}) and detect...

the "on-" is exceeding the margin.

I tried the following solutions:

\newacronym{cbm}{CBM}{Condi\-ti\-on-based Maintenance}

\hyphenation{Condi-ti-on-based Condi-ti-on}

and none of them works, while replacing the \acrlong command with the full text Condi-ti-on-based Maintenance does work.

So my questions are:

  1. is there any way to do an automatic hyphenation for these "longword1-" when I am NOT using \acrlong?

  2. is there any way to use custom hyphenation within the \acrlong command?

  3. how do I use \hyphenation{} with words containing a dash?

PS: If it could matter, I'm using book class.

Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.