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...


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:




| improve this answer | |
  • 1
    Just to make this complete, an online TEXT editor: codecogs.com/latex/eqneditor.php – Yochai Timmer Jan 28 '11 at 17:42
  • 1
    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
  • 1
    This answer is now outdated, Stack Overflow now accepts LaTeX Phrases. (See Mehrad's answer) – Jan Moritz May 27 '14 at 19:35
  • 7
    @JanMoritz Stack Overflow still doesn't. Certain topic sites like Physics and Math Exchange do. – user200500 Jun 13 '17 at 4:58
  • I guess this is an outdated answer; I found that I can follow the instructions here math.meta.stackexchange.com/questions/5020/… for stat stack Exchange site – Alex Punnen Feb 19 at 5: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

Take the result and prepend it with the following URL: https://chart.googleapis.com/chart?cht=tx&chl=

Then reference it to your post:

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

  [1]: https://chart.googleapis.com/chart?cht=tx&chl=%5Csum_%7B23%7D%5E%7B43%7D
  [2]: https://chart.googleapis.com/chart?cht=tx&chl=%5Csqrt%7B%5Cfrac%7B%5Cpartial%7D%7B%5Cpartial%20x%7D%7D

It will show like this:

This is a formula formula

Another formula: another

| improve this answer | |
  • 3
    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 chart.googleapis.com 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
  • 1
    The latex editor you mentioned has an option for "URL (encoded)" that has been adequate to bypass the encoder for me so far. Saves one tab switch. – Mad Physicist Dec 19 '16 at 17:44

LaTeX Phrases

Some sites (mainly the scientific ones) use 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 defined through the Euler integral

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

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

To create a LaTeX phrase you can go to an online LaTeX Equation Editor.

| improve this answer | |
  • 30
    It doesn't work on stackoverflow. – Mark Lakata Sep 6 '15 at 16:16
  • It works on a lot of stackexhange sites such as cross-validated, which are math intensive. – user350459 Dec 15 '17 at 16:54
  • 1
    It works on mathematics stack as well. – lenhhoxung Mar 6 '19 at 16:27
  • It works, but how can I get the formula inlined, right now it comes out as block display, but when you want to refer in the text to variables with index or overline or simple terms, you want them inlined, not display block presented. How to do that? – Gunther Schadow Dec 7 '19 at 2:47
  • Funny, it doesn't work even on... tex.stackexchange.com :-/ :-/ – Antonello Feb 4 at 13:52
  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)





| improve this answer | |

Using WYSIWYG editor like Mathcha Editor

First, using this website to insert math equation (support import from latex)

Second, export to image/latex....to share Or login to the website and share without limitation (auto-generate a link). There is Mathcha Editor:

enter image description here

| improve this answer | |
  • 1
    This is awesome.. – user350459 Dec 15 '17 at 16:35
  • Is this a opensource project? Based on neovim or something? i couldnt find information on github etc.. – user350459 Dec 15 '17 at 16:40

You must log in to answer this question.

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