[Tex/LaTex] What does the phrase “Underfull \hbox (badness 10000) in paragraph” actually mean
errors
What does the actual phrase above mean?
Best Answer
99 times out of 100 it means you have \\ incorrectly placed at the end of a paragraph. But to dissect the message:
Underfull \hbox (badness 10000) in paragraph at lines 4--5
A box is underfull if there is not enough content to fill its stated size.
If you go \hbox to 5cm{A} then it makes a horizontal box (\hbox) 5cm wide just containing an A so it is underfull and will generate a warning, the exact amount of badness depends how much any white space is over-stretched, but here there is no white space so it is infinitely bad, which is arbitrarily truncated to the maximum value, 10000.
By placing \\ at the end of a paragraph you force a line break but there is nothing at all in the forced final line of the paragraph so it is a box that is \textwidth wide with no content. It appears a bit like vertical space but it is not it is a spurious line at the end of the paragraph. So for example it does not stretch and is not dropped at the start of a page.
because of the spurious space in \begin{pmatrix } and
! Undefined control sequence.
because \om is not defined.
It does only generates the error in the subject line if you ignore those errors and let TeX recover. Subsequent errors are nearly always spurious.
In this case \cr is the TeX primitive for a new line in an aligment which is used in the definition of \\. because the inner pmatrix did not start because of the first error, TeX takes the \\ as ending the outer alignment row inside the group, which is an error.
You should try to avoid explicit spacing within the document, markup the document structure and then globally arrange that the structural elements make the right layout.
Something like this might be closer (and produces no warnings)
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{verbatim}
\usepackage{parskip}
\setlength\parskip{\baselineskip}
\setlength\parindent{0pt}
\begin{document}
\title{Homework 1}
\author{Joshua Hazel}
\date{\today}
\maketitle
\setcounter{section}{2}
\setcounter{subsection}{2}
\subsection{Suppose that the values for a given set of data are grouped into intervals. The intervals and corresponding frequencies are as follows:}
\begin{tabular}
{|l r|} \hline
age & frequency \\ \hline
1-5 & 200 \\
6-15 & 450 \\
16-20 & 300 \\
21-50 & 1500 \\
51-80 & 700 \\
81-110 & 44 \\ \hline
\end{tabular}
\textbf{Compute an \textit{approximate median} value for the data.}
My answer here.
\end{document}
Best Answer
99 times out of 100 it means you have
\\
incorrectly placed at the end of a paragraph. But to dissect the message:A box is underfull if there is not enough content to fill its stated size.
If you go
\hbox to 5cm{A}
then it makes a horizontal box (\hbox
) 5cm wide just containing an A so it is underfull and will generate a warning, the exact amount of badness depends how much any white space is over-stretched, but here there is no white space so it is infinitely bad, which is arbitrarily truncated to the maximum value, 10000.By placing
\\
at the end of a paragraph you force a line break but there is nothing at all in the forced final line of the paragraph so it is a box that is\textwidth
wide with no content. It appears a bit like vertical space but it is not it is a spurious line at the end of the paragraph. So for example it does not stretch and is not dropped at the start of a page.