MimeTeX, licensed under the
gpl, parses LaTeX
math expressions, emitting either mime xbitmaps or gif images of them,
which can be used in html documents in the form, e.g.,
<img src="../cgi-bin/mimetex.cgi?f(x)=\int_{-\infty}^xe^{-t^2}dt"
border=0 align=absmiddle>
allowing you to embed math directly in html, reducing the need for
lots of external gif images, and making your html documents more
readable and easily maintained.
You can think of mimeTeX as kind of a lightweight MathML, with somewhat less functionality but also with fewer requirements. MimeTeX's syntax is very TeX-like (though not exactly), requiring only a short learning curve (maybe 30 minutes) for a (La)TeX-aware user to learn the occasional exceptions. And mimeTeX should work with almost any (graphical) browser and server.
This demonstration/tutorial shows some mimeTeX examples, and also tells you how to type in your own expressions to see how they're rendered. The rendering isn't "seamless" with surrounding text, but should be adequate for many purposes. Also, only a subset of TeX math is available, but what is available should, again, be adequate for many purposes.
As a first example, we can display the normal distribution illustrated
above, using exactly the same <img> tag shown, as
.
Or, at a slightly larger font size it looks like
(with arbitrary mean and sigma).
Notice that rendered equations should be antialiased, displaymath (see the integral limits) isn't implemented, etc. These issues, and many more, will be addressed over time.
Several non-MathML solutions besides mimeTeX that also embed TeX-like math into html are discussed in the tex-faq. Two that you might want to look at are textogif and gladTeX. Both require separate setup procedures that use TeX to help generate external gif (or png) images of your equations, which are later included in your html document as it's being rendered.
MimeTeX, as far as I know, is the only such non-MathML package that has its own built-in rendering engine, entirely independent of TeX, and therefore requires no setup procedure or external images whatsoever. It renders realtime, on-the-fly images directly from your LaTeX math embedded in html documents.
MimeTeX's ease of use thus makes your html documents more readable and easily maintained. It's possible that textogif, gladTeX, or other similar tools can be modified to work as easily. Or perhaps mimeTeX's ease-of-use features won't prove compelling. In any case, mimeTeX becomes one more available tool in your toolbox.
To try mimeTeX yourself, enter a url string into your browser
something like
The syntax recognized by mimeTeX is TeX-like, but not always completely compatible. For example, you can write \(\atop{n}{k}\) for binomial coefficients (mimeTeX has no \choose), but not \left({n \atop k}\right) like you'd expect. That is, \left( and \right) are written \( and \) in mimeTeX; ditto for \[\] and \<\> and \{\}, although unescaped {}'s aren't displayed at all (as usual) and escaped \{\}'s are always sized to fit. Also, {n \atop k} is written \atop{n}{k} in mimeTeX (identical to \frac's syntax).
For \right. we write \. so that, e.g., x=\{\atop{this}{that}\. gives you the usual useful construction. You can also use \. to mean \left. (mimeTeX correctly interprets your intention if you correctly balance delimiters). There are no \box's for {this} and {that} yet, but mimeTeX provides the LaTeX-2.09-like command {\rm~if~this~then~that} which renders if~this~then~that in roman and respects spaces between words (the required space after \rm is still ignored). Math spaces \, \: \; also exist. And since typed blank spaces are sometimes illegal in html query strings, you'll notice that we entered, e.g., \alpha~x where needed. That is, use tildes (a ~) where blanks are required (or desired).
\atop{}{} works for two items only. MimeTeX also provides \array{lcr$a&b&c\\d&e&f\\etc} for vectors and matrices, to align equations, etc, all in the usual way. \hline's, \cline's and vertical bars (in the l|c|r sense) are not yet implemented. The precise \array{} syntax is a little more complicated, but the preceding "prototype" should get you started. In addition, \overbrace{}^{}, \underbrace{}_{}, several accents, etc, exist as well. And mimeTeX has various other features, shortcomings, "gotchas" and differences vis-a-vis LaTeX.
In particular, one "gotcha" to be aware of is that, although mimeTeX correctly interprets \frac12 as well as \frac{1}{2}, etc, the legal LaTeX expression x^\frac12 must be written x^{\frac12}. Otherwise, mimeTeX interprets it as {x^\frac}12, i.e., the same way x^\alpha12 would be interpreted, which is entirely wrong for \frac. The same "gotcha" also applies to other combinations of commands, e.g., you must write \sqrt{\frac\alpha\beta}, etc.
The README file supplied with your mimeTeX distribution contains somewhat more detailed information. Or you can just begin playing with mimeTeX for yourself to see if it might have any potential usefulness for you, either now or maybe when more fully developed.
MimeTeX's copyright is registered by me with the US Copyright Office, and I hereby license it to you under the terms and conditions of the GPL. There is no official support of any kind whatsoever, and you use mimeTeX entirely at your own risk, with no guarantee of any kind, in particular with no warranty of merchantability.
By using mimeTeX, you warrant that you have read, understood and agreed to these terms and conditions, and that you are at least 18 years of age and possess the legal right and ability to enter into this agreement and to use mimeTeX in accordance with it.
Hopefully, the law and ethics regarding computer programs will evolve to make this kind of obnoxious banter unnecessary. In the meantime, please forgive me my paranoia.