Googling to see the current state of browser support for MathML, I came across MathJax, which looks like a very easy way to support both Latex and MathML in all browsers. It’s a Javascript display engine. If the headers of the page reference the MathJax files, maths in HTML is as simple as writing
<p class="math-type-block">
\[ z = r \,\cos^2(2\phi)\sin(\theta) \]
</p>
Supporting this in Markdown would need either inventing new “maths” brackets or supporting HTML within Markdown. A brief search shows some people implementing MathJax support in Markdown, but it seems to still be technically tricky with as yet no clear, simple, off-the-shelf winning solution.
I haven’t explored just how much of Latex is supported, but that issue aside, I’m convinced that MathJax is the way to go for any web site that needs mathematics on its pages. Turning Latex into image files on the server is better than nothing, but it’s no more than a kludge for want of anything better. MathJax is that better thing. It sets the equations as text, so they automatically harmonise with the surrounding text, and allows you to copy the underlying Latex or MathML from the web page and paste it anywhere else.
Googling to see the current state of browser support for MathML, I came across MathJax, which looks like a very easy way to support both Latex and MathML in all browsers. It’s a Javascript display engine. If the headers of the page reference the MathJax files, maths in HTML is as simple as writing
Supporting this in Markdown would need either inventing new “maths” brackets or supporting HTML within Markdown. A brief search shows some people implementing MathJax support in Markdown, but it seems to still be technically tricky with as yet no clear, simple, off-the-shelf winning solution.
I haven’t explored just how much of Latex is supported, but that issue aside, I’m convinced that MathJax is the way to go for any web site that needs mathematics on its pages. Turning Latex into image files on the server is better than nothing, but it’s no more than a kludge for want of anything better. MathJax is that better thing. It sets the equations as text, so they automatically harmonise with the surrounding text, and allows you to copy the underlying Latex or MathML from the web page and paste it anywhere else.
MathJax can be configured so it matches text delimiters in the HTML, not requiring any markup.