I got a "bad box" warning said `!h'
Underfull \hbox (badness 10000) in paragraph
Underfull \hbox (badness 10000) in paragraph
Underfull \hbox (badness 10000) in paragraph
Underfull \hbox (badness 2707) in paragraph
The source code is
\begin{table}[!ht]
\caption{Comparison of design requirements for adults and children}
\footnotesize
\begin{center}
\begin{tabular}{|p{0.2\linewidth}|p{0.35\linewidth}|p{0.35\linewidth}|}
\hline \centering{Message} & \centering{Adults} & \centering{Children} \tabularnewline
\hline *M1-constraint-requirement-requirement-summary & ``The target user is an \textbf{adult}. Constraints - Ergonomics can be found in standard \textbf{XX1}.''& ``The target user is a \textbf{child}. Constraints - Ergonomics can be found in standard \textbf{XX2}.'' \tabularnewline
\hline
\end{tabular}
\end{center}
\end{table}
and it looks like this
I don't know what's going wrong in my case.
Best Answer
The lines of the first cell of the second line doesn't fill the
hbox
-es (3 bad boxes). Same at the third cell for one line (1 bad box). Using\raggedright
can make these bad boxes go away without the real change of output. This is because the box is small but the words are long: you can't really use justification when you have 1 word per line. (If you have a few words per line, you can try\sloppy
.)The last bad box is caused by the fact that your tabular is larger than the actual
\hsize
. That's because it is wider than the sum of the column widths. Using theshowframe
package, you can clearly see that in the example below (\raggedright
already added, 1 bad box remaining). You can fix this by resizing a column or changing the column separation (or check this topic).