2

I need to write up a calculation that requires a lowercase calligraphic b, which I got from the following package:

\usepackage[cal=dutchcal]{mathalfa}

However, now other calligraphic letters which I was using, like $\mathcal{L}$ are in the dutchcal font, which is not what I want. Is there any way to only apply the package to specific sections of the document/equations?

1

1 Answer 1

2

This answer describes how to load the dutchcal fonts without loading the dutchcal package which overrides the default \mathcal macro.

Then, you can save the default \mathcal macro and override it (using \let) only for the desired part of the document. Here is a working example:

\documentclass{article}

% Save the default \mathcal
\let\mathcaldefault\mathcal

% Load the dutchcal font
\DeclareMathAlphabet{\mathdutchcal}{U}{dutchcal}{m}{n}

\begin{document}

% \mathcal and \mathdutchcal should NOT appear the same
$A, \mathdutchcal{A}, \mathcal{A}$

% Override \mathcal for this part
\let\mathcal\mathdutchcal

% \mathcal and \mathdutchcal should appear the same
$A, \mathdutchcal{A}, \mathcal{A}$

% Reset \mathcal to \mathcaldefault
\let\mathcal\mathcaldefault

% \mathcal and \mathdutchcal should NOT appear the same
$A, \mathdutchcal{A}, \mathcal{A}$

\end{document}
2
  • \DeclareMathAlphabet{\mathdutchcal}{U}{dutchcal}{m}{n} does exactly what I needed. Could you explain what the different braces mean?
    – Rossana
    Commented Sep 9, 2019 at 11:50
  • You can read about the \DeclareMathAlphabet macro here. The arguments are: \DeclareMathAlphabet {<math-alph>} {<encoding>} {<family>} {<series>} {<shape>}. So in your case, the encoding is U (unknown), series is m (medium) and shape is n (normal). Note that your font family has to support the series and shape you provide. Commented Sep 9, 2019 at 12:50

You must log in to answer this question.

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