I'm writing a paper and I want to finish my proofs with a proper QED
(quod erat demonstrandum). I want to use a \square symbol for this,
and it should be placed in the rightmost text position. In ordinary
text I can use \hfill{}\hbox{$\square$} after the last word, which
works fine. However I want to be able to do this also in a
displaymath environment, but this does not work. The symbol is not
properly positioned. In straight TeX I can use something like
$$0 \neq 1\eqno\square$$
which produces the right result. But the LaTeX displaymath seems to
use ordinary math mode, and \eqno can only be used in display math
mode.
I want to have the following macro definition in my style file,
\def\QED@symbol{\square}
\def\QED{\ifmmode\mathchoice{\eqno(\QED@symbol)}{}{}{}
\else\hbox{}\nobreak\hfill{}\hbox{$\QED@symbol$}\fi}
(this one does _not_ work) and use it in my LaTeX file as
\begin{displaymath}
0 \neq 1\QED
\end{displaymath}
Does anyone know how to solve this problem and how to define a \QED
macro that does the job I described?
Thanks in advance, Wilbert.
--------------------------------------------------------------------------
Wilbert Schelvis
PTT Research, Neher Laboratories room: E53
PO BOX 421 phone: +31703326486
2260 AK Leidschendam fax: +31703326477
the Netherlands email: W.A.M.S...@research.ptt.nl