46

I am using the package mathptmx to change the text font to Times. However, the mathcal font is changed as well, which is think is a bit ugly.

How can I reset the mathcal font to its default?

1
  • If you just want to change the text fonts, use times package, or use newtxtext as Juri Robl said.
    – Leo Liu
    Aug 20, 2012 at 10:35

3 Answers 3

69

Add the following line to your preamble:

\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
5
  • 2
    Thanks, that does the trick. The advantage of this approach is that only the mathcal alphabet is reset, whereas the others stay as defined by mathptmx
    – Thomas
    Aug 20, 2012 at 10:55
  • 2
    I am using \usepackage{cmbright} which doesn't render any \mathcal glyphs. I was hoping to restore them by adding \DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}, it complains that \mathcal is already defined. Any ideas? Thanks!
    – QuantumDot
    Feb 14, 2016 at 16:15
  • @QuantumDot A simple document calling just \usepackage{cmbright} prints \mathcal{A} as expected. Please, ask a new question with a minimal example.
    – egreg
    Feb 14, 2016 at 16:18
  • For more explanations, also see : Using computer modern \rightarrow with fourier font
    – marsupilam
    Mar 11, 2017 at 19:03
  • Thanks! I want to use fouriernc but for some reason it sets \mathcal to look like what is normally understood as \mathscr. This fixes it (and using the same characters as CM is probably a benefit in terms of being understood correctly).
    – lukeuser
    Jul 13, 2021 at 19:09
3

I restored \boldmath to make sure that bold version is available.

\documentclass{article}

\let\saveboldmath\boldmath
\usepackage{mathptmx}
\let\boldmath\saveboldmath
\usepackage{bm}

\DeclareSymbolFont{cmsymbols}{OMS}{cmsy}{m}{n}
\SetSymbolFont{cmsymbols}{bold}{OMS}{cmsy}{b}{n}
\DeclareSymbolFontAlphabet{\mathcal}{cmsymbols}

\begin{document}

Times $\mathcal{ABCD}$ $\bm{\mathcal{ABCD}}$

\end{document}
2
  • mathptmx has no bold math version; in case bold math is needed, the newtxtext and newtxmath packages should be used.
    – egreg
    Aug 20, 2012 at 10:44
  • Indeed, but cmsy (\mathcal) has bold version. I don't like mathptmx that simply forbid \boldmath.
    – Leo Liu
    Aug 20, 2012 at 10:55
0

You could just use \usepackage{newtxtext} from the newtx package, which loads a Times-like font for the text, but shouldn't change the math fonts.

You must log in to answer this question.

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