Create a new HTML file (e.g. maths.html) and put the following content in it:
<!DOCTYPE html><script src="https://cdn.jsdelivr.net/npm/texme@0.7.0"></script><textarea> # Euler's Identity In mathematics, **Euler's identity** is the equality $$ e^{i \pi} + 1 = 0. $$ ## Explanation Euler's identity is a special case of Euler's formula from complex analysis, which states that for any real number $ x $, $$ e^{ix} = \cos x + i \sin x. $$
As you can see, only the first line is HTML and it basically loads a Javascript library called TeXMe and creates a textarea.
The remaining text is Markdown (which is a simple text-based markup). For example, in Markdown, # means header level 1, ## means level 2, ** means strong emphasis (aka bold).
The remaining text also contains LaTeX, more specifically mathematical formulas.
Open maths.html in Chrome and marvel at the results :-)
Leave a Reply