Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I want to ask something that contains a mathematical formula.

How can I write the equation? Is there a page that shows the syntax?

I thought there must be some syntax like in Wikipedia or something...

share|improve this question
See… - but I don't think the syntax is implemented on SO – ChrisF Jan 28 '11 at 14:52
It's strange that stackoverflow does not support math formulas directly, like MathExchange or CrossValidate. – qed Sep 1 '13 at 14:30
up vote 30 down vote accepted

I'm not sure why Simon deleted his answer, but it was right, you can use the Google Chart API. For example, this:




Second formula:




share|improve this answer
+1 I (wrongly) thought they couldn't be added as images. – Gelatin Jan 28 '11 at 15:12
Just to make this complete, an online TEXT editor: – Yochai Timmer Jan 28 '11 at 17:42
This doesn't work well when you have more than 1 formula. – Yochai Timmer Jan 28 '11 at 19:40
@Yochai I just tried it in an edit; what issue are you having? – Michael Mrozek Jan 28 '11 at 19:49
tried to put 4 formulas, only the first showed. – Yochai Timmer Jan 28 '11 at 20:03
I need to substitute ) with %29 to make it work in preview when I type the answer. But even if I do so, it doesn't work when I save it and view it. @YochaiTimmer 's answer works for me. – Haozhun May 28 '13 at 7:26
This answer is now outdated, Stack Overflow now accepts LaTeX Phrases. (See Mehrad's answer) – 109fa68a145b May 27 '14 at 19:35

Ok, best combination I found is doing something like what Michael suggested.
But it's easier to reference the link at the bottom.
So, go to this site: Online LaTex Equation Editor
Create your formula. Use this site and encode it for URL safety: URL Encoder/Decoder

Add the result to the google prefix

Then reference it to your post:

This is a formula ![formula][1]
Another formula: ![another][2]


It will show like this:

This is a formula formula

Another formula: another

share|improve this answer
Unfortunately, the result is not as good as directly from LaTeX... – brimborium Aug 10 '12 at 10:26
+1 I was having trouble getting this to work using although I was able to get this work using the URL encoded link from codecogs just fine. I was using it for this answer, any idea why? – Shafik Yaghmour Nov 30 '13 at 4:35

LaTeX Phrases

Physics Stack Exchange uses MathJax to render LaTeX. You can use single dollar signs to delimit inline equations, and double dollars for blocks:

The Gamma function satisfying $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ is via through the Euler integral

$$ \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. $$

And you'll see the resutls as: enter image description here

To create Latex phrase go to online Latex Equation Edittor

This is topic oriented. It definitely works in Physics and Maths Exchange

share|improve this answer
It doesn't work on stackoverflow. – Mark Lakata Sep 6 '15 at 16:16

1. Formulate your equation using the CodeCogs tool.

2. Right-click the generated image and select "Copy image location" or similar.

3. On Stack Overflow, insert the image as so: ![equation](imageUrl)





share|improve this answer

You must log in to answer this question.

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