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.

without parskip:

no parskip

parskip=half:

parskip half

\documentclass[parskip=half]{scrartcl}

\usepackage{blindtext}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}

\usepackage[framemethod=TikZ]{mdframed}
\colorlet{shadecolor}{gray!25}

\newmdtheoremenv[
  innerlinewidth=0pt,middlelinewidth=0pt,
  outerlinecolor=shadecolor,outerlinewidth=3pt,
  skipabove=\topskip,skipbelow=\topskip,
  ]{example}{Example}   

\begin{document}

\begin{example}
  \blindtext
\end{example}

\end{document}
share|improve this question

1 Answer 1

up vote 10 down vote accepted

Since you don't set the innertopmargin, you have the default value, that the manual specifies as .4\baselineskip. A workaround is

\newmdtheoremenv[
  innerlinewidth=0pt,middlelinewidth=0pt,
  outerlinecolor=shadecolor,outerlinewidth=3pt,
  skipabove=\topskip,skipbelow=\topskip,
  %%% kill the initial \parskip
  innertopmargin=\dimexpr.4\baselineskip-\parskip\relax,
  %%%
  ]{example}{Example}

but this should probably be corrected in mdframed, maybe with a new key suppressfirstparskip.

enter image description here

share|improve this answer
    
Perfect! I'll open an issue at github. –  neo Mar 2 '13 at 14:29
    
@neo: You don't need. I am here ;-) –  Marco Daniel Mar 2 '13 at 14:29
    
Ah^^ Great. Thanks for the package! :) –  neo Mar 2 '13 at 14:30
    
@neo: Fixed issue: github.com/marcodaniel/mdframed and the new option is suppressfirstparskip;-) –  Marco Daniel Mar 2 '13 at 14:46

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.