I want to create boxes (\Box) and diamonds (\Diamond) with letter and other symbols insider them. I've achieved something, but the result is ok-ish:

$\Box \!\!\! _ {^{_ {^{_{^a}}}}}$
$\Diamond \!\!\! _ {^{_ {^{_{^a}}}}}$
$\Box\!\!\! _{^{ _{^\heartsuit}}}$

Does anyone have a good tip to make it looks better?

2 Answers 2


A simple solution for single characters in the box and diamond. Play around with the setting \setlength\fboxsep{2pt} inside macros




enter image description here


I can't make the code shorter, but it might be more readable and reliable.

    \hfil$\vcenter{\hbox{$\scriptstyle #2$}}$\hfil}}
$\inBox{a}, \inDiamond{a}, \inBox\heartsuit$

enter image description here

\ooalign is used by LaTeX kernel to merge symbols. Commands like \textcircled are defined with it.

  • nice solution!!
    – user2478
    May 5, 2011 at 12:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .