QED symbol in latex

Latex

Latex Problem Overview


How do I type a QED symbol - I want a full box and not an empty box like \qed gives you. (I'm not using \begin{proof})

Latex Solutions


Solution 1 - Latex

You can use \blacksquare:

> When creating TeX, Knuth provided the symbol ■ (solid black square), also called by mathematicians tombstone or Halmos symbol (after Paul Halmos, who pioneered its use as an equivalent of Q.E.D.). The tombstone is sometimes open: □ (hollow black square).

Solution 2 - Latex

enter image description here

\documentclass{scrartcl}
\usepackage{amssymb}
\begin{document}
$\backslash$blacksquare: $\blacksquare$

$\backslash$square: $\square$
\end{document}

You can easily find such symbols with http://write-math.com

When you want to align it to the right, add \hfill.

I use:

\renewcommand{\qed}{\hfill\blacksquare}
\newcommand{\qedwhite}{\hfill \ensuremath{\Box}}

Solution 3 - Latex

If you \usepackage{amsmath}, the \blacksquare command will typeset a solid black square. The \square command will give you a hollow square.

The ulsy package has a few version of the lightning bolt for contradictions: \blitza, \blitzb, ..., \blitze. Just drop \usepackage{ulsy} into the preamble of your document.

Finally, as others have pointed out, the Comprehensive LaTeX Symbols List is a great resource for finding the perfect symbol for the job.

Solution 4 - Latex

Add to doc header:

\usepackage{ amssymb }

Then at the desired location add:

$ \blacksquare $

Solution 5 - Latex

Solution 6 - Latex

\rule{1.2ex}{1.2ex} will give you a filled box.

\fbox{\phantom{\rule{.7ex}{.7ex}}} will give you an empty box. The \phantom command will typeset with invisible ink.

The advantage of this approach is that no package is needed. Also the size is up to your control. Less is more.

Solution 7 - Latex

Simple answer:

In the preamble make sure you have \usepackage{amssymb}

Then in the preamble we can define this simple command: \newcommand{\qed}{\hfill $\blacksquare$}

Then whenever you want the QED symbol to complete a proof, you type \qed.

If you prefer a hollow square, replace \blacksquare with \square

Solution 8 - Latex

I think you are looking for this:

\newcommand*{\QEDA}{\hfill\ensuremath{\blacksquare}}

Usage:

\begin{example}
  blah blah blah \QEDA
\end{example}

Solution 9 - Latex

As described here, you can redefine the command \qedsymbol, in your case - to \blacksquare:

\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}

This works both with \qed command and proof environment.

Solution 10 - Latex

The question specifically mentions a full box and not an empty box and not using proof environment from amsthm package. Hence, an option may be to use the command \QED from the package stix. It reproduces the character U+220E (end of proof, ∎).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGuyView Question on Stackoverflow
Solution 1 - LatexSinan ÜnürView Answer on Stackoverflow
Solution 2 - LatexMartin ThomaView Answer on Stackoverflow
Solution 3 - LatexgodbykView Answer on Stackoverflow
Solution 4 - LatexMeg OView Answer on Stackoverflow
Solution 5 - LatexJohnView Answer on Stackoverflow
Solution 6 - Latexuser1958943View Answer on Stackoverflow
Solution 7 - LatexDisaster AreaView Answer on Stackoverflow
Solution 8 - LatexLKBView Answer on Stackoverflow
Solution 9 - LatexAlexey B.View Answer on Stackoverflow
Solution 10 - LatexMattAllegroView Answer on Stackoverflow