MathJax
MathJax copied to clipboard
footnotesize not recognised as a font size command
Issue Summary
When I try to use the font size command \footnotesize, mathjax does not recognise it.
Steps to Reproduce:
- Write and render a formula, which includes a font size command, e.g.,
a + {\footnotesize b} = {\huge c}renders $a + {\footnotesize b} = {\huge c}$.
The list of standard LaTeX font size commands is:
\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge
All work except \footnotesize.
Well, \footnotesize is not really a math-mode command, which is why it wasn't included. It also varies from one document style to another. The other sizes are based on the standard sizes of the fonts available from the earlier days of TeX (when you needed to run meta font to create bitmapped fonts).
If you want to define \footnotesize, you can do so via the following configuration:
MathJax = {
startup: {
ready() {
const {MapHandler} = MathJax._.input.tex.MapHandler;
const {Macro} = MathJax._.input.tex.Symbol;
const BaseMethods = MathJax._.input.tex.base.BaseMethods.default;
const macros = MapHandler.getMap('macros');
macros.add('footnotesize', new Macro('footnotesize', BaseMethods.SetSize, [.775]));
MathJax.startup.defaultReady();
}
}
};
Here, I've made the size for it be half way between \small and \scriptsize, but you can set that to whatever you want.