TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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. – Roelof Spijker Jan 9 '12 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 – Psirus Jan 9 '12 at 15:31
In case of confusion, check The conprehensive LaTeX Symbol List – percusse Jan 9 '12 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); – Roelof Spijker Jan 9 '12 at 15:36
up vote 29 down vote accepted

The manfnt package offers \mancube and \manimpossiblecube:






enter image description here

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



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


enter image description here

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

share|improve this answer
This doesn't work in math mode though, as the OP wanted. – Torbjørn T. Jan 9 '12 at 15:38
@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
@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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.