4

I am trying to alter the space below a theorem box, which is created using thmtools and mdframed.

\documentclass{scrartcl} %
%
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{mdframed}
%
\declaretheoremstyle[ %
    mdframed={ %
        skipbelow=50pt, %
        skipabove=50pt, %
    } %
]{myStyle} %
\declaretheorem[style=myStyle]{example} %
%
\begin{document} %
    text
    \begin{example} %
        text
    \end{example} %
    text
\end{document} %

Adding space above works, adding space below does not.

1 Answer 1

4

Yes, some problems with the spacing in the interaction between both packages has been noticed before (see, for example How to remove space surrounding a colored theorem box? and the comment in the accepted answer). You can use the postfoothook key to add the spacing below:

\documentclass{scrartcl}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{mdframed}

\declaretheoremstyle[
  postfoothook={\vskip50pt},
  mdframed={
    skipabove=50pt,
  }
]{myStyle}
\declaretheorem[style=myStyle]{example}

\begin{document}
    text
    \begin{example}
        text
    \end{example}
    text
\end{document}

enter image description here

You must log in to answer this question.

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