# Glossaries package and hyphenated (dashed) acronym fail to break across lines

With respect to using the `glossaries` package, if I have an acronym with a long hyphenated word, it often result in sentences that runs into margins. For example:

``````\newacronym[sort=WH]{WH}{Wh}{Wiener-Hammerstein}
``````

results in:

I have also tried

``````\newacronym[sort=WH]{WH}{Wh}{Wiener\-Hammerstein}
``````

But that fails as well, it just produces `WienerHammerstein`.

How do I get round this problem and allow the hyphenated ord to break across the hyphen, but always write the hyphen in normal situations?

-
How about `Wiener-Hammer\-stein`? –  clemens Dec 18 '12 at 11:53
@cgnieder Oh interesting did not expect it to work. Thanks. I am still baffled at why dashed words in `glossaries` doesn't behave like naked counterparts which allows automatic line breaking where the hyphen is. Hmm.. Anyway it's good enough band aid fix for me now. –  Mobius Pizza Dec 18 '12 at 12:11
This has nothing to do with `glossaries`. As soon as a word has an explicit hyphen TeX assumes it is only allowed to break there. That's why you have to help, e.g. by inserting an implicit hyphen like in my proposal. –  clemens Dec 18 '12 at 12:19
It never breaks there, it seems to be always together. I have even seen margin as bad as Wiener|-Hamerstein where | is the margin. I need more testing, let me see if I can make a MWE –  Mobius Pizza Dec 18 '12 at 12:21
I don't know which language you're using but `babel`'s shorthands might also help. –  clemens Dec 18 '12 at 12:26

The issue is not related to `glossaries`. As soon as a word has an explicit hyphen TeX assumes it is only allowed to break there. A quick solution would be
``````\newacronym[sort=WH]{WH}{Wh}{Wiener-Hammer\-stein}
Another solution would be to use `babel` shorthands.