I know that some of you have to feel like Phil Connors in Groundhog Day because it is asked so often, but I really don't get it: Why isn't there a common way of using LaTeX in Stack Overflow?

First of all, I did my job and used the search engine. I read follwing questions/posts:

I'm sorry if I did not read all comments, but I read many things out of this posts. And I do not get an answer out of these questions.

Why isn't LaTeX supported?

The answer often given is "as it is an extremely heavy dependency". I do not understand this argument? Which dependency? I know if you think of jsMath then there is a dependency of that.

But is that better to be depended on a library then of forcing users to use external image generation sites for displaying their equations?

What should be done with generated images?

So now there isn't any LaTeX support. This leads into the fact, that different libraries are used to generate images in posts. Most of them are linked and so there is a dependency to these sites, to support this in future too. If one of these sites get offline, then you got the same problem like with pictures not hosted on Imgur.

So should a user use another library to generate a picture, upload it then to imgur and use it in post? Or is linking just fine and we handle the risk of loosing information?

Why is there this focus on jsMath?

I do not have problems, if Stack Overflow uses an image generated way. Or if the image dialogue supports a third tab with "LaTeX" and this uses an external library to generate his LaTeX encoding and it automatically uploads it on Imgur...

My problem now is, that I do not know how I should present my mathematical problems in the correct way on Stack Overflow. And I think it is sometimes better to present a problem in a mathematical way than in a coding way, because a problem (algorithm) could be presented in different languages...

And to sum this up, I do not get why LaTeX, which could solve that problem, isn't supported on Stack Overflow :)

So thanks for your answers, and I hope it also helps other people understanding the "LaTeX situation" on Stack Overflow :D

  • 2
    The top two answers here seem to provide sufficient explanation as to why Latex has not been implemented on SO. If you're asking mathematical problems that don't involve code, you should consider asking them on Mathematics instead of SO. Commented Apr 5, 2012 at 7:15
  • I think this recent explanation from the MathJax developer Davide Cervone on how heavy MathJax actually is could be very useful for this discussion. Commented Apr 5, 2012 at 8:21
  • Big or not, it's slow. Just open a site with MathJax enabled and it's noticeably slower to load. Commented Apr 6, 2012 at 3:26
  • but as i described, there are other possibilities then MathJax! I got no problems with an image generated solution, but hosted on stackoverflow... because now 3rd party generator are used and the images arn't on imgur.com ...
    – Neysor
    Commented Apr 6, 2012 at 5:36

2 Answers 2


Methinks you're looking for the new Computer Science site.

Only a very small proportion of posts on Stack Overflow would benefit from mathematical markup. Stack Overflow has support for syntax highlighting of code because a lot of code is posted there. Sites like Mathematics and Computer Science support LaTeX-like markup (MathJax) because a lot of posts there use it. Other sites have such domain-specific markup, for example jTab notation for guitar tabs on Musical Practice and Performance and a Balsamiq editor for user interface mockups on User Experience. There's no Balsamiq on Cooking or jTab on Literature because they would never be used. The case for LaTeX on Stack Overflow is only barely stronger.

As a rule of thumb, if your algorithm question includes code, ask on Stack Overflow. If your algorithm question includes math, ask on Computer Science.

Did I mention that there's a Computer Science site now?

  • No I did not get across Computer Science. But i'll look at it. This network of different Sites is hard to look through. :)
    – Neysor
    Commented Apr 5, 2012 at 12:37
  • 4
    I just wanted it the other day on SO. It's silly to think that any question about programming that involves math must be "computer science". Have we relegated the meaning of programming to just responding to GUI messages? Programming needs algorithms. Algorithms and their behavior are expressed with math. If the use of TeX equations in SO would be rare, then the speed of page loading will almost always be unaffected! Right?
    – Mark Adler
    Commented May 5, 2012 at 1:44

The "heavy dependancy" is MathJax. By dependancy, they're talking about the fact that a whole bunch of stuff has to be loaded, instead of "if this goes down we're sunk"-sort-of-overhead (I think).

MathJax is enabled on quite a few sites. OTOH, Physics, Mathematics,mathematica,and meta.mathematics have it.

About the overhead, I think I have a way to solve it.

Have mathjax load itself ONLY when there's a certain token on the page. You may add the additional constraint that the token must be in a post and not on a comment.

I proposed this here first, and here are some jsFiddles:

The scripts don't work for the auto-update-preview, but I'm not going to dive into SE code to make it work :/

But such an "only-when-needed" mathjax thingy might be useful on many sites. This will probably be , but one can hope ;-)

  • On SO, the 'flagship' of this fast, and vast network, it would still be too much overhead even with conditional loading - if one question on one of the pages listing up to 50 questions invokes it then it is something of a waste of time. Also it would rarely be used enough to have much practical benefit to SO anyway. Commented Apr 5, 2012 at 9:53
  • 2
    @Mr.Disappointment: Have it conditionally load on post pages only. Easy fix. Alright, disable it for SO. There are other sites which would need it, just with a lower frequency--and they are getting declined. meta.stackexchange.com/questions/128238/… Commented Apr 5, 2012 at 10:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .