6

I'm using the proof environment defined by \usepackage{amssymb,amsthm}, mainly so the qed box is inserted automatically in the correct place.

But I don't want a heading (or the blank row) before the mathematics. So I use

\begin{proof}[]

with nothing in the []. But I still get a period in the generated text. Is there a better way of suppressing the line entirely?

1

2 Answers 2

3

One option would be to define a new proofw environment (in this way you still have access to the standard proof) in a similar fashion to amsmthm's proof, but suppressing the name and the punctuation:

\documentclass{article}
\usepackage{amsthm}

\makeatletter
\newenvironment{proofw}{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\makeatother

\begin{document}

\begin{proof}
A standard test proof.
\end{proof}

\begin{proofw}
A modified test proof.
\end{proofw}

\end{document}

enter image description here

If you want more freedom in customization, another option is to use thmtools as a front-end for amsthm and define your environment controlling all attributes (spacing after and before, addition of end-mark, no head) at will:

\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}

\declaretheoremstyle[
  spaceabove=0pt, 
  spacebelow=0pt,
  bodyfont=\normalfont,
  postheadspace=0em,
  qed=\qedsymbol,
  headpunct={},
  headformat={}
]{withouthead}
\declaretheorem[style=withouthead]{proofw}

\begin{document}

\begin{proof}
A standard test proof.
\end{proof}

\begin{proofw}
A modified test proof.
\end{proofw}

\end{document}
3
  • The only pity with this is that it seems to insert extra space above the proof body. Perhaps I'm fighting the environment too hard here.
    – Bathsheba
    Aug 27, 2015 at 14:01
  • 1
    @Bathsheba Change \topsep6\p@\@plus6\p@\relax to \topsep0\p@\@plus6\p@\relax and you'll kill the spacing. Or use [thmtools](www.ctan.org/pkg/thmtools) as a front-end to define your own environment without head but with end-mark. In some minutes I'll add this option. Aug 27, 2015 at 14:09
  • @Bathsheba I added a little example using thmtools. Aug 27, 2015 at 14:16
3

You can do it with the stock proof environment, by adding an appropriate definition for \proofname.

Since proof does

\item[\hskip\labelsep\itshape#1\@addpunct{.}]

where #1 is the optional argument to \begin{proof} with default value \proofname, all we need is to nullify the spacing and to set a high enough space factor to make \@addpunct that a punctuation symbol is already present.

\documentclass{article}
\usepackage{amsthm}

\usepackage{lipsum} % just for mock text

\newtheorem{thm}{Theorem}
\renewcommand{\proofname}{\hskip-\labelsep\spacefactor3000 }

\begin{document}

\begin{thm}
\lipsum*[2]
\end{thm}

\begin{proof}
\lipsum*[3]
\end{proof}

\begin{proof}[Proof of the main theorem]
This one is obvious.
\end{proof}

\end{document}

In case you do want the title, you can still give it explicitly.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .