# How can I change the spacing around definitions with amsthm?

I am wondering how I may change spacing around definition environments.

I have seen the answer posted for the same question about theorems,

\makeatletter
\def\thm@space@setup{%
\thm@preskip=\parskip \thm@postskip=0pt
}
\makeatother


but am not sure how to edit this to work for definition environment.

• what precisely do you want to do -- make the space larger, or remove it? there is a style \newtheoremstyle{remark} that differs from the definition style only by having no additional space above or below. – barbara beeton Jul 5 '13 at 16:45
• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – barbara beeton Jul 5 '13 at 16:45
• I would like to have the option of specifying how much space is before the environment, and how much after the environment, similar to the code shown above. However that code only affects theorems, and not definitions. I am wondering how to edit that code so that it does work for definition environments. – user33275 Jul 5 '13 at 16:49

this answer presupposes that you are using the amsthm package, and not one of the ams document classes, which incorporate the amsthm facilities, but sometimes with slightly different assumptions.

you can adapt the spacing around the definition environment using this redefinition.

\makeatletter
\renewcommand{\th@definition}{%
\normalfont
\thm@preskip <dimen> \relax
\thm@postskip <dimen> \relax
}
\makeatother


(it isn't necessary to redefine the end of the environment; it's set up this way since often the pre- and post-skips are equated by the statement \thm@postskip\thm@preskip, and that is most often done at the same time the preskip is set so that the relation between the settings is more easily recognized.