TeX typesets an entire paragraph, effectively testing all possible ways
of breaking the text into lines and looking for the best one. Including
in the "possible ways" are all possible legal breaks at hyphenation
points. (It doesn't *really* look at all the possibilities, of course -
but the algorithm used is certain to find the the optimum breakpoints.)
If you're getting overfull warnings, it's because *there is no way to do
better*, given the actual words, characters, and spacing of the para-
graph you've handed to TeX. For narrow columns, this is a reasonably
common occurance, usually on the first line of a paragraph. (As you get
further into the paragraph, there are more choices before the breakpoint
(on earlier lines) that can shift it just enough to avoid a problem.
For the first line, there are only a couple of choices of breakpoint
that are possible at all.)
TeX's algorithms were designed to produce top-quality, beautiful
typesetting of books. Narrow columns are, in general, difficult to
typeset "beautifully". If you look in newspapers or magazines that have
narrow columns, you'll see that they deal with the problem by adding
(and sometimes even *removing*) space *between* letters. This is known
as "letterspacing" (or sometimes "changing the tracking"), and is
frowned on in high quality typsetting, and is ugly in a different way
from the ugliness you are seeing. It's not supported by TeX, or at
least TeX can't do it automatically. (It's possible to write a macro
that takes a word as an argument and letterspaces it. You can use that
to manually fix up lines with problems.)
If you're writing a technical document, with many specialized terms,
make sure that TeX knows all the hyphenation points. TeX's algorithms
are very good, but not perfect. (Also, keep in mind that TeX will not
hyphenate a word that contains an explicit hyphen - it will break at the
hyphen, but nowhere else. This is the rule usually - but not exclu-
sively - followed by high-quality publishers. For narrow columns, it
may be worthwhile to relax it. If you have to deal with a few cases,
just insert explicit hyphenation points (\-) where needed. There are
tricks that can be used more generally; ask again about those if this is
an important issue for you.
The really general solutions include:
1. Don't try to use justified text in narrow columns. Instead,
use ragged right.
2. Use a smaller font. The more letters/words/spaces per line,
the more possible breakpoints.
3. Use a "tighter" font. Times Roman, for example, is designed to
pack many letters per unit of horizontal space. This
saves publishers money (fewer pages for a given piece of
text) and makes typesetting in narrow columns easier,
for the same reason as in 2.
4. Reword the text. If it's not your text, this is not normal-
ly an option. If it *is* your text - consider that
there are a number of great writers who were familiar
with the limitations of the printing process and *did*
change the wording of works that are not considered
classics to make sure they would fit.
-- Jerry
I'm using LaTex2e for writing \twocolumn documents in English.
I get about 3-5 warnings about overfull hboxes per page, most of them
are about 3-10 points too wide.
Is there anything i can do about them?
Most of them are not "fatal" but they do look kind of awkward...
[btw: that "draft" option of latex2e, which draws a sidebar at each line
having an overfull hbox is really neat!]
i dunno if you need to know the preamble --- but anyway, here is:
\documentclass{article}
\usepackage{vmargin}
\twocolumn
\setmargins{30mm}{10mm}{16cm}{23cm}{3\baselineskip}{10mm}{0mm}{15mm}
\title{..}
\begin{document}
any hints will be appreciated! :)
thanx in advance,
Gab.
/------------------------------------------------------------------\
| Imperceptibly, day piles upon day. |
| That's how you came into being, |
| Past. (Buson) |
| __@/ |
| mailto:za...@igd.fhg.de http://www.igd.fhg.de/~zach |
\------------------------------------------------------------------/
Jerry gave lots of good general advice for handling line-breaking
in restricted widths, but he omitted (perhaps as too obvious) the
relevant bit for this question.
TeX looks at all break points *until* it reaches a specified level
of ugliness, and then it gives up totally and makes an overfull box
for you to deal with manually. You can set this threshold with the
"\tolerance" parameter. LaTeX's default value is set by the "\fussy"
command and is only appropriate for easy words in wide lines. The
[twocolumn] option does more than just give a \twocolumn command; it
also declares "\sloppy" which sets a very high tolerance for ugly
spacing but eliminating most overfull boxes.
So you can declare \sloppy, use the [twocolumn] option, or set some
value of tolerance that suits you like \tolerance=1000. Values of
10000 or more are infinite, and you must use this raw TeX syntax rather
than \setcounter.
Donald Arseneau as...@reg.triumf.ca