Note. This is the original version of LaTeXMathML. A more recent and greatly extended version is available from Jeff Knisley here. There is also a port of LaTeXMathML into perl by Peter Williams here. See also the Acknowledgement and Warning below.
Here is an easy way for mathematicians who are familiar with LaTeX to get mathematics into HTML web pages.<script type="text/javascript" src="https://www.maths.nottingham.ac.uk/plp/pmadw/LaTeXMathML.js"> </script>between <head> and </head> in your HTML file (before or after the <title>).
Acknowledgement.
This JavaScript program has been created by modifying Peter Jipsen's
ASCIIMathML.js script.
He deserves full credit for the original implementation;
any bugs have probably been introduced by me.
Warning.
I am not now maintaining this program.
I retired at the end of 2007, and I do not know how long
this web site will continue to exist—I hope it will
remain for a long time, but that may not be within my control.
Alternative (and more developed) versions of
LaTeXMathML will hopefully continue to be available from within
Peter Jipsen's
ASCIIMathML and from the web sites mentioned in the
Note above.
<blockquote>\$\displaystyle{ ... }\$</blockquote>Unlike in LaTeX, \displaystyle and \texstyle behave as functions acting on what immediately follows them, and so if you want the whole equation set in display-style, then the braces are necessary. (If you use \displaystyle{ or \texstyle{ in an array entry, make sure that the closing } is inside the same array entry.)
<blockquote>\$\begin{eqnarray} ... \end{eqnarray}\$</blockquote>Note that, unlike in LaTeX, dollars are needed here: the command \begin{eqnarray} is only recognized once the equation has already started. As in LaTeX, eqnarrays are set in display-style by default.
Spaces: $\qquad$ | \! | −3/18em | $\textrm{|} \! \textrm{|}\qquad$ | (often apparently ignored) |
nothing, 0em$\quad$ | $\textrm{|} \textrm{|}$ | |||
\, | 3/18em | $\textrm{|} \, \textrm{|}$ | ||
\> or \:$\qquad$ | 4/18em | $\textrm{|} \: \textrm{|}$ | ||
\; | 5/18em | $\textrm{|} \; \textrm{|}$ | ||
~ | 1/3em | $\textrm{|} ~ \textrm{|}$ | ||
\quad | 1em | $\textrm{|} \quad \textrm{|}$ | ||
\qquad | 2em | $\textrm{|} \qquad \textrm{|}$ |
Diacritical marks:$\qquad$ | \acute, \grave, \breve, \check | $\acute a \acute W ~ \grave a \grave W ~ \breve a \breve W ~ \check a \check W$ |
\dot, \dotdot, \mathring | $\dot a \dot W ~ \ddot a \ddot W ~ \mathring a \mathring W$ | |
\hat, \widehat, \tilde, \widetilde | $\hat a \hat W ~ \widehat a \widehat W ~ \tilde a \tilde W ~ \widetilde a \widetilde W$ | |
\vec, \overrightarrow, \overleftarrow$\qquad$ | $\vec a \vec W ~ \overrightarrow a \overrightarrow W ~ \overleftarrow a \overleftarrow W$ | |
\bar, \overline, \underline | $\bar a \bar W ~ \overline a \overline W ~ \underline a \underline W$ | |
\overbrace{...}^{26} | $\overbrace{a+b+\cdots+z}^{26}$ | |
\underbrace{...}_{26} | $\underbrace{a+b+\cdots+z}_{26}$ |
List of characters not included above (Characters that are not available have been replaced by the nearest available alternative) Binary Relations $\lt$ \lt $\gt$ \gt $\ne$ \neq or \ne $\le$ \leq or \le $\ge$ \geq or \ge $\equiv$ \equiv $\leqslant$ \leqslant $\geqslant$ \geqslant $:=$ := $\ll$ \ll $\gg$ \gg $\doteq$ \doteq $\prec$ \prec $\succ$ \succ $\sim$ \sim $\preceq$ \preceq $\succeq$ \succeq $\simeq$ \simeq $\subset$ \subset $\supset$ \supset $\approx$ \approx $\subseteq$ \subseteq $\supseteq$ \supseteq $\cong$ \cong $\sqsubset$ \sqsubset $\sqsupset$ \sqsupset $\Join$ \Join $\sqsubseteq$ \sqsubseteq $\sqsupseteq$ \sqsupseteq $\bowtie$ \bowtie $\in$ \in $\ni$ \ni, \owns $\notin$ \notin $\vdash$ \vdash $\dashv$ \dashv $\models$ \models $\mid \mid $\parallel$ \parallel $\perp$ \perp $\smile \smile $\frown$ \frown $\asymp$ \asymp $\propto$ \propto Binary Operators $\pm$ \pm $\mp$ \mp $\triangleleft$ \triangleleft $\times$ \times $\div$ \div $\triangleright$ \triangleright $\cdot$ \cdot $\setminus$ \setminus $\star$ \star $\cup$ \cup $\cap$ \cap $\ast$ \ast $\sqcup$ \sqcup $\sqcap$ \sqcap $\circ$ \circ $\vee$ \vee, \lor $\wedge$ \wedge, \land $\bullet$ \bullet $\oplus$ \oplus $\ominus$ \ominus $\diamond$ \diamond $\odot$ \odot $\oslash$ \oslash $\uplus$ \uplus $\otimes$ \otimes $\bigcirc$ \bigcirc $\amalg$ \amalg $\bigtriangleup$ \bigtriangleup $\bigtriangledown$ \bigtriangledown $\dagger$ \dag or \dagger $\lhd$ \lhd $\rhd$ \rhd $\ddagger$ \ddag or \ddagger $\unlhd$ \unlhd $\unrhd$ \unrhd $\wr$ \wr BIG Operators $\sum$ \sum $\prod$ \prod $\bigoplus$ \bigoplus $\bigcup$ \bigcup $\bigcap$ \bigcap $\bigotimes$ \bigotimes $\bigvee$ \bigvee $\bigwedge$ \bigwedge $\bigodot$ \bigodot $\int$ \int $\oint$ \oint $\biguplus$ \biguplus $\bigsqcup$ \bigsqcup $\bigsqcap$ \bigsqcap $\coprod$ \coprod Arrows $\gets$ \leftarrow or \gets $\longleftarrow$ \longleftarrow $\uparrow$ \uparrow $\to$ \rightarrow or \to $\longrightarrow$ \longrightarrow $\downarrow$ \downarrow $\leftrightarrow$ \leftrightarrow $\longleftrightarrow$ \longleftrightarrow $\updownarrow$ \updownarrow $\Leftarrow$ \Leftarrow $\Longleftarrow$ \Longleftarrow $\Uparrow$ \Uparrow $\Rightarrow$ \Rightarrow $\Longrightarrow$ \Longrightarrow $\Downarrow$ \Downarrow $\Leftrightarrow$ \Leftrightarrow $\Longleftrightarrow$ \Longleftrightarrow $\Updownarrow$ \Updownarrow $\mapsto$ \mapsto $\longmapsto$ \longmapsto $\iff$ \iff (bigger spaces) Miscellaneous Symbols $\ldots$ \ldots $\cdots$ \cdots $\forall$ \forall $\vdots$ \vdots $\ddots$ \ddots $\exists$ \exists $\Re$ \Re $\Im$ \Im $\aleph$ \aleph $\hbar$ \hbar $\ell$ \ell $\wp$ \wp $\emptyset$ \emptyset $\infty$ \infty $\surd$ \surd $\partial$ \partial $\nabla$ \nabla $\triangle$ \triangle $\square$ \square $\diamond$ \diamond $\Box$ \Box $\Diamond$ \Diamond $\bot$ \bot $\top$ \top $\angle$ \angle $\neg$ \neg or \lnot $\therefore$ \therefore