# MathML and LaTeX users rejoiceMarch 14, 2011 8:28 AM   Subscribe

"MathJax is an open source JavaScript display engine for mathematics that works in all modern browsers." Displaying math and equations in web pages has been a pretty consistent problem. MathJax allows you to use either MathML or TeX/LaTeX as input and then formats it into beautiful, scalable HTML.
posted by Deathalicious (24 comments total) 59 users marked this as a favorite

As seen on math.stackexchange.com and MathOverflow. (Note: don't ask your homework questions at MathOverflow.)
posted by sonic meat machine at 8:38 AM on March 14, 2011 [2 favorites]

This is beautiful! Ive been meaning to start a math based website and this looks perfect for the task.
posted by kuatto at 8:42 AM on March 14, 2011

Slick
posted by JoeXIII007 at 8:46 AM on March 14, 2011

Will integrate again soon. A++++
posted by special-k at 8:50 AM on March 14, 2011

Neat. I have no use for it right now but it looks way better than using Latex2HTML which I ended up having to use in the past.
posted by octothorpe at 9:02 AM on March 14, 2011

This is hugely impressive. I started diving in the docs to learn about the backend renderer. There isn't one. It's really HTML, no images. Lots of clever CSS and well chosen fonts. If someone asked, I would have said it was impossible, particularly the font loading part. Parsing TeX to the point you can define macros is a pretty neat trick, too.

One lovely aspect of this is the TeX or MathML source is right in the HTML document, so years from now someone can still get the formulas out of the document even if the rendering apparatus stops working.

If for some reason this awesomeness doesn't work for you, Google Charts API also has the ability to render TeX to images fairly easily.
posted by Nelson at 9:18 AM on March 14, 2011 [2 favorites]

Thanks for this... it's totally awesome!
posted by math at 9:31 AM on March 14, 2011

The context menu override is a nice touch.
posted by device55 at 9:38 AM on March 14, 2011 [2 favorites]

Awsomesauce. I really, really hope this become ubiquitous.

Now do ones for chemistry and music!
posted by bonehead at 9:40 AM on March 14, 2011

The context menu override is a nice touch.

A thousand times this. The fact that webapps almost never make use of the context menu is a constant source of frustration.
posted by schmod at 9:47 AM on March 14, 2011

I blog about math and never put in TeX, even though the WordPress engine does a reasonably good job at it. For me, a blog is an informal means of communication, like e-mail; when I write someone e-mail about math, it's in plain text, and when I blog, it's the same. Loads fast, easy to read. I actually find the use of MathJax on Math Overflow slightly annoying, since I have to sit and wait for it all to render instead of reading math.

Of course, the story is different if you're going for a more formal feel.
posted by escabeche at 9:47 AM on March 14, 2011

Wow, this is impressive. I've always seen beautiful latex mashed by places like PLoS and pubmedcentral when generating html. This would be so much better for e-journals. My question right now is how it works out for e-readers.
posted by a robot made out of meat at 9:48 AM on March 14, 2011

I was just trying to solve this problem. Have been using reddit's TeX plugin and the sup tag for exponents.
posted by Obscure Reference at 9:52 AM on March 14, 2011

This was really easy to setup on one of my domains, so win!
posted by oonh at 9:53 AM on March 14, 2011

Oooooh. Pretty! When I get time I'll have to have a better look at it, but- pretty!
posted by BungaDunga at 10:03 AM on March 14, 2011

escabeche: I find mathoverflow's use of MathJax annoying only when I'm looking at it on my phone.

I probably shouldn't be looking at mathoverflow on my phone, though. The iPhone keyboard is not exactly optimized for writing mathematics.
posted by madcaptenor at 10:22 AM on March 14, 2011

I find ASCII math basically unreadable. It's super hard to tell a numerator from a denominator, where parens end, etc. I usually have to copy down to paper in a more readable format.

Unless they've gone to a lot of trouble to make it readable, but at that point why not just use something like MathJax?
posted by DU at 10:33 AM on March 14, 2011

The fact that webapps almost never make use of the context menu is a constant source of frustration.

That's a bit of a Devil's Bargain though, because UI/IX/ID/PDQ has said for a while, and I think rightfully so, "Don't upset user expectations by taking away what should be part of the browser, not your site." My personal bias is that if you feel like you need a context menu in a web app, you're probably doing it wrong. I don't need access to every possible action on every possible page.

On topic: this looks awesome. I almost wish I had a use for it.
posted by yerfatma at 11:18 AM on March 14, 2011 [1 favorite]

I'm probably overlooking this, but is there a way to display LaTeX markup on the page, unprocessed? Say, if I wanted some example text on a demo page?
posted by steambadger at 11:56 AM on March 14, 2011

I'm probably overlooking this, but is there a way to display LaTeX markup on the page, unprocessed? Say, if I wanted some example text on a demo page?

You can simply omit the delimiters which cause MathJax to process the math – that is, write the LaTeX without \[ or , or use the HTML entity equivalents to represent the characters if you want to display the delimiters.
posted by sonic meat machine at 2:16 PM on March 14, 2011 [1 favorite]

Very cool. Thanks, Deathalicious!
posted by fartknocker at 3:06 PM on March 14, 2011

I worked with some of this group way back in the mid-90's on how to render LaTex in early browsers. It's nice to see that there's such good progress still being made.
posted by michswiss at 3:11 PM on March 14, 2011

MathML is in WebKit nightly builds now and will be natively renderable in Chrome/Safari soon enough. Update on MathML in Firefox. It will also be a native type in the EPUB 3 ebook format.
posted by nev at 10:30 PM on March 14, 2011

This is pretty awesome. It's like he cured HTML diabetes. We could always work around the disease but to have an actual cure is fantastic.
posted by chairface at 12:19 PM on March 16, 2011

« Older "The reason this topic has been so long in coming...   |   Don't wait for Arbor Day! Newer »