[Tex/LaTex] \cal gives “Undefined control sequence” error

errorsmath-mode

I've used \cal throughout my document and now when I go to switch the document class the \cal is giving me a "Undefined control sequence." error. Any thoughts on why the document class would make a difference?

Best Answer

You could define \cal by yourself, such as for example the article class does. In the minimal class it's undefined, and this way you can fix it:

\documentclass{minimal}
\makeatletter
\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
\makeatother
\begin{document}
$\cal ABC$
\end{document}

enter image description here