exhyphenpenaltyto an ‘infinite’ value (that is to say, 10000). This means that all hyphenations will sufficiently penalise the line that would contain them, that the hyphenation won’t happen. The disadvantage of this method is that TeX will re-evaluate any paragraph for which hyphenations might help, which will slow TeX down. Second, one can select a language for which no hyphenation patterns exist. Some distributions create a language
nohyphenation, and the hyphenat package uses this technique for its
nohyphenscommand which sets its argument without any hyphenation. You can load hyphenat with the command
to prevent any hyphenation in a single-language document. The technique cannot work in a document in which babel controls language selection, since babel incorporates hyphenation change into its language change facilities. Third, one can set
righthyphenminto a sufficiently large value that no hyphenation could possibly succeed, since the minimum is larger than the length of the longest word TeX is willing to hyphenate (the appropriate value is 62). Fourth, one can suppress hyphenation for all text using the current font by the command
This isn’t a particularly practical way for users to suppress hyphenation — the command has to be issued for every font the document uses — but it’s how LaTeX itself suppresses hyphenation in\hyphenchar\font=-1
ttand other fixed-width fonts. Which of the techniques you should use depends on what you actually want to do. If the text whose hyphenation is to be suppressed runs for less than a paragraph, your only choice is the no-hyphens language: the language value is preserved along with the text (in the same way that the current font is); the values for penalties and hyphen minima active at the end of a paragraph are used when hyphenation is calculated. Contrariwise, if you are writing a multilanguage document using the babel package, you cannot suppress hyphenation throughout using either the no-hyphens language or the hyphen minima: all those values get changed at a babel language switch: use the penalties instead. If you simply switch off hyphenation for a good bit of text, the output will have a jagged edge (with many lines seriously overfull), and your (La)TeX run will bombard you with warnings about overfull and underfull boxes (that is, really, lines). To avoid this you have two options. The simplest route is to use
sloppy(or its environment version
sloppypar), and have TeX stretch what would otherwise be underfull lines to fill the space offered, while prematurely wrapping overfull lines and stretching the remainder. The better bet is to set the text ragged right, and at least get rid of the overfull lines; this technique is ‘traditional’ (in the sense that typists have always done it) and may be expected to appeal to the specifiers of eccentric document layouts (such as those for dissertations), but for once their sense conforms with typographic style. (Or at least, style constrained in this curious way.)
This answer last edited: 2013-09-20
Go to previous question, or next question
Go to FAQ home.
URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=hyphoff
Comments, suggestions, or error reports? - see “how to improve the FAQ”.
This is FAQ version 3.28, released on 2014-06-10.