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 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:
![foo+bar](https://chart.googleapis.com/chart?cht=tx&chl=foo%2bbar)
becomes:
![\sqrt{foo}](https://chart.googleapis.com/chart?cht=tx&chl=%5Csqrt%7Bfoo%7D)
becomes
)
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.
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
Another formula:
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?
Commented
Nov 30, 2013 at 4:35
https://latex.codecogs.com/gif.latex?<formula>
(for example) doesn't display well in stack overflow's dark mode.
Commented
Jan 6, 2021 at 4:37
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:
To create a LaTeX phrase you can go to an online LaTeX Equation Editor.
Formulate your equation using the CodeCogs tool.
Right-click the generated image and select "Copy image location" or similar.
On Stack Overflow, insert the image as so: ![equation](imageUrl)
Thus:
![E=mc^2](https://latex.codecogs.com/gif.latex?E%3Dmc%5E2)
Becomes:
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: