math-tex

math-tex is a web component for mathematical typesetting using TeX notation. It is written for browsers that fully support the web components stack, and falls back to a <code> element that displays the TeX source code for the formula in older browsers. The typesetting itself is handled by the excellent \KaTeX library.

For more information, see the math-tex repository on GitHub.

Some quick examples

Example 1

<p>
The equation for sample standard deviation is
<code is="math-tex">
s = \sqrt{\frac{1}{N-1} \sum_{i=1}^N (x_i - \overline{x})^2}
</code>.
</p>

The equation for sample standard deviation is s = \sqrt{\frac{1}{N-1} \sum_{i=1}^N (x_i - \overline{x})^2}.

Example 2

<p>
What is
<code is="math-tex">f(x) = \frac{x}{x-1}</code>
for
<code is="math-tex">x = 1</code>?
</p>

What is f(x) = \frac{x}{x-1} for x = 1?