# math rendering on demand and/or offline message composing

In my brief time at math.stackexchange.com I have on several occasions run into a problem with the math renderer slowing to a crawl so that nothing gets displayed anymore and Firefox keeps asking me whether it should stop the rogue script. The renderer seems to restart on even minor edits that do not affect any of the formulas and everything becomes unusable after that. When this happens to me I usually use an external editor to continue composing my answer and paste the end result into the web form only after all is done. My machine works fine for multimedia and a variety of operating systems so that (machine speed) is not where the problem lies. I do understand that JavaScript has its limits and one cannot expect it to be competitive e.g. compared with C. These are my questions: is there an offline edit tool for SE input? The syntax is basically $\LaTeX$ so it should not be hard to convert into valid $\LaTeX$, edit that offline, including previewing it with a DVI viewer, and post the end result? Failing that, can we add a control for the renderer? E.g. turn automatic rendering on change off and let the user trigger the display process when it becomes necessary? As I know e.g. some Perl a list of the differences between proper $\LaTeX$ and SE input would help me write a filter to turn one into the other and back again. Or is that not realistic, i.e. would we need a full parser? Thanks for a wonderful website! I do apologize for perhaps duplicating material that has already been discussed here. Pointers are welcome.

• Thanks for this hint, which helped me find pandoc on the internet. It works like a charm, converting between markdown and $\LaTeX$. So now I can edit large posts in my favorite editor and post that. – Marko Riedel Jan 19 '13 at 0:18