6

UPDATE: 2011-12-12

As of 2011-12-12, I can confirm this issue has been resolved on TeXLive-2011.


When using the mdframed package to generate nice frames for my chemical reactions, I encounter the ever-so-popular warning:

Overfull \hbox (20.79999pt too wide) in paragraph at lines 12--12

I'm assuming that it has something to do with the border generated by mdframed, but I'm unsure.

My MWE is thus:

\documentclass[12pt]{article}

\usepackage[xcolor,linecolor=red]{mdframed}
\usepackage{showframe}

\begin{document}

\section*{Testing the \textsf{mdframed} Package}

\begin{mdframed}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Duis et sem et tortor volutpat placerat id in mauris.
Suspendisse eget tellus sed sem aliquet pellentesque.
\end{mdframed}

\end{document}

My MWE renders:

MWE for overfull hbox issue with mdframed

Is there anyway to remedy this warning, or should I simply ignore it?

6
  • I get no warning with that example (after correcting the error about xcolor).
    – egreg
    Dec 6, 2011 at 7:33
  • @egreg: What error with xcolor?
    – Werner
    Dec 6, 2011 at 7:52
  • @Werner It can be due to the fact that here I have a 2010 TeX Live.
    – egreg
    Dec 6, 2011 at 7:55
  • @egreg: Sure. This warning is produced with mdframed [2011/11/13 v1.0], regardless of xcolor.
    – Werner
    Dec 6, 2011 at 7:59
  • 1
    I can confirm that on TeX Live 2011 and mdframed 1.0 the warning is present. Seems like a bug.
    – egreg
    Dec 6, 2011 at 8:43

1 Answer 1

5

Instead of comment I will answer this question.

This bug was found by Dietrich Grau. At the moment I don't uploaded the new version because I am preparing the dtx-file.

In Version 1.0 I used a modification of \makebox with a calculated \hsize for the contents. \hsize gets the width of the text without three relevant lengths (\linewidth, \innerleftmargin and \innerrightmargin).

Normally the overfull box is the width of the addition of

2linewidth        = .4pt
+innerleftmargin  = 10pt
+innerrightmargin = 10pt
__________________________
overfull box      = 20.8pt

In the current development version this bug should be fixed and can be downloaded here: mdframed on github

Note to compile this version you need the documentclass ltxmdf which is available here: ltxmdf on github

If you have any problems with the compilation please contact me.

PS: I don't know how to create a Makefile for Windows.

1
  • @Werner: Thanks. (no grammar or orthography ;-) ) Dec 6, 2011 at 17:00

You must log in to answer this question.

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