2013年3月7日星期四

LaTeX tips: \mathcal get unwanted fonts when using some package

The \mathcal may be get redefined in some packages,
 such as mathptmx / amsfonts , etc, and when use it, the font isn't the default anymore, like this

 
You may want to use those packages because they are very usefull,
but you still want use standard \mathcal such as \mathcal{PT} symmetry.
Well then you can use one of the following commands to reset the \mathcal function.

\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{b}{n}

 Here {b} means bold type, and {m} (maybe) means not bold.
And the default \mathcal is back.