KhanAcademy latex markups [closed]

Main question: How KhanAcademy formats latex inside HTML pages?

It means: How can I write \LaTex like code (per example inside the HTML annotation tag below) inside regular HTML pages and it be correctly displayed by browsers. Also how can I extend the latex macros as made below using the \blueE and \redE macros inside the tex-html environment.

Checking the HTML source code from Khan's Academy: Curl in 2 dimensions I came to notice it uses a syntax like:

<semantics> <annotation encoding="application/x-tex"> \begin{aligned} \text{div}\, \blueE{\textbf{F}}\goldE{(x, y)} = \lim_{\left|\redE{A}_{\goldE{(x, y)}}\right| \to 0} \underbrace{ \dfrac{1}{\left|\redE{A}_{\goldE{(x, y)}}\right|} \overbrace{ \oint_{\redE{C}} \blueE{\textbf{F}} \cdot \greenE{\hat{\textbf{n}}}\;\redE{ds} }^{\text{2d-flux through \redE{C}}} }_{\text{Flux per unit area}} \end{aligned} </annotation> </semantics>


I know this isn't a pure \LaTeX question, but also isn't a pure HTML5 or CSS3 question, we are here in the grey areas of multi-disciplinarity and I have really high hopes about the higher level of knowledge of \LaTeX community.

Extra question: Where is that \redE came from? I would love to colorize my math in educational papers.

• I guess that \redE is a predefined color specifier. The LaTeX code is awful. And the question is? – egreg Jun 28 '18 at 14:11
• Is your question mostly about how math-ml (markup language) works? Please advise. – Mico Jun 28 '18 at 14:32
• Might it be that an adjusted (?) version of MathJax is used to show the formulas? – albert Jun 28 '18 at 15:03
• Looking at the page you link to, it seems rather likely that they're using a slightly modified version of MathJax (called KathJax). See mathjax.org – egreg Jun 28 '18 at 15:03