24

Sometimes, assume our document contain many long words, TeX may generate some hyphenation at the end of line. But it really hinder our smooth reading. Although I know we can add the hyphenation rule at the preamble. It can't reduce hyphenation number but effect the hyphenation position. It is said that microtype package can give us more compact output. But it require expert level to tuning the parameter.

  • You can use a font which has "smaller" letters, such as ITC Weidemann. Or make wider paragraphs (but that might be worse than having hyphenation). – topskip Oct 12 '11 at 9:46
  • 1
    With judicial selection of parameters for English text you can get away with reasonably looking typesetting without hyphenation, especially for wide columns. Experiment with the code shown in this post tex.stackexchange.com/questions/29500/… – Yiannis Lazarides Oct 12 '11 at 10:14
  • 4
    To the contrary, it's having large spaces between words that hinders smooth reading; no hyphenation would result in large interword spaces. The only way to avoid hyphenation is using ragged right typesetting. – egreg Oct 12 '11 at 11:59
  • 3
    Despite comments on some of your other questions, you continue to have a 0% acceptance, which means although you've received answers to your questions, you really haven't ever acknowledged them as being helpful. Given the high quality of answers generally on the site, it's unlikely that none of the answers you've received have helped you, so I would recommend that you go back to some of your previous questions and accept the most helpful answer for each (or most) of them. – Alan Munn Mar 4 '12 at 19:28
  • For the record, it looks like the OP has accepted many answers in the last year. – Geoff Apr 4 '13 at 21:58
32

Some time ago, I wanted to deactivate hyphenation completely (without switching to \raggedright).

I found out that setting \pretolerance=10000 turns off the complete hyphenation mechanism: it tells TeX to not even look for hyphenation positions.

In addition, there is the parameter \hyphenpenalty. For example, \hyphenpenalty=10000 will (probably) also suppress hyphenation.

Naturally, forbidding hyphenation might cause underfull/overfull lines. That's why I added \tolerance=2000 \emergencystretch=10pt. The \tolerance parameter controls how much white space TeX considers to be "acceptable"; and the \emergencystretch configures TeX to use at most 10pt of additional white space per line in order to avoid underfull/overfull lines.

My solution to suppress hyphenation completely was

\pretolerance=10000
\tolerance=2000 
\emergencystretch=10pt

Now, I am aware that you expressed doubts on "tuning complicated parameters". But I encourage you to experiment with \pretolerance and/or \hyphenpenalty in combination with my suggestions for \tolerance and \emergencystretch.

The value 10000 is special in TeX, it means "disable this feature" - it is kind of "black or white". I would expect that any value between 0 and 10000 (exclusive) will "reduce" the number of hyphenations (i.e. a "grayshade").

According to my notes, I stumbled over the details on the mentioned parameters in Knuth, D.: Computers & Typesetting – The TEXbook. AddisonWesley, 1986 on page 96.

  • 2
    As Yiannis points out in another comment, the question tex.stackexchange.com/questions/29500/… contains a quote of p.96 of the TeXbook - including an illustrative example for english text – Christian Feuersänger Oct 13 '11 at 9:58
  • 1
    What are the default values of these parameters? The question is about reducing hyphenation, not removing it, so some middle-ground advice might be useful. – naught101 Oct 17 '12 at 0:11
  • So far this answer with more tolerant values plus \righthyphenmin=4 and \lefthyphenmin=4 (after \begin{document}!!) is the only one I found working for xelatex and my settings / document. – Zelphir Kaltstahl Oct 20 '16 at 22:35
12

In my opinion you only get good results by combining two of the already given answers. I am using the following:

\pretolerance=5000

I want some hyphenation, but when it makes sense, so I am not disabling it completely.

\tolerance=9000

I personally do not mind a little bit of space between words and it turned out, that if the tolerance is too low, words might still go over the margin, because a low tolerance leaves tex no other choice, since the whitespace added if the word was moved to the next line, would be declared as unacceptable.

\emergencystretch=0pt

I don't ever want to write over the margin, so no stretching here.

\righthyphenmin=4
\lefthyphenmin=4

I like to get into the flow of a word while reading it before the hyphenation, so that I might already get an idea of what the complete word is. This is more likely to happen, if there are at least 4 characters before the hyphen. If I can figure out what the word is without looking at the next line, the break does not mean that the flow of reading is interrupted.

  • 2
    These settings just made my current document really neat. YMMV, of course. – Kristian Nordestgaard Jun 27 '17 at 21:36
  • 1
    Re: "I don't ever want to write over the margin, so no stretching here" : that's the purpose of \emergencystretch with a positive value. Quoting the TeX Book page 107: "By setting \emergencystretch high enough [...] overfull boxes will never occur unless the line-breaking task is truly impossible". It enables a third pass over the paragraph splitting such that linebreaks satisfying \tolerance can be found without ever writing into the margin. – Christian Feuersänger Jan 11 '18 at 7:10
8

Disabling hyphenation entirely frequently creates more problems than it solves. You may want to fiddle with the \lefthyphenmin and \righthyphenmin parameters instead. Their default values in many document classes are 2 and 3, respectively; put differently, the left-hand and right-hand fragments must contain at least 2 and 3 letters. You could reset them, say as follows,

\lefthyphenmin4
\righthyphenmin4

and recompile the document. Only words containing at least 8 characters will now be hyphenated. The success rate (i.e., the reduction in hyphenation frequency) of this approach will depend crucially on the language in use; if its words are generally short, you'll likely see a huge reduction in hyphenations.

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.