# Math markup, diagrams, etc. — pointers please

Feeling a bit dumb as I plunge into math.stackexchange.com after many years away from the world of mathematics, but can somebody please provide a very quick tutorial -- list of reference pointers would be sufficient -- for getting math markup on math.stackexchange.com. I can use html sup, sub tags, but how to do the more complex markup like fractions, and even drawing diagrams.

Markdown doesn't do much for math, a far as I can tell, but I could be wrong.

Thanks --oldbie/newbie David

• the site has TeX markup support — so you just need to take a look at some TeX tutorial (sorry, no good source comes to mind now) – Grigory M Aug 6 '10 at 12:02
• Tried Tex, with $\frac{-b}{2a}$ -- oops, may have forgotten the backslash. OK, will try again. – David Lewis Aug 6 '10 at 12:19
• btw, we need to answer this question in the FAQ – Grigory M Aug 6 '10 at 15:11
• I've removed the meta tag, since all questions asked on meta.math.se are expected to be meta, and added the tex tag, since TeX is the system used here to render/display math. – Larry Wang Aug 7 '10 at 1:56
• @Grigory: It is already in the proposed faq. I will update it to include the answers here shortly. – Larry Wang Aug 9 '10 at 2:57

All you have to do is find a question that uses the markup you'd like to use, then right click and select show source.

• Duh! Thanks. Thought of that, but assumed I'd see html instead. I don't know why I didn't just try it. – David Lewis Aug 6 '10 at 20:27

To type inline TeX equations, surround the code with $'s, e.g. $c = \sqrt{ a^2 + b^2 - 2ab \cos \theta } ⇒ $c = \sqrt{ a^2 + b^2 - 2ab \cos \theta }$

To put the equation in its own line, surround with $$'s, e.g. $$\int_0^\infty e^{-x^2} dx = \frac{\sqrt\pi}2$$ ⇒$$\int_0^\infty e^{-x^2} dx = \frac{\sqrt\pi}2AMS math environment is also supported, e.g. \begin{align} \cos x &= \frac{\sin 2x}{2 \sin x} \\\\ \sin^2 x &= \cos^2 x - \cos 2x \end{align}  ⇒ \begin{align} \cos x &= \frac{\sin 2x}{2 \sin x} \\ \sin^2 x &= \cos^2 x - \cos 2x \end{align} Note that you need 4 backslashes for a new line. Many times you also need extra backslashes to avoid conflict with Markdown syntax, e.g. \alpha^{-1}_{-1} + \beta_{-2}$$ won't work, as _..._ is interpreted as italics.$$\alpha^{-1}{-1} + \beta{-2}$$Use $$\alpha^{-1}\_{-1} + \beta\_{-2}$$ instead.$$\alpha^{-1}_{-1} + \beta_{-2}

• The multi-backslash-issue should actually be solved – Tobias Kienzler Aug 21 '13 at 13:01

If you have firefox, go to your address bar and type in "lshort" without the quotes. Read the PDF tutorial on Latex. Actually you don't even have to read it. I just bookmarked pages that have the most used commands and I just refer to them when I need it. But that was the PDF that introduced me to Latex.

• more explicitly: chapter 3 @ ctan.org/tex-archive/info/lshort/english/lshort.pdf (right?) – Grigory M Aug 6 '10 at 15:10
• Yes sir. But again, I would recommend going back and forth from all the chapters so while your learning the math markup, you can also learn how to format an article or journal entry. – Tyler Hilton Aug 6 '10 at 15:18
• I would also recommend looking over Kenny's answer for the minor differences when writing on this website rather then TexWorks or similar. – Tyler Hilton Aug 6 '10 at 15:19