Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to make LaTeX put no additional space between theorem and proof. Here is my code:

\newtheorem*{pr3}{Theorem}
\begin{pr3}
   foo                                             
\end{pr3}
\begin{proof}[Proof:]
   bar
\end{proof}

Is there a way to do that only with amsthm/amsmath and how? I wanted to renewenvironment proof, however I couldn't find what is the best way to do that. So it would be great if someone can tell me where I can find such information (that could also be considered answer to the first question).

share|improve this question
add comment

migrated from stackoverflow.com Jun 13 '12 at 21:14

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 2 down vote accepted

You probably don't want to remove the space after the proof, so the way should be

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
  \vspace{-\topsep}% remove the space after the theorem
  \pushQED{\qed}%
  \normalfont
  \topsep0pt \partopsep0pt % no space before
  \trivlist
  \item[\hskip\labelsep
        \itshape
    #1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
  \addvspace{6pt plus 6pt} % some space after
}
\makeatother

However a proof environment not preceded by a theorem will be typeset wrongly.

share|improve this answer
    
I didn't want to use negative vspace however as it is not constant like in the other answer, I think that this will do. Thanks. –  Ivaylo Petrov Aug 14 '12 at 12:44
add comment

You could put a negative vertical space between theorem and proof, like so:

\newtheorem*{pr3}{Theorem}
\begin{pr3}
   foo                                             
\end{pr3}
\vspace{-1.5em}
\begin{proof}[Proof:]
   bar
\end{proof}

and you could wrap all into a new command \theoremproof{theorem body}{proof body}.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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