TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

MathJax, beautiful math in all browsers

318 pointsby scwover 14 years ago

19 comments

pierrefarover 14 years ago
I use MathJax on one site I'm developing. It has two problems related to speed:<p>1. It is so modular that you cannot really optimize it using something like Google Closure (<a href="http://code.google.com/closure/" rel="nofollow">http://code.google.com/closure/</a> ). If you do, it breaks it.<p>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 seconds. This is not good for user experience.<p>Of course MathJax solves a very important problem, but it's a problem browsers have introduced. None of the support MathML in a sane way: Firefox requires content served as fully valid XHTML (good luck with that if you're using a CMS) and Webkit only got MathML support recently in the nightly releases. If browsers actually implement MathML in a way developers can use without losing hair, then MathJax is no longer needed. Till then, I love MathJax despite its warts.
评论 #1974825 未加载
评论 #1975054 未加载
评论 #1974957 未加载
aplover 14 years ago
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.<p>[MathJax, on the other hand, looks glorious. Many thanks to the people in charge of the project!]
评论 #1974781 未加载
perlgeekover 14 years ago
Very nice, I'm looking forward to usinig it. So I thought I'd check the license to see if it's compatible with what I envision.<p>The documentation page just says "Open Source", the FAQ and download pages nothing at all.<p>The release announcement at <a href="http://www.mathjax.org/2010/01/12/news/mathjax-beta-released/" rel="nofollow">http://www.mathjax.org/2010/01/12/news/mathjax-beta-released...</a> finally says "Apache 2.0 open source license".<p>Note to other developers: don't hide your license -- it's a piece of information others might actually be interested in, particularly if it's not an application, but more of a library.
评论 #1974765 未加载
mojomboover 14 years ago
We use MathJax for inline display of equations in the GitHub wikis and it's really nice. I spent a long time looking for a LaTeX style math solution for the web, and MathJax was a great fit.
mhartlover 14 years ago
MathJax is the secret sauce behind the pretty math typesetting at <i>The Tau Manifesto</i> (<a href="http://tauday.com/" rel="nofollow">http://tauday.com/</a>). For what it's worth, Davide Cervone, the lead developer of MathJax, is incredibly helpful and friendly. In the process of writing <i>The Tau Manifesto</i>, I was running into some weird problems; Davide realized that there was a subtle MathJax bug when used with HTML5, and pushed a fix within hours of finding the problem.
danparsonsonover 14 years ago
Looks nice! Minor issue with spacing in my browser: <a href="http://img202.imageshack.us/img202/6766/spacingissue.png" rel="nofollow">http://img202.imageshack.us/img202/6766/spacingissue.png</a><p>Source of the top equation is: J_\alpha(x) = \sum_{m=0}^\infty \frac{(-1)^m}{m! \, \Gamma(m + \alpha + 1)}{\left({\frac{x}{2}}\right)}^{2 m + \alpha}<p>Source of the bottom equation is:<p>&#60;math display="block"&#62; &#60;mrow&#62; &#60;msup&#62; &#60;mi&#62;c&#60;/mi&#62; &#60;mn&#62;2&#60;/mn&#62; &#60;/msup&#62; &#60;mo&#62;=&#60;/mo&#62; &#60;msup&#62; &#60;mi&#62;a&#60;/mi&#62; &#60;mn&#62;2&#60;/mn&#62; &#60;/msup&#62; &#60;mo&#62;+&#60;/mo&#62; &#60;msup&#62; &#60;mi&#62;b&#60;/mi&#62; &#60;mn&#62;2&#60;/mn&#62; &#60;/msup&#62; &#60;mo&#62;−&#60;/mo&#62;&#60;mn&#62;2&#60;/mn&#62;&#60;mi&#62;a&#60;/mi&#62;&#60;mi&#62;b&#60;/mi&#62; &#60;mrow&#62;&#60;mo&#62;cos&#60;/mo&#62;&#60;mi&#62;θ&#60;/mi&#62;&#60;/mrow&#62;&#60;/mrow&#62;<p><pre><code> &#60;/math&#62; </code></pre> Browser is Chrome 8.0.552.215 on Windows 7 Ultimate 64-Bit
评论 #1976643 未加载
评论 #1976448 未加载
splatover 14 years ago
I can't wait for this to be incorporated on the arXiv.
prodigal_erikover 14 years ago
Right now this works for some people and not others, because they aren't doing progressive enhancement over a server-side fallback rendering. The TeX samples just show raw \macros and the HTML-CSS renderings of the MathML samples are incorrect (x=−b±b2−4ac2a is not the quadratic formula).<p>Looks nice on the machine I use as a js sandbox, though.
xtacyover 14 years ago
Wikipedia has LaTeX code in the ALT attribute for all images on their website. Would it make sense for them to migrate?
zootmover 14 years ago
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 :)
gradschoolover 14 years ago
I'd like to port a large LaTeX document to a web browsable format but it makes heavy use of pstricks and picture environments. Can anyone comment on how well this would cope with that or what alternatives might help?
评论 #1976244 未加载
Jachover 14 years ago
I've been using jsMath for a while, I'm glad these sorts of libraries exist. It chips at my heart a little every time I see ascii sigmas and the like.
julesover 14 years ago
Looks ugly here. The letters are overlapping.<p><a href="http://dl.dropbox.com/u/388822/mathjax.png" rel="nofollow">http://dl.dropbox.com/u/388822/mathjax.png</a><p>Chrome 7.0.517.44
sammyoover 14 years ago
In all <i>recent</i> browsers. For silly corporate reasons one box I work on is stuck at firefox 1.5 and this displays nothing.
评论 #1975851 未加载
hsmyersover 14 years ago
Worthy of an 'atta-boy' from Knuth himself...
xtacyover 14 years ago
It would be awesome if someone could make an extension for browsers to enable this on browser chats/emails. :-)
ChristianMarksover 14 years ago
This could use an extension for xypic. It would trounce the alternatives if this were added.
Muzzaover 14 years ago
All well and good except for the fact that it locks up my entire computer for several seconds.
jarsjover 14 years ago
Doesn't work as i expect in my browser.
评论 #1974730 未加载