Latex justify text without hyphens

When I wrote my thesis I found that a lot of text being hyphen-connected into two lines. It will be nicer to justify the text to keep complete words.

Inspired by this.

Method 1: add to the preamble

\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000

This streches the lines and suppresses all the hyphenation. Works pretty well.

Method 2: suppress hyphen character completely by using

\hyphenchar\font=-1

and remove overfull boxes:

\sloppy
Z. Lu avatar
Z. Lu
Data scientist, bioinformatician, retro fan and web lover.
comments powered by Disqus