Wednesday, August 09, 2023

MathLive: web component for math input, TeX syntax + MathJSON

CortexJS

<math-field>: works just like <textarea>, but for math.

MathLive is a faithful JavaScript implementation of the TeX layout algorithms,
the gold standard for typesetting of mathematical content.

<math-field >
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
</math-field>



CortexJS: MathJSON

MathJSON is a lightweight data interchange format for mathematical notation.

["Divide", "n", ["Add", 1, "n"]]

[["Derivative", 1, ["InverseFunction", "Sin"]], "x"]

[ "Equal", ["Add", ["Exp", ["Multiply", "ImaginaryUnit", "Pi"]], 1], 0 ]