Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

Line-breakring does not occur at dashes

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?

share|improve this question
    
How about Wiener-Hammer\-stein? –  cgnieder 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
3  
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. –  cgnieder 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. –  cgnieder Dec 18 '12 at 12:26
show 2 more comments

1 Answer

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}

that is, adding allowed break points manually.

Another solution would be to use babel shorthands.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.