# TeX processing for Stats

We are evaluating google charts to add TeX support on http://math.stackexchange.com and were interested to know if the stats community at large would be interested in this feature.

Would you much rather see a version of a formula represented as: $X^2$ or just X^2

To test this feature surround a formula with $</code>...<code>$

Update: We have enabled TeX processing via the MathJax library. Hopefully this helps for a lot of the edge cases that were reported in this thread.

Update: You should no longer need a sandbox to test MathJax - just stop typing for around 4 seconds and watch the conversion occur in the preview.

• discussion of this already here at meta.stats.stackexchange.com/questions/5/… Jul 29 '10 at 22:54
• Preview does not seem to be working in Chrome (5.0.375.125) on Windows 7.
Aug 4 '10 at 10:04
• Never mind- it is working now.
Aug 4 '10 at 18:08

One issue that I have encountered is the lack of a preview feature. Mathoverflow has this nice preview feature which can be used to make sure that you do not have errors in your latex markup before you post your answer. I have had to do several edits to my answer before I could even post it properly.

• A workaround for the lack of preview is to use mathoverflow.net and pretend as if you are asking a question. They have live preview and once you are satisfied with what you have copy and paste it here. (Not an ideal solution but at least it helps till we have live preview.)
Aug 1 '10 at 22:58

Reported by Rob Hyndman on this thread: What typographic support is available to support display of statistical formula?

The script is causing problems with R code that includes a dollar sign. e.g., the answer by PaulHurleyuk at What is the best way to identify outliers in multivariate data?

• +1, thats really cumbersome.
– user88
Jul 31 '10 at 18:32
• @Geoff. Thanks for fixing it! Looking much better now. Aug 3 '10 at 2:38

Yes, we like Tex! To overcome the preview problem, maybe a not-live preview feature can be build? It doesn't have to do much, just after a click on the button replace the live preview with a server-generated preview. That would anyway be the best solution in my opinion (as a disliker of the js tex libraries)

So I report a bug with comments; if you edit a comment with TeX inside, the TeX chunks disappear and must be written from scratch.

I tried writing $\hat{C}_{t-1}$ in my (possibly off-topic?) question here: Tonga: low rank approximation of the natural gradient, question regarding Le Roux et al. 2007 but the \hat seems to mess with the correct processing of the rest of the question, so I had to remove that hat. But hats work in the other formulas, wonder what is going on here? Also would be nice if writing matries using \array would be supported...

• Ha, and it works here, but not in my original question, how strange! Aug 1 '10 at 23:14
• @Geoff. The latex is a mess on that page, but ok on some other pages. Why? Aug 3 '10 at 2:47
• OK. Now seems to be fixed. There's obviously a lot of work going on behind the scenes. It would be nice if this was reported on meta rather than leaving us in the dark. Aug 3 '10 at 4:19