I like my mdframed frames to go into the margin, so that the text is not effected, by using a negative leftmargin and rightmargin. However this results in an

Overfull \hbox (0.43031pt too wide) in paragraph at lines 16--16

I don't want to eliminate all overfull box warnings as I still want to know if there are issues with the text.

So, how do I eliminate this warning just for the frame, but not for the text?





  • This particular Overfull \hbox message is due to a bad paragraph. Try with \usepackage[latin]{babel} and it will disappear.
    – egreg
    Jun 10, 2013 at 23:18
  • If you add draft as a class option, you will see that the line ending on magna. is the culprit. Jun 10, 2013 at 23:20

1 Answer 1


Overfull \hbox warnings are dependent on the length \hfuzz. Setting this to something long removes them from the output warnings. Consider, for example,


(or something smaller than \maxdimen; default for \hfuzz is 0.1pt). Issue \ignoreoverfullhboxes wherever needed (and localize its scope within an environment).

Using etoolbox, you can call \ignoreoverfullhboxes at the start of every mdframed environment using

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .