41

I am using

\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\begin{document}

\begin{proof}
A = B
\end{proof}

\end{document}

and an empty square box will be added automatically at the end of the proof. I am wondering how to add a solid black box instead, in an automatic way.

  • Please add a minimal working example (MWE) that shows your document class and the relevant (theorem-related) packages. – lockstep Feb 15 '13 at 17:37
  • 1
    \renewcommand{\qedsymbol}{\rule{1ex}{1ex}} put in the preamble, would it work? – yo' Feb 15 '13 at 17:40
47

The documentation of amsthm says:

A QED symbol, □, is automatically appended at the end of a proof environment. To substitute a different end-of-proof symbol, use \renewcommand to redefine the command \qedsymbol.

Thus, one might proceed as follows:

\renewcommand{\qedsymbol}{$\blacksquare$}

A mwe to play with:

\documentclass[a4paper,11pt]{article}
\usepackage{amsmath,amssymb,amsthm}

\renewcommand{\qedsymbol}{$\blacksquare$}

\begin{document}
\begin{proof}[Proof of the Main Theorem]
  \begin{equation*}
    G(t)=L\gamma!\,t^{-\gamma}+t^{-\delta}\eta(t) \qedhere
  \end{equation*}
\end{proof}
\end{document}

If you're looking for beamer, it is quite the same: you have to re-define the template qed symbol (almost similar to my previous answer in How to customise (e.g. make thicker) the end-proof symbol in Beamer?).

A mwe:

\documentclass{beamer}

\begin{document}

\begin{frame}
\setbeamertemplate{qed symbol}{$\blacksquare$}
\begin{proof}
\begin{itemize}
\item First item.
\item Second item.
\item Third item.
\end{itemize}
\end{proof}
\end{frame}

\end{document}

Notice that in this case the symbol will assume the colors of the Beamer color theme currently in use.

  • Thank you very much for \qedhere! – bkarpuz Sep 30 '14 at 8:55
  • @bkarpuz: Glad it helped :) – Claudio Fiandrino Sep 30 '14 at 12:37
17

If you are using the amsthm package (or one of the ams documentclasses), then the symbol used is given by the command \qedsymbol. It can be redefined as follows:

Sample output

\documentclass{article}

\usepackage{amsthm,amssymb}

\renewcommand{\qedsymbol}{\rule{0.7em}{0.7em}}

\begin{document}
\begin{proof}
  Clear.
\end{proof}
\end{document}
  • 2
    Immediately followed, of course, by \begin{self-doubting student}! – OJFord Dec 5 '16 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.