Rendering LaTeX on third-party websites?
There are some sites on the web that render LaTeX into some more readable form, such as Wikipedia, some Wordpress blogs, and MathOverflow. They may use images, MathML, jsMath, or something like that.
There are other sites on the web where LaTeX appears inline and is not rendered, such as the arXiv, various math forums, or my email. In fact, it is quite common to see an arXiv paper's abstract with raw LaTeX in it, e.g. this paper.
Is there a plugin available for Firefox, or would it be possible to write one, that renders LaTeX within pages that do not provide a rendering mechanism themselves? (The LaTeX would be enclosed within dollar signs, e.g. $\pi$. See the arXiv link above.)
Some notes:
It may be impossible to render some of the code, because authors often copy-paste code开发者_JAVA百科 directly from their source TeX files, which may contain things like "\cite{foo}" or undefined commands. These should be left alone.
This question is a repost of a question from MathOverflow that was closed for not being related to math. There is one answer there, which is helpful, but perhaps Stack Overflow can provide better answers.
I program a lot, but Javascript is not my specialty, so comments along the lines of "look at this library" are not particularly helpful to me (but may be to others).
There is this Greasemonkey script that detects and renders inline LaTeX as MathML. It works pretty well at what it does.
There is now a solution for Gmail: GmailTeX http://alexeev.org/gmailtex.html written by Valery Alexeev.
精彩评论