If you need to put mathematical expressions on a web page and are familiar with LaTeX mark-up, you may want to use MathJax.
In brief: just put the following lines in the <head> section of the web page:
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
Then in the <body>
, enclose LaTeX math in \( \)
for in-line math or \[ \]
for displayed math. Enclosing inline math with $
isn’t enabled by default but can be enabled if you want. To avoid confusing browsers, use spaces around < and > symbols (or use the \lt
and \gt
macros).
For more information, check out the MathJax site linked above, and in particular http://docs.mathjax.org/en/latest/tex.html.
This should work for any browser that interprets Javascript.
Bob Tennent.
Examples:
The follow are examples of MathJax rendering LaTeX:
(Right-click and select View Frame Source to see how this was generated.)
Your browser does not support iframes. MathJax likely won’t work either.