10

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.

6
  • Have you tried \hyphenation{...} but not giving points at which to hyphenate? That's what I'd do first...
    – vonbrand
    Feb 26, 2013 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, 2013 at 15:39
  • Perhaps \hyphenation{self\-dual} works? (Wild guess)
    – vonbrand
    Feb 26, 2013 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.
    – user4686
    Feb 26, 2013 at 16:23
  • @user700902 Would you like to make an answer from your comment?
    – egreg
    Mar 25, 2013 at 13:27

1 Answer 1

7

(CW from comments)

By setting

\exhyphenpenalty=10000

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .