I have no idea how to use either of the Tex methods supported here.

How about putting a link to the instructions or a tutorial on both in the FAQ?


1 Answer 1


The advice from the question/answer in the proposed faq:

Q: How do I type math in my question/answer/comment?

A: For simple formulae, you can use <sup></sup> to write superscripts and <sub></sub> for subscripts:
y<sub>1</sub>=x<sup>2</sup>+3becomes y1=x2+3

For more complicated formulae, you can use TeX markup.
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}2$$

AMS math environment is also supported, e.g.

>       \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}$$

If you are unfamiliar with TeX, you can find a question that uses the markup you'd like to use, then right click and select show source.

If you have detailed questions about TeX or LaTeX, this is not the appropriate place to ask them. Please use a dedicated TeX help site such as http://tex.stackexchange.com or http://www.latex-community.org/forum/

Feel free to edit or comment on the linked post if there is anything specific you'd like to see.

As for the official math.stackexchange faq, that can only be touched by a site admin, so it will take a while for the community proposed faq to propagate there.

  • $\begingroup$ I guess I'll give up on an admin noticing this. Thank you for the instructions. $\endgroup$ Commented Aug 9, 2010 at 18:26
  • $\begingroup$ @Lance: I've updated this answer to incorporate advice from other sources. I will also try to get into contact with an admin to get a link to the unofficial faq inserted. $\endgroup$
    – Larry Wang
    Commented Aug 9, 2010 at 18:54
  • 2
    $\begingroup$ Relevant: MathJax basic tutorial and quick reference $\endgroup$
    – MJD
    Commented Sep 26, 2012 at 4:52
  • $\begingroup$ The first TexMarkup link is obsolete. It redirects to the following ctan.org/tex-archive/info/lshort/english/lshort.pdf Can you please update it? $\endgroup$
    – gciriani
    Commented Feb 10, 2023 at 16:41

You must log in to answer this question.

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