latex编辑多个子公式
在使用latex写论文时,有时候需要用到子公式。什么意思呢?
就是说正常情况下,一个公式编一个号,如1,2,3……但有几个公式,我们觉得它们具有某些共有的属性,希望把它们作为一个对待,使用子编号2a,2b,2c,而不是2,3,4。
这在latex是可以使用subequations标签实现,但具体代码不止一种,下面列出了几种,可以根据自己的需要进行选择。
代码一
\begin{subequations} \begin{equation} a = a_1 + a_2 + a_3 \end{equation} \begin{equation} b = b_1 + b_2 + b_3 + b_4 + b_5 \end{equation} \begin{equation} c = c_1 + c_2 + c_3 + c_4 + c_5 \end{equation} \end{subequations}样式如下:
评价:公式会自动居中对齐,行间距比较大。
代码二
\begin{subequations} \begin{align} a = a_1 + a_2 + a_3 \\ b = b_1 + b_2 + b_3 + b_4 + b_5 \\ c = c_1 + c_2 + c_3 + c_4 + c_5 \end{align} \end{subequations}样式如下:
评价:公式自动右对齐,行间距适中。
代码三
\begin{subequations} \begin{align} a &= a_1 + a_2 + a_3 \\ b &= b_1 + b_2 + b_3 + b_4 + b_5 \\ c &= c_1 + c_2 + c_3 + c_4 + c_5 \end{align} \end{subequations}样式如下:
评价:这种方案与第二种实际上是一样的,只是在“=”处增加了对齐方式,所以会在“=”处对齐。当然,你可以根据自己的需要,通过&符号对齐任意位置。
综合以上,我爱搜集网为你推荐方案三。
仅有一条评论
感谢感谢感谢