标签:
【转载请注明出处】http://www.cnblogs.com/mashiqi
2016/10/20
一年多没写博文了。今天写一个短的,记录一下使用LaTeX的一些经验。
如何居中多行的公式呢?我试过很多种方法后,觉得下面这个最好用:
1 \begin{flalign*}2 % In this way (this arrange of &), the equation will in the center and align at the third &. If use this method for ‘split‘, equations will not be centered3 % However, ‘flalign‘ will give each line a separate number. It cannot number the whole equations in one number.4 && a & = b & \5 && a & = b & \6 && a & = b & \7 && a & = b &8 \end{flalign*}
其中的多个&符号是专门安排好的。只用往第二个和第三个&符号后面添加代码就行了,它们就能对齐 并且所有公式作为一个整体进行居中。但这里有个问题,就是编号的问题。这里没有公式的编号。如果把flalign后面的*号去掉的话,那么就有编号了,但是是每一行公式一个编号,有些情况下这不太合适。因此,为了编号,我们要对上述代码做如下更改:
1 \begin{flalign}2 % In this way (this arrange of &), the equation