2

I'm looking to modify the proof environment given in amsthm so that

  1. There is a space after the word "proof"
  2. The qed symbol is inserted a little bit after end of the proof, rather than flushed right.
  3. The word "proof" is printed in bold rather than italic.

Number 3 has been asked before, and I've accomplished it via the code

\let\oldproofname=\proofname
\renewcommand{\proofname}{\rm\bf{\oldproofname}}

Number 2 I'm happy to manually type in the command every time, by turning off the old qed symbol and making a new one via

\renewcommand{\qedsymbol}{}
\newcommand{\qd}{\,\, \raisebox{-2pt}{\scalebox{2}{$\square$}}}

but I'm sure there's a much better way than this.

Number 1 I don't know how to accomplish.

I like everything else about the proof environment, and I'd like to preserve it.

One possibility: If I knew the defaults of the proof environment I could do \renewenvironment and keep it mostly the same, but where do I find these, and an explanation of what each one means?

  • About 1: isn't there a space? Do you mean removing the period, perhaps? – egreg Sep 20 '16 at 9:43
1

Here are the changes you need (but I didn't change \qedhere, it would require much more work).

\documentclass{article}
\usepackage{amsthm}

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[%
    \hskip\labelsep
    \normalfont\bfseries % was \itshape
    #1%
    \@addpunct{.}% remove this if you don't want punctuation
  ]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\let\qed\relax % avoid a warning
\DeclareRobustCommand{\qed}{%
  \ifmmode \mathqed
  \else
    \leavevmode\unskip\penalty\@M\hbox{}\nobreak\hspace{.5em minus .1em}% was \hfill
    \hbox{\qedsymbol}%
  \fi
}
\makeatother

\begin{document}

\begin{proof}
This proof ends here.
\end{proof}

\begin{proof}
This proof is quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
longerrrrr.
\end{proof}

\noindent\textbf{Proof.}
This proof is quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
quite longer
longerrrrr.


\end{document}

enter image description here

The final paragraph is to show how the QED does not end up in a line by itself. The minus .1em bit is to give small flexibility in tough situations.

  • Thsnk you! How do I modify the amount of space placed after the word "proof"? – Eric Auld Sep 20 '16 at 11:10
  • @EricAuld Add \hspace{1em} (or whatever) after \@addpunct{.}. – egreg Sep 20 '16 at 11:51

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.