Live data from Hacker News

MathJax, beautiful math in all browsers

mathjax.org

21–30 of 37 posts

Re: MathJax, beautiful math in all browsers

#22
post #19

I use MathJax on one site I'm developing. It has two problems related to speed: 1. It is so modular that you cannot really optimize it using something like Google Closure ( http://code.google.com/closure/ ). If you do, it breaks it. 2. The modularity means that you're likely to need a few roundtrips to the server to get everything. Invariably these block the loading of the page and you get a hang, sometimes for a few…

However, when you see the MathML rendering of Firefox, you immediately see why something like MathJax is still _required_. We would need widespread support for MathML rendering that is actually readable. That will take another while.

What's wrong with Firefox's MathML rendering? The MathJax MathML example looks fine with Firefox 4 on Windows 7 (it seems to be using Cambria Math to render symbols).

Re: MathJax, beautiful math in all browsers

#23
post #6

Sometimes, when the ol' fever comes back and nobody's there to remind me that we have come to accept HTML/CSS, I dream of a world wide web built on TeX and TeX alone. It's a place of wonder, and happiness, and river-less paragraphs. Then I wake up, sweating, screaming, to a world without proper hyphenation. XeTeX is my XaNaX. Makes the web-pain go away. [MathJax, on the other hand, looks glorious. Many thanks to the…

If you're bothered by rivers and lack of hyphenation, check out a project I worked on a while ago, which implements the Knuth and Plass line breaking algorithm in JavaScript. Combined with Hyphenator.js, the results are nearly indistinguishable from TeX output. http://www.bramstein.com/projects/typeset/flatland/ Earlier incarnations made it to HN before, but unlike the old version this renders in plain HTML instead o…

This plus the typeset library, I do wonder when will we have an online/ebook of TAOCP?

Re: MathJax, beautiful math in all browsers

#24

I use MathJax on one site I'm developing. It has two problems related to speed: 1. It is so modular that you cannot really optimize it using something like Google Closure ( http://code.google.com/closure/ ). If you do, it breaks it. 2. The modularity means that you're likely to need a few roundtrips to the server to get everything. Invariably these block the loading of the page and you get a hang, sometimes for a few…

Even if browsers would support MathML, humans like to write LaTeX, so MathJax is still useful to convert from LaTeX to MathML.

Re: MathJax, beautiful math in all browsers

#25

Earlier quoted context omitted.

If you're bothered by rivers and lack of hyphenation, check out a project I worked on a while ago, which implements the Knuth and Plass line breaking algorithm in JavaScript. Combined with Hyphenator.js, the results are nearly indistinguishable from TeX output. http://www.bramstein.com/projects/typeset/flatland/ Earlier incarnations made it to HN before, but unlike the old version this renders in plain HTML instead o…

I cannot upvote you enough. I wonder if I can hack this onto my wordpress blog.

You probably could get it working, but the implementation isn't (yet) capable of dealing with arbitrary HTML. It only expects paragraphs and images. This is only a matter of implementation though, the core algorithm should be able to deal with most of the content found on websites.

I'm talking to Filipe Fortes of Treesaver about implementing it as part of his Treesaver technology (demo: http://treesaver.publicintegrity.org/smoke_screen) Perhaps a general implementation will roll out of that.

Re: MathJax, beautiful math in all browsers

#27
Firefox 4 on Linux gives a message at the bottom saying something like "WebFonts not supported, falling back to image fonts", meaning that the scaling examples look horrible and most examples are very fuzzy. Shame, looks neat otherwise :)

Re: MathJax, beautiful math in all browsers

#29
post #19

I use MathJax on one site I'm developing. It has two problems related to speed: 1. It is so modular that you cannot really optimize it using something like Google Closure ( http://code.google.com/closure/ ). If you do, it breaks it. 2. The modularity means that you're likely to need a few roundtrips to the server to get everything. Invariably these block the loading of the page and you get a hang, sometimes for a few…

However, when you see the MathML rendering of Firefox, you immediately see why something like MathJax is still _required_. We would need widespread support for MathML rendering that is actually readable. That will take another while.

The appearance of MathML sadly depends on native fonts installed. If your user has STIX or Computer Modern fonts installed then MathML looks very readable compared to say Mathematica's typesetting.
Post reply on HN