How do I see LaTeX math on any web page and in email? 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.
 A: 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.


*

*Click here to install the Greasemonkey Firefox extension.

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

*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!
A: Yes, it is clearly possible to write a GreaseMonkey script that loads the jsMath library, then calls the appropriate code.
In fact, you can easily look up the appropriate function call to re-render a page using jsMath, by inspecting the "(Re)process math" element on this page. For your convenience:
<a onclick="jsMath.ConvertTeX();jsMath.Process(document);">(Re)process math</a>

You might also look at this description of building a GreaseMonkey script that loads an external library. It seems sufficiently complicated (waiting to ensure the library has loaded before calling it) that I'm not interested in the details.
A: Here's a solution that is easy and doesn't require you to install Greasemonkey (in particular, you can use it with Chrome), but is quite crufty. Visit a page with math on it (like this arXiv abstract), paste the following into the location bar of your browser and hit enter:
javascript:var e=document.createElement("script");e.type="text/javascript";e.src="http://www.mathjax.org/MathJax/MathJax.js";document.getElementsByTagName('head')[0].appendChild(e);setTimeout(function(){MathJax.Hub.Config({config:["MMLorHTML.js"],extensions:["tex2jax.js","TeX/noErrors.js"],tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},jax: ["input/TeX"],MMLorHTML:{prefer:"MML"}});MathJax.Extension.tex2jax.PreProcess(document);MathJax.Hub.Process(document);},300);void(0);

If that worked, create a new bookmark in your browser with the above line as the "location". When you come to a page where you want to process the math, just click on the bookmark.
Edit(VA): Please consider installing MathJax locally. You don't want to cost the MathJax organization bandwidth. And with a local installation, you are fully in control, and can configure MathJax in a local configuration file. In that case, you can use a shorter bookmarklet (replace 'localhost' by your server): 
  javascript:
  var e=document.createElement("script");
  e.type="text/javascript";
  e.src="http://localhost/MathJax/MathJax.js";
  document.getElementsByTagName('head')[0].appendChild(e);
  setTimeout(function(){
      MathJax.Extension.tex2jax.PreProcess(document);
      MathJax.Hub.Process(document);
    },200);
  void(0);


How it works
The basic idea is to load MathJax from mathjax.org like this:
var e  = document.createElement("script");
e.type = "text/javascript";
e.src  = "http://www.mathjax.org/MathJax/MathJax.js";
document.getElementsByTagName("head")[0].appendChild(e);

Then you set up MathJax and process the page like this:
MathJax.Hub.Config({
    config:["MMLorHTML.js"],
    extensions:["tex2jax.js","TeX/noErrors.js"],
    tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},
    jax: ["input/TeX"],
    MMLorHTML:{prefer:"MML"}
});
MathJax.Extension.tex2jax.PreProcess(document);
MathJax.Hub.Process(document);

This solution simply runs all this together on one line and tells the browser to execute it. MathJax loads asynchronously, so javascript will try to execute the second step before MathJax finishes loading. To avoid this, I've inserted a small (0.1 sec) pause after the first step to give MathJax a chance to load. This works well for me, but you may have to tweak this number ... it's at the very end of the line (in milliseconds).
Issues


*

*As with VA's solution, this doesn't seem to work with the standard view in Gmail.

*Mathjax.org may not be happy with people loading the script from them to view random web pages.

