2

Here is a kind of style I want: The proof environment, which has some margin on both left and right side. Also has a qed square on the last line.

i.e.

 Theorem 1: xxxxxxxxxxxxxxxxxxx.

       proof: xxxxxx,xxxxx,

       xxxxx,xxxxxxxx,xxxx,

       xxxxxxxxx.        □

That is the proof environment has margin on both left and right sides.

I do not know how to make it. I tried newtcbtheorem, but it always has a "1" after the "proof", it needs \begin{proof*} to dismiss it, which i think it is troublesome.

I just want to use \begin{proof} in my document, and define everything in the cls file.

2
  • 1
    Have you tried placing the proof environment in a quotation environment?
    – Mico
    Commented Nov 20, 2020 at 5:56
  • 1
    The easiest way I know of to obtain a QED symbol at the end of the proof is to load the amsthm package and employ its proof environment
    – Mico
    Commented Nov 20, 2020 at 5:58

1 Answer 1

2

The amsthm package defines the proof environment as

\newenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \itshape
    #1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}

I therefore patch this to a \list (instead of \trivlist) with the parameters taken from the quotation environment:

\documentclass{article}

\usepackage{lipsum} % for dummy text
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \list{}{\listparindent 1.5em
          \itemindent    \z@
          \labelwidth    \z@
          \rightmargin   \leftmargin
          \parsep        \z@ \@plus\p@}%
  \item[\hskip\labelsep\itshape#1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endlist\@endpefalse
}
\makeatother

\begin{document}

\begin{theorem}
\lipsum*[66]
\end{theorem}

\begin{proof}
\lipsum[66]\lipsum*[75]
\end{proof}

\end{document}

enter image description here

1
  • That's great! It is exactly what I want. Thank you very much! Commented Nov 21, 2020 at 3:38

You must log in to answer this question.

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