TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting an

underfull \hbox in alignment (badness 10000)

with tabular*. The warning goes away if I adjust the table width by 0.00002pt (as per the MWE below). The difference seems to arise from the length calculations with calc using \real and TeX's fixed point arithmetic.

I know that using tabularx with an X column is a solution, but a) I want to have complete control over the table and b) the "correction" generally depends on the the current \linewidth.

This looks like a trap for those, like me, wanting a clean TeX log file. If one follows example 5.3.1 in The LaTeX Companion (nothing against it though!), one may fall into that trap, more so that it isn't easy to reason out such a tiny difference.

Should one live with that?

\newlength{\MyLen}      \setlength{\MyLen}{(\linewidth*\real{0.5}-\tabcolsep)/3}%
\newlength{\MyLenTwo}   \setlength{\MyLenTwo}{\MyLen*\real{1.3}}
\newlength{\MyLenThree} \setlength{\MyLenThree}{\MyLen*\real{0.7}}
\newlength{\MyLenFour}  \setlength{\MyLenFour}{\linewidth*\real{0.5}-(\MyLen+\MyLenTwo+\MyLenThree+\tabcolsep)}
% \showthe\MylenFour % gives 0.00002pt; if that is not accounted for, TeX barks with an "Underfull \hbox (badness 10000) in alignment..."

First&Second&Third \\
share|improve this question
Welcome to TeX.SX! – Claudio Fiandrino Dec 4 '13 at 11:36
Isn't 0.5\linewidth easier than \linewidth*\real{0.5}? – egreg Dec 4 '13 at 12:12
It is, but gives same, regretfully. The discrepancy comes from those fancy multiples of \MyLen, I think. – JotBeeL Dec 4 '13 at 13:24

Just use

First&Second&Third \\

As there is no flexibility in the glue between columns, tabular* can not change the width in any way, so the width using tabular* will be as for tabular but then forced into a box of the specified size, so generating a warning if it doesn't fit exactly. Basically tabular* requires \extracolsep{\fill} to be used somewhere before it does anything useful.

share|improve this answer
Thanks David. I take it as it is :-) The real vs fixed point calculation trap for tabular* fans is still ready to spring though... "exact" is what matters. – JotBeeL Dec 4 '13 at 13:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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