[Tex/LaTex] Symbol for cube

math-modesymbols

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:

example of equation with cube

Best Answer

The manfnt package offers \mancube and \manimpossiblecube:

\documentclass{article}
\usepackage{manfnt}

\begin{document}

\mancube

\manimpossiblecube

\end{document}

enter image description here

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}

enter image description here

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

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