4

the following code will only make the qed not appear in the second proof. However, it it possible to make the qed symbol never appear at the end of the proofs without having to specify it locally every time?

\documentclass{article}
\usepackage{amsthm}
\begin{document}
\begin{proof}
This has the QED symbol.
\end{proof}
\begin{proof}\renewcommand{\qedsymbol}{}
This hasn't.
\end{proof}
\begin{proof}
And this has it again.
\end{proof}
\end{document}
6

A simplistic solution would be adding

\renewcommand{\qedsymbol}{}

in the preamble, but this doesn't really work, as the following example shows:

\documentclass{article}
\usepackage{amsthm}

\renewcommand{\qedsymbol}{}

\begin{document}
\begin{proof}
A one liner
\end{proof}
\begin{proof}
This ends with a display
\[
0=0.
\]
\end{proof}
\begin{proof}
Another one liner.
\end{proof}
\end{document}

enter image description here

You should still have \qedhere in the display in order to get better spacing.

It's better to modify the definition of proof to remove the QED business.

\documentclass{article}
\usepackage{amsthm}

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
%  \pushQED{\qed}% <--- remove the QED business
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \itshape
    #1\@addpunct{.}]\ignorespaces
}{%
%  \popQED% <--- remove the QED business
  \endtrivlist\@endpefalse
}
\renewcommand\qedhere{} % to ensure code portability
\makeatother

\begin{document}
\begin{proof}
A one liner
\end{proof}
\begin{proof}
This ends with a display
\[
0=0.
\]
\end{proof}
\begin{proof}
Another one liner.
\end{proof}
\end{document}

enter image description here

You can still have \qedhere, but it won't have any effect, so copying code where the command has been used won't give surprises.

  • Thank you for the suggestion how to edit the 'proof' environment! I am using it with \tag*{$\qed$} instead of \qedhere when using multline environment. There is a known issue of misaligning \qedhere in multline. One of the solutions is to use \tag*{$\qed$} instead of \qedhere, but there is an unnecessary vertical skip. Your modifications are useful to suppress unnecessary vertical skip that occurs. – mathreader Aug 22 '17 at 4:18
2

If you don't want qed symbol in all proofs, use etoolbox and

\AtBeginEnvironment{proof}{\renewcommand{\qedsymbol}{}}{}{}

MWE:

\documentclass{article}
\usepackage{amsthm}
\usepackage{etoolbox}
\AtBeginEnvironment{proof}{\renewcommand{\qedsymbol}{}}{}{}
\begin{document}
\begin{proof}
This has the QED symbol.
\end{proof}
\begin{proof}
This hasn't.
\end{proof}
\begin{proof}
And this has it again.
\end{proof}
\end{document}

Or define a new myproof:

\documentclass{article}
\usepackage{amsthm}
\makeatletter
\newenvironment{myproof}[1][\proofname]{\par
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \itshape
    #1\@addpunct{.}]\ignorespaces
}{%
  \endtrivlist\@endpefalse
}
\makeatother
\begin{document}
\begin{proof}
This has the QED symbol.
\end{proof}
\begin{myproof}
This hasn't.
\end{myproof}
\begin{proof}
And this has it again.
\end{proof}
\end{document}

enter image description here

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.