*For me, this works in Chrome, but leaves the page in Firefox (javascript must be overwriting the contents of the page).  Does anybody know how to fix that? If yes, please edit this answer (it's CW). Edit (VA): I increased the timeout to 0.3 sec and added 'void();' at the end. In my tests, it now works in Chrome, Firefox, Internet Explorer, and Opera.


MathML
If your browser supports MathML, this solution should produce MathML output, but I haven't tested this yet (because it doesn't work in Firefox for me). If you can get MathML output, please leave a comment saying so. If you had to do something special, please edit this answer (it's CW).
Edit(VA): I believe the only browsers supporting MathML now are Firefox and IE with MathPlayer installed. Using the default output (HTML-CSS) should work very well if you have installed MathJax fonts on your machine. Or you can wait until the official STIX fonts come out (it has been 13 years of delays but maybe they are really coming out on May 17?) and install those. 
Also, noErrors.js and noUndefined.js are not currently part of the standard MathJax distribution. But they can be obtained from the recent builds as explained in the other answer.
A: I wrote a little program called GmailTeX which adds $\TeX$ capability to Gmail. You can get it here. 

GmailTeX now includes the "live" fully automatic mode, just like when you type a question / answer on MO. (Actually, faster than the current MO math preview.)
Added 9/1/2010: Thanks to Kristi Tsukida, it is now available as a Google Chrome
extension, for easy installation.
A: By now, I am aware of three ways to accomplish this:


*

*MathJax.

*display-latex2 described in the other answer (written by Steve Cheng, to which I made some modifications).

*ASCIIMathML, written by Peter Jipsen.


I think the best choice by far is to use MathJax, an active project with a very professional development team. It is free, open source, and it is backed by the American Mathematical Society, the American Physical Society, and SIAM, among others. That is the way to go, if you are able to install it on your server.
(In the previous version of this answer, I mentioned several problems. They were very promptly resolved by the developers, who are truly impressive, and whom I can not praise enough.)
I wrote a very simple Greasemonkey script which allows you to use your local installation of MathJax on any web page, and in Gmail (in "basic HTML" and "print" views).
The same web page also contains a Greasemonkey script allowing you to pick and choose between the three locally installed math engines.
In the long run, the best way would be for arXiv, MathSciNet, and Gmail to use MathJax on their servers. I made a Gmail Lab request for this. If more people support it, maybe they will do it, that would be great. 

Here are detailed instructions. I am hesitant to bump this question too often. So for minor edits I will update this web site instead.

 Installation instructions 
This solution assumes that you have access to a web server and can install Javascript programs on it. 
First, download and install MathJax and MathJax web fonts. Install MathJax on your web server. Install the MathJax fonts from the MathJax-webfonts(-beta2)/fonts/HTML-CSS/TeX/otf directory.
The customization is done by editing the file MathJax/config/MathJax.js. You need to set
webFont: null,

so that MathJax uses your locally installed MathJax TeX fonts. Next, download mathjaxthispage.user.js and save it to your Desktop. The script assumes that your MathJax installation resides in http://localhost/MathJax. If it is different, edit the script accordingly. From the Firefox menu bar, File > Open File, navigate to the downloaded script and open it. Greasemonkey will offer to install; do that. Start surfing.
 Muting the TeX errors (optional) 
The following settings make for a more pleasant viewing experience when browsing the pages with non-standard TeX macros, for example arXiv.org.

extensions: ["tex2jax.js", "TeX/noErrors.js", "TeX/noUndefined.js"], 

and inside the TeX block, the following code

TeX: { 
       noErrors: {
           inlineDelimiters: ["",""],  
               multiLine: false,            
               style: {
               "font-family": "serif",
                   "font-size":   "120%",
                   "color":       "gray",
                   "border":      ""
                   }
       },

       noUndefined: {
           attributes: {
               mathcolor: "red",
                   mathbackground: "#FFEEEE",
                   mathsize: "100%"
                   }
       }, 

// The rest follows...

If you don't have the extensions noErrors.js and noUndefined.js in your MathJax/extensions directory, you can get them from a more recent build available at https://sourceforge.net/projects/mathjax/develop
 Using the native MathMML output (optional) 
With Mozilla Firefox, you have an option of using the native MathMML instead of HTML-CSS output, which is faster. For this, you will need to set the following in MathJax/config/MathJax.js :

jax: ["input/TeX","output/NativeMML"],

Next, add the following to your userContent.css file (see Customizing Mozilla):

math { font-size: 112% }
  [mathvariant="double-struck"] {font-family: MathJax_AMS; }
  [mathvariant="script"] {font-family: MathJax_Script; }
  [mathvariant="fraktur"] {font-family: MathJax_Fraktur;}
  [mathvariant="-tex-caligraphic"] {font-family: MathJax_Caligraphic; }
  [mathvariant="bold-script"] {font-family: MathJax_Script; font-weight: bold;}
  [mathvariant="bold-fraktur"] {font-family: MathJax_Fraktur; font-weight: bold;}
  [mathvariant="monospace"]{font-family: monospace} 

The first line controls the magnification of math output, and you can change it to your liking. The other lines are needed to fix a bug with Mozilla's display (otherwise, Mozilla does not display MathML correctly).
For font consistency, you could also type 'about:config'  (without the quotes) in the location bar, and change the variable font.mathfont-family to

MathJax_Main, MathJax_Math, MathJax_Size1, MathJax_Size2, MathJax_Size3, MathJax_Typewritter, MathJax_AMS, MathJax_Caligraphic, MathJax_Fraktur, MathJax_SansSerif

A: Recently I have found the following extension with the help of which it is possible to send email with MathJaX equations (however I am not sure whether to read the sent emails if the receiver also needs to add the extensions). The extension is,
 TeX all the things.
