I want to make use of math fonts of mathcal namely: "pxtx" and "dutchcal" which is elaborated in this nice answer. However, I don't want to change the standard mathcal font but just use locally these fonts. How can I do that?
Some additional info. due to @Mico:
1) I use amsfont package. The F in the figure below is in the standard standard mathcal font:
2) document class: IEEEtran
3) pdfLaTeX
4) I use \mathbb
Best Answer
I’m not sure I understand your question properly. If you need to use two different calligraphic alphabets in the same document, the easiest way to accomplish this is to load one as
\mathcal
and the other as\mathscr
inmathalpha
. (On older installations, you might need to use its older name,mathalfa
.)However, I’m not sure whether you meant that you need to use three very-similar calligraphic alphabets in the same document. (Unless it’s a specimen of different math scripts, I can’t imagine why.)
In that case, use
\DeclareMathAlphabet
with the proper family and encoding names. I adapted the code inmathalpha.sty
:If one of your packages is changing
\mathcal
and you need to restore it, see this question. You can also save the original definition of\mathcal
with\let
and\renewcommand\mathcal
.Be aware that legacy LaTeX only allows you to declare a limited number of math alphabets. One way to work around this is to load a script font as a text font (for example, a Fraktur font from
oldgerm
) and use it in math mode by wrapping it in\text
fromamsmath
.In the modern toolchain with
unicode-math
, you can use\setmathfontface
to create as many new math alphabets as you want. You can also\setmathfont[range=cal, Scale=MatchUppercase]{Some Font}
and\setmathfont[range=scr, Scale=MatchUppercase]{Another Font}
to load a new script alphabet. Indeed, if you don’t do one or the other, they’ll be set to the same face by default.