Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
I get no warning with that example (after correcting the error about xcolor). –  egreg Dec 6 '11 at 7:33
    
@egreg: What error with xcolor? –  Werner Dec 6 '11 at 7:52
    
@Werner It can be due to the fact that here I have a 2010 TeX Live. –  egreg Dec 6 '11 at 7:55
    
@egreg: Sure. This warning is produced with mdframed [2011/11/13 v1.0], regardless of xcolor. –  Werner Dec 6 '11 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 '11 at 8:43
show 1 more comment

1 Answer

up vote 5 down vote accepted

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.

share|improve this answer
    
@Werner: Thanks. (no grammar or orthography ;-) ) –  Marco Daniel Dec 6 '11 at 17:00
    
No problem! :) –  Werner Dec 6 '11 at 17:00
add comment

Your Answer

 
discard

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.