1

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:


enter image description here


Adding

\begingroup
    \makeatletter
    \@for\theoremstyle:=definition,remark,plain\do{%
        \expandafter\g@addto@macro\csname th@\theoremstyle\endcsname{%
            \addtolength\thm@preskip\parskip
            }%
        }
\endgroup

to the preamble, as suggested in Question 25346 produces


enter image description here


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!

  • 1
    \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 inamsthmare 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.) – barbara beeton Mar 25 '14 at 15:12

1 Answers1

3

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:

Sample output

\documentclass[parskip=full]{scrreprt}

\usepackage{amsmath, amsthm}

\begingroup
    \makeatletter
    \@for\theoremstyle:=definition,remark,plain\do{%
        \expandafter\g@addto@macro\csname th@\theoremstyle\endcsname{%
            \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}
Andrew Swann
  • 95,762