How to Prevent LaTeX from Hyphenating the Whole Document
At a glance
- 1. Load hyphenat
Add the hyphenat package with the none option in your preamble.
- 2. Compile and inspect
Check whether automatic word breaks are gone and whether any visible breaks were entered manually.
- 3. Fix loose lines
If disabling hyphenation creates overfull lines, revise the wording or layout rather than forcing awkward spacing.
To stop LaTeX from automatically splitting words across lines throughout a document, load the hyphenat package with its none option. Put the command in the preamble, before \begin{document}.
This changes automatic hyphenation, not the spelling of your text. A hyphen typed into a compound word remains in the text, though the none option makes line breaks at explicit hyphens prohibitive. Disabling hyphenation also leaves TeX with fewer ways to make lines fit, so check the result for text protruding into the margins.
Disable automatic hyphenation globally
Use this minimal, compilable example. It needs the hyphenat package, available in standard TeX distributions.
\documentclass{article}
\usepackage[none]{hyphenat}
\begin{document}
This paragraph uses ordinary prose to demonstrate that LaTeX will
not automatically split long words at the ends of lines. The package
option applies throughout the document, including its later paragraphs.
\end{document}
The option none tells hyphenat to suppress hyphenation. Load the package once in the preamble; you do not need to add a command to each paragraph or section. It is a document-wide setting, so use it only if you want the effect everywhere.
What if words still break?
First identify what kind of break you are seeing:
- Automatic hyphenation: TeX inserts a hyphen at a line ending to split a word. The package option is intended to suppress this.
- A hyphen in the text: A word such as
well-knownstill contains its hyphen. Thenoneoption makes line breaks at explicit hyphens prohibitive;\exhyphenpenaltycontrols those breaks. - A manually requested break: Commands such as
\-or a discretionary break insert a possible break point. Search the source for those commands if the break persists. - A forced line break:
\\or\linebreakchanges the line layout directly; these are not automatic hyphenation.
Also check whether a class file or another package is changing hyphenation settings. If the cause is unclear, create a small test file with just your document class, the hyphenat line, and a short paragraph. Add other packages back one at a time to find a conflict or setting.
Alternative using TeX penalties
If you do not want to load a package, you can set the hyphenation penalties in the preamble:
\hyphenpenalty=10000
\exhyphenpenalty=10000
The first setting discourages automatic hyphenation; the second discourages line breaks at explicit hyphens. A penalty of 10000 makes the corresponding break prohibitive in ordinary line breaking. The package option is usually clearer when your goal is to turn hyphenation off globally.
Check line quality after disabling hyphenation
Hyphenation is one of the ways TeX fits words into justified lines. When you remove those possible break points, TeX may leave larger spaces between words or produce an overfull line that extends past the right margin. Inspect the compiled PDF, especially paragraphs with long words, narrow columns, or justified text.
If a line is too long, consider rewriting the sentence, widening the text area, or using a ragged-right layout where appropriate. Avoid applying \\sloppy as a blanket fix: it can allow excessive spaces between words, and it does not make the underlying text fit naturally. If only a particular word needs a preferred break point, a local adjustment is often better than disabling hyphenation for the entire document.
Common mistakes
- Putting the package command after
\\begin{document}: Package options belong in the preamble. - Expecting visible hyphens to disappear: The setting controls line breaking; it does not remove hyphen characters from your text.
- Using
\\hyphenation{...}to disable breaks: That command supplies exceptions for particular words; it is not a global off switch. - Ignoring overfull lines: A PDF can still compile successfully while text runs into the margin. Review the output after changing line-breaking behavior.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.