# Latex math and "show N more comments"

If I click the "show N more comments" link (in any question or answer with more than 5 (?) comments), my Firefox displays the comments without MathJax rendering.

I can easily guess why this happens, but has anyone found a way to show all comments with properly rendered Latex math?

• This would be fixed if we could get a little button that reads "(Re)process math with jsMath" like on MO. Does anyone know how they got that? Sep 12 '10 at 15:37
• Well, I don't really want to reprocess the document with jsMath; instead, I'd like to force MathJax to reprocess the document. Sep 12 '10 at 17:52
• Sorry, I just meant a button that read "Reprocess math." The idea is that one could click on it if math is not processed correctly for some reason. Sep 13 '10 at 0:03
• Should be easy to implement (using the piece of javascript below) if we can add new links to the navigation bar. Sep 13 '10 at 8:36
• What has been provided so far is workarounds, not solutions. That math mode is lost is probably (certainly, imho) a bug. Also, it should be no problem to reprocess the math for one comment thread when it is expanded; the expanding is done with JavaScript, anyway. Add one statement there, done. Who is responsible for the technical aspects here? Nov 10 '10 at 14:50

We have wired up the comment system to the MathJax rendering pipeline.

After some random browsing, online chatting, and trial-and-error (thanks to all for help!), I came up with the following trick that seems to work with Firefox (warning: I don't really know anything about JavaScript or MathJax or Firefox):

• Create a bookmark with the following URL:

javascript:MathJax.Hub.Queue(["Typeset",MathJax.Hub]);undefined


(You might want to add it to your bookmark toolbar or assign a keyword for easier access.)

Now open an article, click "show N more comments", and then activate the above bookmark. MathJax re-processes all math in the comments.

Edit: Fixed; now it should work by design, not by accident. I hope. I'll CW this so that people who actually understand these things can provide a real solution.

• Works like a charm, with Firefox 3.6. Thanks! Sep 12 '10 at 20:42
• Looks like a decent solution to me. For those who care, the first part instructs mathJax to typeset the page, but it queues the action, so it'll take place as soon as MathJax is not busy. (To force MathJax to typeset NOW, use "javascript:MathJax.Hub.Typeset();undefined"). The undefined at the end is a technical thing. Statements in the address bar should evaluate to undefined to stay on the same page. "void 0" also works. Sep 12 '10 at 23:53