Discussion:
underfull \hbox
(too old to reply)
pkg
2006-06-30 14:11:54 UTC
Permalink
Dear all,
in his LaTeX book (in German) J. Knappen recommends that underfull
\boxes may be eliminated by \usepackage[T1]{fontenc}. What other
solutions to the underfull \hbox-problem are possible?
BR
pkg
Maarten Bergvelt
2006-06-30 14:25:30 UTC
Permalink
Post by pkg
in his LaTeX book (in German) J. Knappen recommends that underfull
\boxes may be eliminated by \usepackage[T1]{fontenc}. What other
solutions to the underfull \hbox-problem are possible?
That seems nonsense to me:

\documentclass{minimal}
\usepackage[T1]{fontenc}
\begin{document}
Begin with some words and \linebreak
continue on the next line.
\end{document}

still has an underfull \hbox. An underfull \hbox means that the
interword space on a line is too large. To solve it, put more words on
the line, I would suggest.
--
Maarten Bergvelt
Donald Arseneau
2006-06-30 19:16:29 UTC
Permalink
Post by pkg
in his LaTeX book (in German) J. Knappen recommends that underfull
\boxes may be eliminated by \usepackage[T1]{fontenc}. What other
solutions to the underfull \hbox-problem are possible?
It is not. "In German" is critical. German contains lots of long
compound accented words that will not hyphenate with the limited
"OT1" fonts, which leads to lots of over/underfull box warnings.
T1 fonts eliminate *those*.

No it doesn't eliminate the warnings to lusers who end paragraphs
with\\
--
Donald Arseneau ***@triumf.ca
Enrico Gregorio
2006-06-30 14:41:01 UTC
Permalink
Post by pkg
Dear all,
in his LaTeX book (in German) J. Knappen recommends that underfull
\boxes may be eliminated by \usepackage[T1]{fontenc}. What other
solutions to the underfull \hbox-problem are possible?
That's because with OT1 encoded fonts accented letters prevent
hyphenation beyond them.

Frequently the "underfull \hbox" problems comes from misused \\ commands
(for example when used in order "to leave an empty line"). Paragraphs
should be ended with a blank line in the input; vertical space is
obtained with commands such as \medskip or \bigskip /between/
paragraphs (i.e., with a preceding blank line).

Ciao
Enrico
pkg
2006-06-30 16:52:27 UTC
Permalink
Post by Enrico Gregorio
Frequently the "underfull \hbox" problems comes from misused \\ commands
(for example when used in order "to leave an empty line"). Paragraphs
should be ended with a blank line in the input; vertical space is
obtained with commands such as \medskip or \bigskip /between/
paragraphs (i.e., with a preceding blank line).
Suppose I want to continue in a new line but without indent. Then I can
use \par\noindent. I could also use \\ but, if I understand you right,
this produces the warnings. However,
\noindent + blank line does not have any effect. So am I right, that to
get a new line without indent \par\noindent always is the best
solution?
pkg
Lars Madsen
2006-06-30 17:05:34 UTC
Permalink
Post by pkg
Post by Enrico Gregorio
Frequently the "underfull \hbox" problems comes from misused \\ commands
(for example when used in order "to leave an empty line"). Paragraphs
should be ended with a blank line in the input; vertical space is
obtained with commands such as \medskip or \bigskip /between/
paragraphs (i.e., with a preceding blank line).
Suppose I want to continue in a new line but without indent. Then I can
use \par\noindent. I could also use \\ but, if I understand you right,
this produces the warnings. However,
\noindent + blank line does not have any effect. So am I right, that to
get a new line without indent \par\noindent always is the best
solution?
pkg
no \\ is just fine

\\ \\ on the other hand will produce an underfull \hbox
--
/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
Enrico Gregorio
2006-06-30 21:25:34 UTC
Permalink
Post by pkg
Post by Enrico Gregorio
Frequently the "underfull \hbox" problems comes from misused \\ commands
(for example when used in order "to leave an empty line"). Paragraphs
should be ended with a blank line in the input; vertical space is
obtained with commands such as \medskip or \bigskip /between/
paragraphs (i.e., with a preceding blank line).
Suppose I want to continue in a new line but without indent. Then I can
use \par\noindent. I could also use \\ but, if I understand you right,
this produces the warnings. However,
\noindent + blank line does not have any effect. So am I right, that to
get a new line without indent \par\noindent always is the best
solution?
The correct way is

<text>
<blank line>
\noindent <other text>

A blank line is perfectly equivalent to a \par command.

By experience, ending a line without the indent on the next one is a
very rare situation. Keep \\ for the environments where it belongs
properly: center, flushright, tabular and so on.

Ciao
Enrico
Lars Madsen
2006-06-30 21:37:44 UTC
Permalink
Post by Enrico Gregorio
The correct way is
<text>
<blank line>
\noindent <other text>
A blank line is perfectly equivalent to a \par command.
By experience, ending a line without the indent on the next one is a
very rare situation. Keep \\ for the environments where it belongs
properly: center, flushright, tabular and so on.
Ciao
Enrico
I've had several users who write \\ \\ all over the place because then
their documents look like their (american) textbooks.

We can only do so much in the ways of educating people.

/daleif
Donald Arseneau
2006-06-30 19:18:25 UTC
Permalink
Post by pkg
Suppose I want to continue in a new line but without indent. Then I can
use \par\noindent. I could also use \\ but, if I understand you right,
this produces the warnings.
No, \\ is fine.
Post by pkg
\noindent + blank line does not have any effect.
No, it does have an effect: It gives an underfull blank line!
Some people do this instead of setting \parskip.
--
Donald Arseneau ***@triumf.ca
m***@gmail.com
2006-07-01 15:53:19 UTC
Permalink
Post by Donald Arseneau
Post by pkg
Suppose I want to continue in a new line but without indent. Then I can
use \par\noindent. I could also use \\ but, if I understand you right,
this produces the warnings.
No, \\ is fine.
If one uses \\ the paragraph is not ended, right?

