Q:

Show math formula in emacs when coding

Is it possible that emacs shows real formulas in the editor if they are written in Latex or similiar? I am asking because it would be much more readable if you are coding (in lets say python or C++) and the comments contain real formulas instead of something like this
// Calculate average for $\mu_1 = \frac{1}{n} ~ \sum_{1=i}^n ~ x_i$

Is there a plugin which compiles Latex code in a comment to a picture and display it in the editor?

A:

Yes. See pretty-symbols package. It can look like this, for example, when coding Python, or any other language:

