Home Powered by MathJax

MISC

by

Gregg Kelly

Free Online Math Resources

Mathematicians

MathJax Subscripts

MathJax is a great tool but I did have one significant issue which required a javascript hack to workaround. The problem is with the layout of subscripts. When layed out normally, subscripts end up with different base lines depending on the presence of descenders, superscripts etc. I assume the reason for this is that TeX/LateX layout is designed for the printed page rather than a large display screen. On the screen subscripts look better if they all have the same baseline. Here is an example before the hack: \begin{equation*} \Large{\Delta_{xy} = \left( \space 256 a_{00}^{5}a_{02}a_{20}a_{22}^{5} - 64a_{00}^{5}a_{02}a_{21}^{2}a_{22}^{4} - \ldots + a_{02}^{2}a_{10}^{2}a_{11}^{4}a_{12}^{2}a_{20}^{2} \space \right)^2} \end{equation*}

After the hack: \begin{equation*} \Large{\Delta_{xy} = \left( \space 256 a_{00}^{5}a_{02}a_{20}a_{22}^{5} - 64a_{00}^{5}a_{02}a_{21}^{2}a_{22}^{4} - \ldots + a_{02}^{2}a_{10}^{2}a_{11}^{4}a_{12}^{2}a_{20}^{2} \space \right)^2} \end{equation*}

Browser Support

These web pages are designed to look good on a large screen. They render nicely on Chrome, FireFox, Edge and Safari v15.0.

Katex

Katex is another great javascript library for rendering TeX in a browser. The choice between using it or MathJax was a close one. In the end it came down to MathJax support for equation environments and numbering outweighing the better rendering speed of Katex.

$\TeX$ Macro's

Below is a list of the custom TeX macro's used in these web pages:

macros: { divides: '\\mid', discrim: '\\Delta', resultant: '\\operatorname{resultant}', crossratio: ['\\mathbf{[\\thinspace} #1 \\mathbf{\\thinspace]}', 1], transvectant: ['\\left<#1\\right>', 1], bigint: '{\\large\\int}', C: '\\mathbb{C}', Z: '\\mathbb{Z}', sn: '\\operatorname{sn}', cn: '\\operatorname{cn}', dn: '\\operatorname{dn}', SL: '\\operatorname{SL}', gcd: '\\operatorname{gcd}', degree: '\\operatorname{deg}', order: '\\operatorname{ord}', rank: '\\operatorname{rank}', det: '\\operatorname{det}', pfaffian: '\\operatorname{pf}', bigO: '\\mathcal{O}', sfrac: ['{\\small \\frac {#1} {#2} }', 2] }