# 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:

• You can add a link to the image, then someone with enough rep can add the ! in front of it to make it an image. I think it would help to see an example. Commented Jan 9, 2012 at 15:28
• See if the answer to this question can be adapted to your liking: tex.stackexchange.com/questions/38757/looking-for-symbol-shield Commented Jan 9, 2012 at 15:31
• In case of confusion, check The conprehensive LaTeX Symbol List Commented Jan 9, 2012 at 15:33
• TikZ'ing it: \tikz\draw (0,0,0) rectangle (1,1,0) (0,1,0) -- (0,1,-1) -- (1,1,-1) --(1,1,0) (1,0,0) -- (1,0,-1) -- (1,1,-1); Commented Jan 9, 2012 at 15:36
• Out of curiosity: where did you see this explicit notation for a cube ? Commented Sep 24, 2019 at 14:04

## 1 Answer

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. Commented Jan 9, 2012 at 15:40
• Perhaps you could add that to your answer as well. Commented Jan 9, 2012 at 15:43
• @TorbjørnT. right again ;-) Done! Commented Jan 9, 2012 at 15:46
• @GonzaloMedina: You may want to add something like \newcommand{\cube}{\mathord{\mbox{\mancube}}} to your example.
– Tobi
Commented Jan 9, 2012 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. Commented Jan 9, 2012 at 16:03