Redbelly98 said:
Glad you found how to do it. FYI, we often point new members who ask this question to the following thread:
https://www.physicsforums.com/showthread.php?t=386951
That thread could use some cleanup. Borek's post about the old preview bug should be deleted. It's weird to explain multiple lines by linking to page 19 of 49 of an old locked thread filled with lots of irrelevant information and broken LaTex code. (I would just
link to a web page that explains the
align environment). Those are just examples. I'm reluctant to link to this thread myself because of all the problems with it.
The thread should at least explain the difference between itex and tex tags (you could e.g. use my example below), link to
the comprehensive LaTeX symbol list, mention the 50 character bug, mention the quick edit refresh bug, and mention that the best way to learn is to click on the quote button every time you see a post that makes you think "I wonder how he did that". (OK, I see now that the "how to latex" document actually does that last thing).
Example of itex vs tex: The function \sin:\mathbb R\rightarrow\mathbb R is defined by \sin x=\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!}x^{2n+1}, for all x\in\mathbb R. Note that the comma must be placed inside the tex tags, and that you shouldn't type any line breaks.
The "how to latex" pdf should also be updated. It doesn't mention itex tags, fails to mention that \\ only works in specific environments (like align), falsely claims that tex tags are equivalent to "dollar sign, LaTeX code, dollar sign" in a LaTeX document. (This would give you a result equivalent to itex. You need two dollar signs before and after the code to get a result equivalent to tex). The pdf explains some things in awkward ways. For example matrices: \Lambda=\gamma\begin{pmatrix}1 & -v\\ -v & 1\end{pmatrix} I also think people would prefer to use the
cases environment instead of arrays: \chi_{\mathbb Q}(x)=\begin{cases}1 &\text{if }x\in\mathbb Q\\ 0 &\text{if }x\notin\mathbb Q.\end{cases} The
displaystyle command is explained badly. It's used to prevent LaTeX from formatting the math the way it normally would when the math image is to appear on a line that also includes text. Compare \sum_{k=0}^n x_k to {\displaystyle \sum_{k=0}^n x_k}. The latter code includes a "displaystyle". Note the positions of the curly brackets. They
don't go where you'd normally put them. (Compare it with the source code for this image: \sqrt{x^2}).