# Creating Boxed Check Mark

Is there a way to create a box with a check mark in the center of it and the check mark coming out of the box?

For example: $\boxdot$ or $\boxtimes$, but instead have a check mark placed at the center extending outside the box.

P.S. How can I get things to work in math mode on this site. For example, the above sample code does not display the pictures.

-
There is no math mode functionality on this site. We need to display math-code as code much more often then displaying the graphical representation of it. You will need to add it them as images by yourself if you really want them. – Martin Scharrer Apr 17 '11 at 12:14
@Martin: given the frequency that this comes up, may be a line in the FAQ or the How To Ask section about MathJax not supported here would be nice. – Willie Wong Apr 17 '11 at 13:06
@Willie: Good idea. meta.tex.stackexchange.com/q/1272/86 – Loop Space Apr 17 '11 at 18:11

One can choose between the following two solutions; the first one centers the two symbols with respect to one another, the second one draws the square and then displaces the check mark.

\documentclass{article}
\usepackage{amssymb}
\begin{document}

\mbox{\ooalign{$\checkmark$\cr\hidewidth$\square$\hidewidth\cr}}

\makebox[0pt][l]{$\square$}\raisebox{.15ex}{\hspace{0.1em}$\checkmark$}

\end{document}

By acting on the two dimensions, one can find by trial and error the best relative positioning of the check mark with respect to the box.

This gives (with magnification x16 and displayed horizontally):

-
Nice. Would you mind putting the other headers it needs to properly display as an output, such as Martin did above. Thanks – night owl Apr 17 '11 at 12:52
Both attempts were very close, but how could I use what you gave and tweak around with the positioning of the check mark to make it precisely in the middle of the check box with it touching the side or base of the box. Only the extending arm of the check mark is going through the upper right corner of the box and no other part of the check mark is touching the box. – night owl Apr 17 '11 at 13:05
This is just BEAUTIFUL. Thanks a lot! Salute! – Sibbs Gambling Mar 13 at 7:43

You could overlay two symbols using \rlap as shown below. The use of \text should ensure that the checkmark is scaled in subscripts, which might not be really necessary for such a symbol. See also Overlay symbol with another to learn how to center one symbol on another one.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}

$\text{\rlap{$\checkmark$}}\square$

\end{document}

If this is not what you want you still could draw the symbol by yourself e.g. using tikz. See the answers of Square with a diamond in it for this.

-
Awesome +1.., this is primarily what I was looking for. But just slightly wanted the checkmark to be in the center of the box. I can check out the link on 'tikz' on doing this. – night owl Apr 17 '11 at 12:37
\rlap is good, but sometimes it may surprise LaTeX users; \makebox[0pt][l]{$\checkmark$}$\square$ perhaps uses more resources, but it's safe in all contexts. In your code \text is superfluous, actually. A robust solution should take into account \mathsurround, too: \mbox{\mathsurround=0pt \makebox[0pt][l]{$\checkmark$}$\square$}. – egreg Apr 17 '11 at 12:39
@egrep: Yes, in the shown example the \text is not necessary, but -- as mentioned -- would scale the checkmark if used in a subscript. It all depends on the exact usage. Ok, a symbol like this is hardly used inside an equation. – Martin Scharrer Apr 17 '11 at 12:49
Based on your typo of egreg, I s'pose you are a *nix user? :-D – Willie Wong Apr 17 '11 at 13:08
@Willie: Indeed! :-D – Martin Scharrer Apr 17 '11 at 13:13

If you just want to get the checkmark in a box and don't specifically need to create it yourself, there are two symbols listed in The Comprehensive LaTeX Symbol List that you could use:

\documentclass{article}

\usepackage{wasysym}
\usepackage{marvosym}

\begin{document}
\CheckedBox% from wasysym
\Checkedbox% from marvosym
\end{document}

EDIT: Also, there's the Unicode character 9745 "Ballot Box With Check" ☑ that you can insert directly using XeLaTeX. If you choose the right font, the checkmark will be inside the box entirely. I just used two fonts that I found on my Win7 machine.

%to be compiled with XeLaTeX!
\documentclass{article}

\usepackage{fontspec}

\begin{document}
\setmainfont{Arial Unicode MS}Arial Unicode MS: ☑

\setmainfont{DejaVu Sans}DejaVu Sans: ☑
\end{document}

-
@donherry: Thanks for this insight. I used the marosym package before but did not no it contained this command. This is much simpler than creating a \newcommand. :) P.S. Is there a command or way to position the check-mark in the center of the box? – night owl Jun 23 '11 at 11:28
@night owl: I don't think there is an (easy) way to modify the packages' characters. I added a solution using XeLaTeX. If you want to put the checkbox within a document using a different font, you could again create a \newcommand with the \setmainfont and the checkbox in it. – doncherry Jun 23 '11 at 11:55

You can also try bbding package. It has a set of checks and crosses (for example \XSolidBrush and \Checkmark).

-

I find it easiest just to type $\boxed{\checkmark}$. It's much simpler, however it doesn't come out as well.

-
But OP wants the checkmarks extending outside the box... Probably you need to add some \smash or something. – Symbol 1 Feb 4 at 5:28
\documentclass[12pt]{article}

\usepackage{amsmath}

\usepackage{amssymb}

\begin{document}

$\checkmark\hspace{-.38cm}\Box$

\end{document}
-

## protected by Joseph Wright♦Oct 21 at 9:02

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.