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.

Usually questions about hyphenation and line-breaks are concerned about how to allow hyphenation when a word already contains a hyphen. That's not what I'm after:

I would like to prevent the word "dual-self" to be broken across lines. I know that I can to that manually with dual\=/self, but is there a way to achieve this automatically? Ideally something in the preamble equivalent to \hyphenation{...} where I can specify the words that should not be broken.

share|improve this question
    
Have you tried \hyphenation{...} but not giving points at which to hyphenate? That's what I'd do first... –  vonbrand Feb 26 '13 at 15:32
    
@vonbrand How would that look like? Given that the word is "dual-self", writing \hyphenation{dual-self} or dualself would not make much sense. –  Jörg Feb 26 '13 at 15:39
    
Perhaps \hyphenation{self\-dual} works? (Wild guess) –  vonbrand Feb 26 '13 at 15:40
4  
do you want this only for special words? because \exhyphenpenalty10000 will prohibit hyphenation at all explicit hyphens like here in the word dual-self. –  user700902 Feb 26 '13 at 16:23
    
@user700902 Would you like to make an answer from your comment? –  egreg Mar 25 '13 at 13:27
show 1 more comment

1 Answer

up vote 3 down vote accepted

(CW from comments)

By setting

\exhyphenpenalty=10000

in the document preamble, no explicit hyphen will be used for a line break.

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.