If the user uses \\ consistently, wouldn't that end up with TeX trying
to cut a whole-document-long paragraph into lines and taking
(probably not very noticeably) longer?

-- m
pkg
2006-07-01 16:19:16 UTC
Permalink
May be overfull \hboxes are also due to the fact that I have put
formulas within the normal text ... If several $ ...$'s are in one
line LaTeX may have difficulties with hyphenation ...?!?
pkg
2006-07-01 16:20:48 UTC
Permalink
Post by pkg
May be overfull \hboxes are also due to the fact that I have put
of course I meant "underfull ...". But for "overfull" the same should
be right ...
Enrico Gregorio
2006-07-01 18:06:48 UTC
Permalink
Post by pkg
May be overfull \hboxes are also due to the fact that I have put
formulas within the normal text ... If several $ ...$'s are in one
line LaTeX may have difficulties with hyphenation ...?!?
It may happen that a line comes out underfull because of many formulas,
but it is more frequen that it is set overfull. Commands like \linebreak
can lead to underfull lines.

In case of problematic lines the only way is to rephrase the paragraph.

Ciao
Enrico
Robin Fairbairns
2006-07-01 18:53:28 UTC
Permalink
Post by Enrico Gregorio
Post by pkg
May be overfull \hboxes are also due to the fact that I have put
formulas within the normal text ... If several $ ...$'s are in one
line LaTeX may have difficulties with hyphenation ...?!?
It may happen that a line comes out underfull because of many formulas,
but it is more frequen that it is set overfull. Commands like \linebreak
can lead to underfull lines.
In case of problematic lines the only way is to rephrase the paragraph.
the last resort is to rephrase the paragraph. there are several other
little tricks that can be tried before that tiresome step.
--
Robin Fairbairns, Cambridge
m***@gmail.com
2006-07-01 19:53:39 UTC
Permalink
Post by Robin Fairbairns
Post by Enrico Gregorio
Post by pkg
May be overfull \hboxes are also due to the fact that I have put
formulas within the normal text ... If several $ ...$'s are in one
line LaTeX may have difficulties with hyphenation ...?!?
It may happen that a line comes out underfull because of many formulas,
but it is more frequen that it is set overfull. Commands like \linebreak
can lead to underfull lines.
In case of problematic lines the only way is to rephrase the paragraph.
the last resort is to rephrase the paragraph. there are several other
little tricks that can be tried before that tiresome step.
Now that would make an answer in the FAQs I'd love to read ;-)

-- m
Enrico Gregorio
2006-07-01 19:59:55 UTC
Permalink
Post by Robin Fairbairns
Post by Enrico Gregorio
Post by pkg
May be overfull \hboxes are also due to the fact that I have put
formulas within the normal text ... If several $ ...$'s are in one
line LaTeX may have difficulties with hyphenation ...?!?
It may happen that a line comes out underfull because of many formulas,
but it is more frequen that it is set overfull. Commands like \linebreak
can lead to underfull lines.
In case of problematic lines the only way is to rephrase the paragraph.
the last resort is to rephrase the paragraph. there are several other
little tricks that can be tried before that tiresome step.
I know; but I think that trying to rephrase the paragraph is good
practice anyway. Very few people are able to write perfect prose
with no need to polish it.

Ciao
Enrico
c***@NOSPAMverizon.net
2006-07-03 10:51:39 UTC
Permalink
Post by Enrico Gregorio
I know; but I think that trying to rephrase the paragraph is good
practice anyway. Very few people are able to write perfect prose
with no need to polish it.
There is some irony here - rewriting something simply to satisfy the
technical limits of the text processor. Ironic, given that TeX is
often touted as 'superior' because it lets you concentrate on the
writing (i.e., the actual text), and not 'fiddling' with formatting.

I can see the email to my editor now - 'yes, sorry, must re-write that
bit of prose because I simply must eliminate underfull \hbox errors'.

heh - for grins, I cut and pasted a number of paragraphs from Joyce's
Ullyses - amazing how many underfull \hbox errors I got.

My basic view is - ignore such errors - most of the time, they impact
very little. The idea that the text processing environment should
dictate how I write is ludicrous.
Javier Bezos
2006-07-03 11:37:42 UTC
Permalink
Post by c***@NOSPAMverizon.net
There is some irony here - rewriting something simply to satisfy the
technical limits of the text processor. Ironic, given that TeX is
often touted as 'superior' because it lets you concentrate on the
writing (i.e., the actual text), and not 'fiddling' with formatting.
There is no irony at all, because in fact, as old
typographers know, it's impossible in general to
adjust an arbitrary text into an arbitrary layout.
There are constrains about spacing, hyphenation, etc.
While most (all?) text processors ignore this very
fact, TeX warns about the wrong lines. Of course,
you are free to behave like text processors :-).
Post by c***@NOSPAMverizon.net
My basic view is - ignore such errors - most of the time, they impact
very little. The idea that the text processing environment should
dictate how I write is ludicrous.
Usually, things are written to be read. It's the
layout, not the text processor, what imposes how
the text should be presented so that it's readable.
If the text is not properly typeset, it could be
less readable.

Javier
-----------------------------
http://www.texytipografia.com

Continue reading on narkive:
Loading...