8

What LaTeX is trying to do with this:

\documentclass{article}
\usepackage{floatflt}
\begin{document}

\begin{floatingtable}[r]{
\begin{tabular}{cc}
0 & 1 \\
1 & 0
\end{tabular}}
\end{floatingtable}

This is MWE.

\end{document}

I got

Underfull \hbox (badness 10000) in paragraph at lines 9--10

and message disappears if I add \raggedright after \begin{document}. It does not make any difference if I add more words to "This is MWE." -paragraph or add few paragraphs more.

5
  • 3
    The warning disappears if I add \centering just after the opening brace: \begin{floatingtable}[r]{\centering...
    – egreg
    May 7 '13 at 9:42
  • Egreg, you are right. Thanks! However, I still don't understand what LaTeX is trying to strech without \centering. May 7 '13 at 13:49
  • surely this is to be expected? the paragraph contains a short line of text (nowhere near width of the page), and the table is minute too. embedding the table in such a tiny paragraph does indeed produce a very empty line, just as the warning says. May 7 '13 at 14:50
  • Wasteofspace, as I said, "It does not make any difference if I add more words to 'This is MWE.' -paragraph or add few paragraphs more." May 7 '13 at 15:16
  • 1
    @wasteofspace The warning is there also when the text surrounding the inserted table is long; the Underfull \vbox is exactly the one built by \floatingtable.
    – egreg
    May 7 '13 at 15:24
4

There is no warning if \centering is issued before \begin{tabular}:

\documentclass{article}
\usepackage{floatflt,lipsum}
\begin{document}
\begin{floatingtable}[r]{%
\centering
\begin{tabular}{cc}
0 & 1 \\
1 & 0
\end{tabular}}
\end{floatingtable}

\lipsum[1]

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.