# Fix thmtool spacing when using the parskip package

While on polished documents the usual paragraph spacing is nice, in personal notes I prefer to have non-indented paragraphs separated by blank lines. This can be easily accomplished by using the parskip package.

When used in conjunction with thmtools however, the spacing around theorem environments is completely off.

\documentclass{article}

\usepackage{amsmath,amsthm}
\usepackage{parskip}
\usepackage{thmtools}

\declaretheorem{theorem}
\declaretheorem[style=remark]{remark}

\usepackage{lipsum}

\begin{document}

\lipsum[2]
\lipsum[2]
\begin{theorem}
This is cool maths.
\end{theorem}
\lipsum[2]
\begin{remark}
This is cool maths.
\end{remark}
\lipsum[2]

\end{document}


I know I can define my own style and set spaceabove=\parskip and spacebelow=0pt but this has the negative side-effect of requiring to also re-specify all the other parameters even for predefined styles. For example, \declaretheoremstyle[spaceabove=\parskip, spacebelow=0pt]{remark} would make remarks look like theorem, whereas without the \declaretheoremstyle the name is in italics.

I have a solution that I am posting as an answer which I am not completely satisfied with.

The question is: can one patch thmtools properly so it picks up the \parskip?

An unsatisfactory solution is to use the preheadhook option to insert some vertical space. For added convenience, the hook can be installed via a custom parskip key:

\documentclass{article}

\usepackage{amsmath,amsthm}
\usepackage{parskip}
\usepackage{thmtools}
%%%%%% Here we define the parskip key
\makeatletter

\makeatother

%%%%%% Here we use it to add the vertical space
\declaretheorem[parskip]{theorem}
\declaretheorem[style=remark,parskip]{remark}

\usepackage{lipsum}

\begin{document}

\lipsum[2]
\lipsum[2]
\begin{theorem}
This is cool maths.
\end{theorem}
\lipsum[2]
\begin{remark}
This is cool maths.
\end{remark}
\lipsum[2]

\end{document}