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.

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.

share|improve this question
    
Do you have the same problem with the new version? –  Marco Daniel Sep 7 '11 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 Sep 7 '11 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. –  Marco Daniel Sep 7 '11 at 19:50
    
@Marco: You get the frame as soon as you specify a value for middlelinecolor. –  mhp Sep 7 '11 at 20:14
    
Really? I must check. But I know I have to change the current behaviour. ;-) –  Marco Daniel Sep 7 '11 at 20:47
show 2 more comments

1 Answer 1

up vote 8 down vote accepted

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

share|improve this answer
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.