I have a question about making an ending symbol.
It is a LaTex-default that every proof environment has an ending symbol. I want to make every theorem-alike environment such as the example environment have also an ending symbol. But how to manually set this up? Specifically, I want to make all these environments ended by a square symbol.
\newtheorem{thm}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{pro}[thm]{Proposition}
\newtheorem{assump}{Assumption}
\newtheorem{axiom}{Axiom}
\newtheorem*{conj}{Conjecture}
\theoremstyle{definition}
\newtheorem{defi}[thm]{Definition}
\newtheorem{exam}{Example}
\newtheorem{exer}{Exercise}
\newtheorem*{rem}{Remark}
\newtheorem*{notation}{Notation}
\newtheorem*{note}{Note}
I am looking for, with gratitude, a comprehensive setup.
Best Answer
Asssume you are using
\newtheorem
fromamsthm
. Here\newtheorem
defines new theorem-alike environments and ends them by\@endtheorem
. The later is originally defined as\def\@endtheorem{\endtrivlist\@endpefalse }
and you can insert your ending symbol here.(Ideas come form here)
Caution!
As mentioned by egreg and barbara beeton below, this construction is not perfect. Neither it is as good as the
proof
environment fromamsmath
. One of the fatal defects isTherefore if you want an ending symbol exactly as the one from
proof
, you need either (see egreg's answer for details)deal with glues and penalties.
pack your theorem-alike environment by adding
\pushQED{your symbol}
before and\popQED
after. It isamsthm
provides these two commands which take care of everything. (You can even use\qedhere
).