Featured Book

LaTeX Beginners Guide

Who is online

In total there are 36 users online :: 2 registered, 0 hidden and 34 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: Bing [Bot], Google [Bot] and 34 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

underfull hbox on new line?

Add tags LaTeX specific issues not fitting into one of the other forums of this category.

underfull hbox on new line?

Postby NSutcliffe on Thu Dec 18th, 2008

Hi all,

Whenever I create a new line (using \\) I get an underfull hbox error.. what's going on there?

Nick
NSutcliffe
 
Posts: 9
Joined: Wed Dec 17th, 2008

Re: underfull hbox on new line?

Postby phi on Thu Dec 18th, 2008

please post a minimum working example
phi
 
Posts: 578
Joined: Tue Oct 21st, 2008

Re: underfull hbox on new line?

Postby Juanjo on Thu Dec 18th, 2008

NSutcliffe wrote:Hi all,

Whenever I create a new line (using \\) I get an underfull hbox error.. what's going on there?

Nick

It is not an error, but a warning. Errors stops compilation, warnings don't.

Many warnings of this kind come from a misunderstanding of the \\ command. It means "new line", certainly. But, let's precise, newline inside the same paragraph. Look at this:
Code: Select all  •  Open in writeLaTeX
This is the first paragraph. It contains \\ two lines.

This is the second paragraph. \\

This is the third paragraph.

The first use of \\ is correct. This command introduces a line break. The same paragraph continues in a new line. The second use of \\ is incorrect. LaTeX expects more text to write a new line of the second paragraph. Since there is not more text, the second line of the paragraph remains empty and LaTeX complains issuing a warning. Never use \\ at the end of a paragraph. Paragraphs are ended by a blank line or the \par command.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
Juanjo
 
Posts: 656
Joined: Sat Jan 27th, 2007

Re: underfull hbox on new line?

Postby NSutcliffe on Fri Dec 19th, 2008

Ah I see. What if I want there to be additional line spaces between paragraphs?
NSutcliffe
 
Posts: 9
Joined: Wed Dec 17th, 2008

Re: underfull hbox on new line?

Postby phi on Fri Dec 19th, 2008

If you want extra space at exactly one place, use \vspace{12pt} or similar.
If you want space after every paragraph, set \parskip to a postive value, like \setlength{\parskip}{12pt}
phi
 
Posts: 578
Joined: Tue Oct 21st, 2008

Re: underfull hbox on new line?

Postby Juanjo on Fri Dec 19th, 2008

Completing phi's answer, you can also load the parskip package (just \usepackage{parskip}), which sets \parskip as half the baseline skip (plus some glue for stretching or shrinking the paragraph separation as needed). This package also tweaks some related parameters. See pp 5-6 in the l2tabuen document. Likewise, instead of \vspace{length}, you can occasionally use \smallskip, \medskip and \bigskip. The latter, for example, is a shorthand for \vspace{\bigskipamount}, where \bigskipamount is an already fixed length.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
Juanjo
 
Posts: 656
Joined: Sat Jan 27th, 2007

Re: underfull hbox on new line?

Postby voula on Thu Sep 3rd, 2009

Hi!

I encountered the same problem. I get the following message, despite several changes I tried in the phrasing of my sentence. Can you please help?

Underfull \hbox (badness 10000) in paragraph at lines 17--18


\hbox(0.0+0.0)x360.0
.\glue(\rightskip) 0.0


Underfull \hbox (badness 10000) in paragraph at lines 19--20


\hbox(0.0+0.0)x360.0
.\glue(\rightskip) 0.0


Completed box being shipped out [3]
\vbox(629.40024+0.0)x414.0
.\glue 21.0
.\vbox(608.40024+0.0)x360.0, shifted 54.0
..\vbox(12.0+0.0)x360.0, glue set 12.0fil
...\glue 0.0 plus 1.0fil
...\hbox(0.0+0.0)x360.0
..\glue 25.0
..\glue(\lineskip) 0.0
..\vbox(541.40024+0.0)x360.0, glue set 133.8566fil
...\glue(\topskip) 3.39584
...\hbox(7.60416+2.12917)x360.0, glue set 0.4994
voula
 
Posts: 6
Joined: Thu Sep 3rd, 2009

Re: underfull hbox on new line?

Postby Juanjo on Thu Sep 3rd, 2009

Please, post a minimum working example, that is, a piece of code which can be compiled by itself an which reproduces the same error. Without seeing some code, it is not possible to determine the cause of the problem,
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
Juanjo
 
Posts: 656
Joined: Sat Jan 27th, 2007

Re: underfull hbox on new line?

Postby voula on Thu Sep 3rd, 2009

I've already posted the code.
voula
 
Posts: 6
Joined: Thu Sep 3rd, 2009

Re: underfull hbox on new line?

Postby Juanjo on Thu Sep 3rd, 2009

voula wrote:I've already posted the code.

Sorry, but... where is it?
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
Juanjo
 
Posts: 656
Joined: Sat Jan 27th, 2007

Next

Return to General

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 34 guests