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

You must log in to answer this question.

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