# e^i.pi+1=0May 31, 2006 4:15 PM   Subscribe

Most convenient way to insert equations into web pages?

I'd like to add equations to a few web pages, as shown here. The way I do this now is to use Wikipedia's markup language to generate a .png file on a Wikipedia page, then I save the file to my hard drive and call the image in HTML.

I know this can't be how the cool people do it. But I've never used Tex or Latex, and I'm pretty baffled as to which of the many editors would be best. My experience is limited to MS Word. I don't mind learning a new markup language, but the shallower the learning curve, the better.

Any suggestions for generating a good-looking page with good-looking equations?
posted by Mapes to Computers & Internet (11 answers total) 1 user marked this as a favorite

You could use MathML if you can be sure your visitors' browsers support it. This will render MathML into a format of your choice.

Otherwise, I'd simply learn LaTeX, use it to output to eps or pdf and convert from there. The learning curve is pretty shallow, especially if you have a cheat sheet of the mark up to hand.

You can produce an eps with an appropriate bounding box from LaTeX by using the document
\documentclass{article}
\usepackage{pslatex}
\begin{document}
\pagestyle{empty}
$insert your LaTeX here$
\end{document}
and running LaTeX on it, and then
dvips -E output.dvi -o output.eps
posted by edd at 4:24 PM on May 31, 2006

MathML
posted by Mr. Six at 4:25 PM on May 31, 2006

This will convert a TeX equation markup into a png. You say that use wikipedia, so you don't need to learn a new markup language. The equation markup language that wikipedia uses is TeX, so you already know it.
posted by atrazine at 4:41 PM on May 31, 2006

If you're used to the Microsoft Equation Editor, TeXaide has the same interface and will generate TeX equations for you. It's written by the same company that did the Equation Editor for MS.
posted by zsazsa at 5:47 PM on May 31, 2006

There is also MathType for MS Word. It'll save equations as gifs. IIRC, they contain metadata so you can open them back up in MathType and edit them.
posted by nonmyopicdave at 6:04 PM on May 31, 2006

You might also find equation sheet helpful.
posted by scubbadubba at 6:53 PM on May 31, 2006

Jacques Distler seems like the go-to guy on this.
posted by adamrice at 7:14 PM on May 31, 2006

ASCIIMathML is a possibility.

Also, I like the topic very much
posted by rycee at 3:31 AM on June 1, 2006

Best answer: There are two separate solutions for web pages: embedded images or inline code. Images guarantee the presentation, but don't scale or flow as elegantly. Inline code like MathML (best generated, IMHO, by scripts) attempts to render the equations in the browser. Most modern browsers support MathML, although there are variations and some (Mac Firefox) which have a problem with the fonts--particularly printing.

For inline scripting I'd recommend jsMath which plays a bit nicer with Firefox than ASCIIMathML (fewer font problems and prints more consistenly), and it has the advantage of using regular TeX markup, rather than AMM's slightly different one (handy if you want to cut and paste from a TeX document). It *does* benefit from some font install though, so if you're using these on a one-off page for other people it might not be the best choice (I use it on an internal wiki for my research notes).

Images have been covered, I'd just add that if you're on a mac, the LaTeX Equation Editor takes LaTeX input and gives you immediate PDF output that you can then convert.

To answer your learning curve question, AMM is probably the easiest I've seen, but if you want to do more complex things, or generate consistently good-looking equations, you're going to want the flexibility of TeX.

If you change your mind about learning mark-up, get yourself a copy of MathType, the full version of the MS Equation Editor--it's what everyone I know who uses Word makes their equations with.
posted by hugo at 4:25 AM on June 1, 2006

There's also latex2html.
posted by epugachev at 10:11 AM on June 1, 2006

Response by poster: Thanks folks. I looked at all the recommended links. I will experiment with MathML, although the inline scripting looks riskier - one can't guarantee that the user will see the equation as you intend it to look. Thanks atrazine, I didn't realize that I had inadvertently learned some TeX markup! I have installed MiKTeX and TeXnicCenter and am working on learning LaTeX fully.

In the meantime, I am going to stick with rendering equations through Wikipedia and showing the resulting .png files. I've also started to change the .png backgrounds to 192,192,192 (gray) in Paint Shop Pro to match my page background. It's quite easy to do in a batch process, and the results look professional enough to satisfy me.
posted by Mapes at 6:02 PM on June 5, 2006

« Older Free email autoresponder?   |   They can't hear themselves talk! Newer »
This thread is closed to new comments.