I'm using the amsthm package to layout theorems and their proofs. How can I reduce the vertical spacing between the last line of the theorem statement and the first line of the proof?
BTW, I tried achieving this by fiddling with the third parameter to
\newtheoremstyle{mystyle}{4ex}{-4ex}{}{}{\bfseries}{.}{3ex}{}
…but even negative values (as illustrated above) failed to bring the first line of the proof closer than a certain fixed distance of about 2.5 line heights.
A related question: how can I prevent pagebreaks between the theorem and the proof? I would like to ensure that at least two lines from the theorem statement precede the first line of a proof on a page. (One may fairly assume that there is no text interposed between the last line of the theorem statement and the first line of the proof.)
Best Answer
One possibility would be to redefine the
proof
anvironment as defined inamsthm.sty
(the definition uses\topsep6\p@\@plus6\p@\relax
, so you could make some changes there). Another approach would be to use the front-end thmtools to define a new theorem-like structure behaving like the standardproof
environment, but using thespaceabove
key to control the vertical space above it. The following example illustrates this second approach and shows the different spacing for the newprf
environment and the standardproof
environment: