[OS X TeX] Text goes beyond column boundaries

Ross Moore ross at ics.mq.edu.au
Mon Sep 30 07:39:40 CEST 2002



> Being fairly newly to this, here is a puzzle beyond my knowledge. I am 
> just messing around learning how to use TeX and LaTex using teTex and 
> TeXShop. Using the Latex template, I added \twocolumns and a bunch of 
> text copied from another document. The first three paragraphs all have 
> lines than go beyond the column boundary. The paragraphs that don't 
> overflow the boundary look very nice, but I thought TeX was supposed to 
> control this stuff automatically. What am I missing here? I assume it's 
> something I don't know and not a TeX problem.

It's certainly a TeX problem, of sorts; but also a problem
that will require you to study the input source carefully.


TeX tries to find the *best* solution to an optimisation problem,
for the best place to break each line.
Some things attract large demerits, others smaller amounts.

E.g. words in ordinary text can be hyphenated, at a small penalty,
and breaking mathematics is pretty bad though possible.
Breaking verbatim text is virtually impossible.
Having too much white-space in a line is worse than having
a word protrude slightly into the right-margin.


It is necessarily harder to find good breaks with narrow columns
than with wider columns; but the main factor is the words and
boxes that make up a paragraph, which is clearly why you are
getting unacceptable results in the first instance.

If you look in the .log file, then there should be a message:
   Overfull \hbox (badness = ....) 
for each of those overflows.

These mean that TeX has tried really hard to find acceptable
breaks, but has been unable to do so. Those chosen have
been the *teast bad* from a bunch of terrible alternatives.

Your job then is to adjust the wording slightly, within those
paragraphs, so that these Overfull messages do not occur.
Then TeX is happy, and you will be also, with the resulting
appearance.


It may be that you are putting specialised information (such
as URLs, i.e. web-addresses) in a way which does not allow
hypnenation od breaking. There are extra packages to overcome
this kind of thing.

> 
> Thanks for your help.


Hope this helps,

	Ross Moore

> 
> BK
> 
> 
> -----------------------------------------------------
> Mac TeX info, resources, and news can be found at:
> <http://www.esm.psu.edu/mac-tex/>
> -----------------------------------------------------
> List archives can be found at:
> <http://www.esm.psu.edu/mac-tex/MacOSX-TeX-Digests/>
> Threaded list archives can be found at:
> <http://www.masda.vxu.se/~pku/MacOSX_TeX/>
> -----------------------------------------------------
> See message headers for list info.
> -----------------------------------------------------
> 


-----------------------------------------------------
Mac TeX info, resources, and news can be found at:
<http://www.esm.psu.edu/mac-tex/>
-----------------------------------------------------
List archives can be found at:
<http://www.esm.psu.edu/mac-tex/MacOSX-TeX-Digests/>
Threaded list archives can be found at:
<http://www.masda.vxu.se/~pku/MacOSX_TeX/>
-----------------------------------------------------
See message headers for list info.
-----------------------------------------------------




More information about the macostex-archives mailing list