0

I am required to use a .cls that loads the newtxmath package with the libertine option. Because of this (I think), when I type \mathcal{A} my "A" looks different than it normally does. I need to typeset a single normal, non-libertine, old-school \mathcal{A}. A once-off, inline solution that works in a math environment would be ideal. Thanks!

2
  • Does this, in the preamble, help? \DeclareSymbolFontAlphabet{\mathcal} {symbols} \DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n} \SetMathAlphabet{\mathcal}{bold}{OMS}{cmsy}{b}{n}. If you also need the new \mathcal, as well, you can issue \let\svmathcal\mathcal before the above commands, and access the new version with \svmathcal{...}. Sep 26, 2021 at 19:01
  • There is no “regular mathcal”. Font designers are free to adopt the shape they like. The fact that CM Calligraphic is ubiquitous (for the reason that so many LaTeX documents use Computer Modern) isn't a mark for “officiality” of the symbols. By the way, I don't like them so much and try to avoid them if I can. Besides, acmart is specially crafted for the needs of ACM and they won't be so happy to see such changes.
    – egreg
    Sep 26, 2021 at 19:56

2 Answers 2

2

The original \mathcal alphabet is from the cmsy font. You can switch to that inside a \text command from amsmath.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[type1]{libertine}
\usepackage[libertine]{newtxmath}
\usepackage{bm}

\newcommand\varcal[1]{\text{\usefont{OMS}{cmsy}{m}{n}#1}}
\newcommand\varcalA{\varcal{A}}

\begin{document}
\[ A \mathcal{A} \varcal{A} \varcalA
\]
\end{document}

Newtx + Libertine + Computer Modern sample

You could also declare \varcal with \DeclareMathAlphabet, which would have the advantage of working with \boldmath. However, you say you don’t need this, and there is a limit on how many math alphabets legacy 8-bit TeX can use.

If you only need two different script alphabets, you could load one as \mathcal and the other as \mathscr using mathalpha.

3
  • 1
    Brilliant! You saved my life and taught me something new :) Sep 26, 2021 at 19:11
  • The original definition, by the way, is in cmfonts.fdd from the LaTeX kernel.
    – Davislor
    Sep 26, 2021 at 19:27
  • @the_count_1968 Glad I could help!
    – Davislor
    Sep 26, 2021 at 19:28
0

I encountered the same problem as you, and I found it can be solved by using

\usepackage[cal=cm]{mathalfa}
2
  • 2
    Could you please add a MWE of how your solution works?
    – FHZ
    Apr 1, 2022 at 4:30
  • Welcome to TeX.SE!
    – Zarko
    Apr 1, 2022 at 4:31

You must log in to answer this question.

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