[Tex/LaTex] LaTeX is not able to recognize the $\square$ and $\Box$ symbols in article class, don’t know why

math-modesymbols

In the beamer class \square and \Box are working fine but in the article class they don't work. Any idea why? What can be done to make them work, do I need to use some special math symbols package?

Best Answer

The beamer class loads, by default, both amsmath and amssymb (unless these are explicitly disabled with the relevant class options).

The \square and \Box command are indeed provided by amssymb and loading this package would suffice for using them; however, if a document uses those symbols it is likely about mathematics and so amsmath is recommended as well.

Add

\usepackage{amsmath}
\usepackage{amssymb}

to your document preamble.