How do you align a series of equations in the center like Krizalid does in this thread?
http://www.mathhelpforum.com/math-he...opic-sums.html
I tried to duplicate the appropriate LaTeX code but don't seem to be able to. Could someone tell me what I'm doing wrong?
Code:\begin{aligned}\int{f(x)g(x)}dx& =f(x)+200g(x)& =5\end{aligned}
You can also use \hfill in case you want the parts between & & to be aligned to the left.
Another command to align things is \begin{gathered} \end{gathered} :
Code:\begin{gathered} p \text{ is a prime.} \hfill \\ \text{In } \mathbb{Z}/p \mathbb{Z},~ \forall \overline{n},~ \overline{n}^p-\overline{n}= \prod_{k=0}^{n-1} (\overline{n}-k) \hfill \end{gathered}
(without \hfill)Code:\begin{gathered} p \text{ is a prime.} \hfill \\ \text{In } \mathbb{Z}/p \mathbb{Z},~ \forall \overline{n},~ \overline{n}^p-\overline{n}= \prod_{k=0}^{n-1} (\overline{n}-k) \end{gathered}
The &'s help you align them. Play around with them and you should be able to catch on:
__________________________________________________ ____Code:\begin{aligned} & \int{f(x)g(x)}dx \\ & = f(x)+200g(x) \\ & = 5 \end{aligned}
Code:\begin{aligned} \int{f(x)g(x)}dx & = f(x)+200g(x) \\ & = 5 \end{aligned}