[Math] How to see LaTeX math on any web page and in email

latexsoft-question

This is a follow up to this closed question.

I open a random page, such as something on arXiv at 8:05 p.m. EST, and I see all these dollar signs, and I sigh and I wish that I could see nicely formatted math formulas instead, just like on MO. Is it possible? Can one write a Greasemonkey script to apply jsMath after the fact even if the page authors did not think of it? A Mozilla Firefox addon?

Please share your solutions. Seeing like this is an active community of people with similar interests, I am sure that hundreds or thousands of mathematicians would benefit from a solution.

Best Answer

The Greasemonkey MathML script written by Steve Cheng and linked to in Scott Morrison's answer worked only partially for me in Firefox on Windows 7: it did not display many \mathbb, \mathcal, and \mathfrak characters because the corresponding Unicode characters were missing in the fonts. Installing additional STIX and Asana Math fonts did not help, in fact it made the display looking worse.

So I rewrote the script (a long and tedious job finding the correct Unicode codes and putting them in the right places). I also added arxiv.org, front.math.ucdavis.edu, MathSciNet, and mail.google.com to the sites supported by default, and added miscellaneous characters and TeX commands missing in the original script.

Yes, it works with gmail (!) if you switch to the basic HTML view. So now you can read an email from your collaborator and see typeset math right there. Now tell me you haven't always wished and prayed for this? I know I have.

Here are the detailed instructions for the method that produces good results using Mozilla Firefox on Windows 7. I haven't tested on other systems, you are welcome to share your experiences in the comments.

  1. Click here to install the Greasemonkey Firefox extension.

  2. Download a modified Greasemonkey script from here and save it to your Desktop.

  3. From the Firefox menu bar, File > Open File, navigate to the downloaded script and open it. Greasemonkey will offer to install it. Do that.

That should be it. Check how it works by looking at some arXiv abstracts such as this, or this.

Even when the authors use custom notations, such as \red or \cE, removing the dollar signs, putting math in a different font, and using sub- and superscripts dramatically increases the readability in my experience.

Edit: I also fixed the displayed formulas with double dollars, which the original script did not handle correctly. So now you can also view this and this.

So in the end this was more of a community service than a question. Enjoy the results!