# Symbol for cube

I've searched the Internet, but got nothing. In LaTeX, we can use \square for square, but how can we get a cube, I want to use it in an equation. Here is the picture:

The manfnt package offers \mancube and \manimpossiblecube:

\documentclass{article}
\usepackage{manfnt}

\begin{document}

\mancube

\manimpossiblecube

\end{document}


Those commands won't directly work in math mode, but you can use a \mbox; something like this:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{euler}
\usepackage{manfnt}

\begin{document}

$\mbox{\mancube}_{n} +(n+1)^{3}$

\end{document}


Of course, you could define a command if you are going to use the cube several times:

\newcommand*\cube{\mbox{\mancube}}

• @TorbjørnT. you're right. Boxing the cube (as in \mbox{\mancube}) you can use it in math mode. – Gonzalo Medina Jan 9 '12 at 15:40
• Perhaps you could add that to your answer as well. – Torbjørn T. Jan 9 '12 at 15:43
• @TorbjørnT. right again ;-) Done! – Gonzalo Medina Jan 9 '12 at 15:46
• @GonzaloMedina: You may want to add something like \newcommand{\cube}{\mathord{\mbox{\mancube}}} to your example. – Tobi Jan 9 '12 at 15:58
• @Tobi A safer way might be using \text of amsmath; \mathord is not needed anyway: a box in math mode is always an ordinary symbol. – egreg Jan 9 '12 at 16:03