2

Given the MWE

\documentclass{article}

\let\tempcal \mathcal
\usepackage{dutchcal}
\let\dutchcal\mathcal
\let\mathcal\tempcal

\begin{document}
\(\dutchcal H~~~\mathcal H~~~\tempcal H\)
\end{document}

I expected the compiled document to have the latter two H's be in the original \mathcal format, but when I compile all three are the \dutchcal version.

The Desire: I would like to apply standard \mathcal to upper case letters, and use (an appropriately defined) \dutchcal on lower case letters. When I tried the above, the upper case font was overwritten, even though \let was used.

moewe
  • 175,683
John McVey
  • 227
  • 1
  • 7

1 Answers1

1

\let alone is not enough here, because the involved commands have a more complicated internal structure with helper macros, whose definitions would also have to be copied over. Apparently not even \LetLtxMacro (When to use \LetLtxMacro?) is quite enough here.

Luckily, dutchcal.sty is not very long and the relevant bits can be easily copied to your document preamble and modified

\documentclass{article}

\DeclareMathAlphabet{\dutchcal}{U}{dutchcal}{m}{n}
\SetMathAlphabet{\dutchcal}{bold}{U}{dutchcal}{b}{n}
\DeclareMathAlphabet{\dutchbcal} {U}{dutchcal}{b}{n}

\begin{document}
\(\dutchcal{H} \quad \mathcal{H}\)
\end{document}

Two "H"s one in <code>\dutchal</code> and one in <code>\mathcal</code>

moewe
  • 175,683