10

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}

1 Answer 1

12

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

3
  • Perfect! I'll open an issue at github.
    – letmaik
    Commented Mar 2, 2013 at 14:29
  • @neo: You don't need. I am here ;-) Commented Mar 2, 2013 at 14:29
  • @neo: Fixed issue: github.com/marcodaniel/mdframed and the new option is suppressfirstparskip;-) Commented Mar 2, 2013 at 14:46

You must log in to answer this question.

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