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:

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}}
\mbox{\mancube}) you can use it in math mode.
– Gonzalo Medina
Jan 09 '12 at 15:40
\newcommand{\cube}{\mathord{\mbox{\mancube}}} to your example.
– Tobi
Jan 09 '12 at 15:58
\text of amsmath; \mathord is not needed anyway: a box in math mode is always an ordinary symbol.
– egreg
Jan 09 '12 at 16:03
!in front of it to make it an image. I think it would help to see an example. – Roelof Spijker Jan 09 '12 at 15:28\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);– Roelof Spijker Jan 09 '12 at 15:36