2

We render PDF Documents using latex in a german speaking medical environment.

Since the built-in hyphenation mechanisms of latex result in word-breaks that seem awkward to the users, we chose to disable hyphenation via

\usepackage[none]{hyphenat} \sloppy

But in our case this solution is too restrictive since it even prevents word-breaks on (compound)words that contain an explicit dash (or even more so, an explicit latex-hyphenation-control-sequence).

I was not able to find a way to tell latex to break on dashes (or otherwise marked characters) only. Can someone help me out? I would really appreciate any help here.

  • 3
    \sloppy\hyphenpenalty=10000 should do (no hyphenat). – egreg Dec 4 '18 at 13:30
  • oh, great! This is the solution to my problem - if you would "answer" this question, I could mark your answer as the solution. Thank you very much! – Sebastian Dec 4 '18 at 15:38
  • Huge spaces between words, or lost the right margin, is even more awkward. Avoids hyphens at any cost have this cost. Moreover, both medical jargon and german language are not exactly famous for his short words that allow always a good line break. IMHO, it could be better avoid some amounts of hyphens with a prudent penalty, and/or use microtype, and/or make a prudent list of no hyphens. But some list like \hyphenation{Hypergammaglobulämie Immunelektrophorese Sichelzellenanämie ...} will only produce a insane jumps of words. – Fran Dec 4 '18 at 18:55
1

The none option to hyphenat issues

\hyphenpenalty=10000\exhyphenpenalty=10000\relax

which allows no break at hyphens, implicit (the first parameter) and explicit (the second parameter).

You want to just issue the first setting:

\sloppy\hyphenpenalty=10000

However, I suggest \raggedright, rather than \sloppy, in order to avoid large spaces between words.

Your Answer

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

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