10
votes

I've written a document in LaTeX, using two-column format, 11pt, times font. Many of my words appear hyphenated, and for every description list item, I get a badbox warning (no problems visible in the output though). How can I fix this?

4
Can you please post a small sample? Maybe a single page with your content stripped down so that the effect occurs and can be debugged, but not the whole document?mmr

4 Answers

19
votes

While, yes, you could make TeX less picky or even go the ragged option, this is best fixed by the microtype package. Just loading it should do the trick:

\usepackage{microtype}

It provides two features to improve the typesetting of paragraphs:

  • Margin kerning: characters, especially punctuation, will protrude a small fraction into the margin. Practically, this has the effect of very slightly increasing the line length and (IMO) visually looks very nice.
  • Font expansion: as well as stretching/shrinking the space between words to create a flush paragraph, the characters themselves are stretched/shrunk by very small amounts (less than one percent). This is visually imperceptible at the character level but, surprisingly, makes a huge difference at the paragraph level.
12
votes

you should set a hyphenation penalty somewhere in your preamble:

\hyphenpenalty=750

The value of 750 suited my needs for a two column layout on letter paper (8.5x11 in) with a 12 pt font. Adjust the value to suit your needs. The higher the number, the less hyphenation will occur. You may also want to have a look at the hyphenatpackage, it provides a bit more than just hyphenation penalty.

4
votes

I've always just used \raggedright for this, but I've never done that for an entire paper. This FAQ (which is one of my go-to LaTeX resources) recommends the ragged2e package.

Oh, and a side note: I never pay attention to bad boxes unless I can see them in the output. This is probably dumb, but LaTeX is much pickier than I am.

1
votes

Based on the answers from another post, I found these settings to be perfect to prevent hyphenation altogether without being ugly:

\tolerance=9999
\emergencystretch=10pt
\hyphenpenalty=10000
\exhyphenpenalty=100

\tolerance=9999 allows as much whitespace as possible.

\emerencystretch=10pt allows some extra whitespace per line.

\hyphenpenalty=10000 disables hyphens completly.

\exhyphenpenalty=100 allows using hyphens which were already present.