I would like to include a progress bar in my presentation and, when in draft mode, a page number below the progress bar. I have the code to do this, and it looks great, but I get one instance of this warning per frame:

Underfull \hbox (badness 10000) has occurred while \output is active

I'm hoping it's possible to avoid this warning somehow. Here is a minimized version of the progress bar/page number combo which demonstrates the warning:

    \tikz\node[draw,minimum width=\textwidth-0.25ex]{};

I've looked at many similar questions (1, 2, 3, 4, 5), but they all seem to involve either manually-inserted line breaks or justified table text. Mine involves neither, so their solutions don't seem to help here.

What can I do to maintain the placement of the tikz node and the text under it in my example without generating so darn many warnings?

  • I get no Underfull box warning when I run your example (with texlive 2014) – David Carlisle Jun 4 '14 at 8:22
  • @DavidCarlisle Crazy, I could have sworn that gave me the error last I tried. But I agree it doesn't now. I've edited to add a critical -0.25ex to the minimum width that triggers the problem. – Daniel Wagner Jun 4 '14 at 14:16
  • leave an empty line before foo? – percusse Jun 4 '14 at 14:35

You need something to fill up the line, on the last line of the paragraph there is \parfillskip (after the foo but on the line with the tikz if you don't make that full width you need to pad it out.


    \tikz{\node[draw,minimum width=\textwidth-0.25ex]{};}\hfill\break%

or as suggested in commenst you could make them separate paragraphs so both get \parfillskip

  • Just one brace away from a tikz solution... – Ian Thompson Jun 4 '14 at 20:02

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.