I have bunch of pgfplots (plots and bar charts in my document) and when I compile I get errors like:
Overfull \hbox (1.17287pt too wide) in paragraph at lines 2121--2122
[][]
[35]
Sometimes it also tell underfull
as well. What does these mean ? Any general pointers on how to solve them ? Do they mean anything bad ?
Best Answer
Let's start with a quote from Knuth's TeXbook (Chapter 11)
Whenever you look at a
(La)TeX
document, imagine putting on a pair of glasses that allows you to 'x-ray' the page's structure- what you would see is that each page is made up of boxes.In particular, there are horizontal boxes (
hboxes
) and vertical boxes (vboxes
).TeX
is able to make beautiful documents by making the content of each box fit 'ideally' using its stretchableglue
. When something simply will not fit, either because it is too big or too small, then you getoverfull
andunderfull
boxes respectively.When
TeX
encounters such situations, it is kind enough to tell you in the.log
file so that you can make a decision for yourself as to whether you need to make changes; ultimately, you have to decide if you think they mean anything bad. Note thatTeX
will also give you abadness
rating, with10000
being the worst.If you prefer a more visual approach, then you can load the
draft
option to yourdocumentclass
, for examplewhich ensures that your output is highlighted with black boxes in any of the offending areas.
For more details see any of the 'related' links on the right hand side of this page, perhaps starting with What does "overfull hbox" mean?
In terms of your 'specific' case, it sounds like one of your graphs is over-stretching its boundaries- perhaps it is going over a
minipage
, or into the pagemargin
. If you're happy with the output, then you typically don't have to worry too much (unless the people viewing your document are also going togrep
your.log
file).