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

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}
  • 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. – Felix Z. Hoffmann Mar 25 '14 at 16:27
  • And the result is very poor, I should add. – egreg Mar 25 '14 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. – Felix Z. Hoffmann Mar 25 '14 at 19:30
  • @FelixHoffmann I think that spaced paragraphs are evil and Andrew's example clearly shows why. – egreg Mar 25 '14 at 20:22
  • 1
    @cfr Explain them that it used to be fashionable a century ago – egreg Sep 24 '17 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.