6

I use the mdframed package with option style=1, which means that TikZ is responsible for drawing frames:

\documentclass{article}

\usepackage[style=1]{mdframed}

\begin{document}

\noindent
Text
\begin{mdframed}
  Framed
\end{mdframed}
Text

\end{document}

When I compile this minimal example I observe redundant vertical white space below the framed region. It seems that the baseline is not optimally chosen. Does anybody know how to solve this spacing problem?


Addendum: The vertical spacing problem outlined above is no longer present with version 0.9a of the mdframed package.

6
  • Do you have the same problem with the new version? Commented Sep 7, 2011 at 13:28
  • @Marco: I've tested the current CTAN version. Vertical spacing is now fine for style=0 and style=1. But I encounter another problem: I get no frame at all when style=1.
    – mhp
    Commented Sep 7, 2011 at 19:48
  • I see the problem. I must set value of outerlinewidth per default >0. So far you must use outerlinewidth to get a frame. Commented Sep 7, 2011 at 19:50
  • @Marco: You get the frame as soon as you specify a value for middlelinecolor.
    – mhp
    Commented Sep 7, 2011 at 20:14
  • Really? I must check. But I know I have to change the current behaviour. ;-) Commented Sep 7, 2011 at 20:47

1 Answer 1

10

You can control the skip below the frame using skipbelow=<length>:

\documentclass{article}
\usepackage[style=1]{mdframed}

\begin{document}

\noindent Text
\begin{mdframed}
  Framed
\end{mdframed}
Text

\noindent Text
\begin{mdframed}[skipbelow=-0.5em]
  Framed
\end{mdframed}
Text

\end{document}

enter image description here

0

You must log in to answer this question.

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