How to load MathJax HTML extension on AnkiDroid?

I’ve been trying to define a MathJax macro for the small caps command \textsc by putting the following on the card template

\(
    \def\textsc#1{ {\style{font-variant-caps: small-caps}{\text{#1} } } }
\)

It works on Anki Desktop but not on AnkiDroid.

Since simple macros like \def\test#1{ {\mathbb #1} } do work on AnkiDroid, I suspect the reason might be that the MathJax html extension (described here) is not loaded.

The docs list the following code to load the extension, but it doesn’t work when I put it in script tags on the card template

window.MathJax = {
  loader: {load: ['[tex]/html']},
  tex: {packages: {'[+]': ['html']}}
};

Is my assumption about the html extension being the reason right?

And if so, any suggestions how I can load it the correctly?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.