# Inconsistent spacing with parskip option of KOMA script and amsthm

This problem is similar to Question 25346, however the proposed solution does not solve my problem.

\documentclass[parskip=full]{scrreprt}

\usepackage{amsmath, amsthm}

\theoremstyle{definition}
\newtheorem{definition}{Definition}[chapter]

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

\begin{definition}
In luctus mattis felis ac tristique.
\end{definition}

Nunc vulputate lectus at eros vehicula.

Aliquam fermentum eu justo in lobortis.
\end{document}


produces inconsistent spacing:

\begingroup
\makeatletter
\@for\theoremstyle:=definition,remark,plain\do{%
}%
}
\endgroup


to the preamble, as suggested in Question 25346 produces

but this space is now significantly bigger than the paragraph skip. I would like the the text-to-theorem-skip be identical in size to the parskip. Thanks!

• \addtolength increases the value of what's already there. i think what you want is to reset the value of \thm@preskip to equal that of \parskip. if that's the case, why don't you just do it directly, using \setlength? (the definitions in amsthm are a little more complicated though, so more changes might be involved. and you might want also to consider \thm@postskip; having that larger than the preskip seems rather unusual.) Mar 25, 2014 at 15:12

Your code results in essentially two \parskips before and after the definition. Before the theorem you can set the spacing to \parskip by using \setlength rather than \addtolength in the adjustment of \thm@preskip. For after the theorem the relevant quantity is \thm@postskip, but this needs to be put to zero, as there comes a \parskip anyway:

\documentclass[parskip=full]{scrreprt}

\usepackage{amsmath, amsthm}

\begingroup
\makeatletter
\@for\theoremstyle:=definition,remark,plain\do{%
\setlength\thm@preskip\parskip
\setlength\thm@postskip{0pt}
}%
}
\endgroup

\theoremstyle{definition}
\newtheorem{definition}{Definition}[chapter]

\begin{document}
\show\definition

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

\begin{definition}
In luctus mattis felis ac tristique.
\end{definition}

Nunc vulputate lectus at eros vehicula.

Aliquam fermentum eu justo in lobortis.

\end{document}
`
• Thank you Andrew, it works nicely. I still had to combine your suggestion with the answer to Question 28165, to achieve consistent spacing also in the proof-environment. Mar 25, 2014 at 16:27
• And the result is very poor, I should add. Mar 25, 2014 at 17:36
• @egreg: Do you mean in regards to my comment? I did in fact end up using your suggestion from Question 59755 instead, as there were some incompatibilites with my document. Mar 25, 2014 at 19:30
• @FelixHoffmann I think that spaced paragraphs are evil and Andrew's example clearly shows why. Mar 25, 2014 at 20:22
• @cfr Explain them that it used to be fashionable a century ago Sep 24, 2017 at 8:32