next up previous
Next: arrows with text Up: examples Previous: url-package: adding URLs

qed-square

Proofs are sometimes ended with a square on the right side, which is there to indicate that the proof is completed.

This can be done with a macro \newcommand{\qed}{\hfill \ensuremath{\Box}}, of which the result looks like the square after this paragraph. Due to latex2html problems it is not automatically placed on the right side but has to be surrounded by \begin{flushright} and \end{flushright}. Unfortunately this also causes it to appear on the next line.

$ \Box$
The \Box command requires the amssymb package, so it is also needed to include \usepackage{amssymb} %for Box, qed.

Another way to do this is to use the amsthm package (include \usepackage{amsthm}). The documentation of this package should be on your system at /usr/local/share/texmf-dist/doc/latex/amscls/amsthdoc.pdf. This package has a proof environment (\begin{proof} and \end{proof}) and \qedhere and \qed commands aswell. More information can be found at http://www.tex.ac.uk/cgi-bin/texfaq2html?label=proof.

Proof. [Proof example] This is an example of how a proof environment with amsthm looks like. $ \qedsymbol$

Note that if you want to use both of them together, you should give another name to the macro, since amsthm already has a \qed macro, which will look like this:$\qed$

This is only placed at the end of the line if nothing is following it.


next up previous
Next: arrows with text Up: examples Previous: url-package: adding URLs
Jan Willem Knopper 2007-12-18