[Tex/LaTex] the best symbol to use for the d’Alembertian

symbols

Normally, most people use the symbol $\Box$ to represent the d'Alembert (wave) operator (including the linked to Wikipedia page).

Recently I wanted to use \hat\Box and \tilde\Box, but they do not render very well.

boxes

What is the "best" way to create such symbols?


Aside: The above image is rendered using my local install of pdflatex: pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian). The symbols seem to render fine on some online services: e.g. "Online LaTeX Equation Editor" produces

more boxes

from

\begin{align*}
\Box &= \sum_a \partial^a\partial_a \,, &
\hat\Box &= \sum_a \mathcal{D}^a\mathcal{D}_a
\end{align*}

Best Answer

The character bounding box of \Box is wrong, the height is too low, when latexsym is used as package to get the symbol:

\documentclass{article}
\usepackage{amsmath,latexsym}

\begin{document}
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{.1pt}
\[ \fbox{$\Box$} \fbox{$\hat\Box$} \fbox{$\tilde\Box$} \]
\begin{align*}
\Box &= \sum_a \partial^a\partial_a \,, &
\hat\Box &= \sum_a \mathcal{D}^a\mathcal{D}_a
\end{align*}
\end{document}

Result latexsym

Using amssymb instead fixes the issue:

\documentclass{article}
\usepackage{amsmath,amssymb}

\begin{document}
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{.1pt}
\[ \fbox{$\Box$} \fbox{$\hat\Box$} \fbox{$\tilde\Box$} \]
\begin{align*}
\Box &= \sum_a \partial^a\partial_a \,, &
\hat\Box &= \sum_a \mathcal{D}^a\mathcal{D}_a
\end{align*}
\end{document}

Result amssymb