在相同的对齐环境中对每对方程进行不同的对齐

在相同的对齐环境中对每对方程进行不同的对齐

我正在使用以下环境,并希望在 = 符号处对齐前两个、后两个和第三两个方程。此时所有内容都在同一点对齐,但这样,例如最后一个方程就太靠左了。您有什么建议?将其拆分为三个对齐环境没有帮助,因为这样方程之间的间隔会太大。

\begin{align}
    Cov\left(\tilde{c}_D,\tilde{r}_M\right) &= \sum_{i=1}^4f_i\left(c_{D,i}-E(\tilde{c}_D)\right)\left(r_{M,i}-E(\tilde{r}_M)\right),\\
    Cov\left(\tilde{c}_E,\tilde{r}_M\right) &= \sum_{i=1}^4f_i\left(c_{E,i}-E(\tilde{c}_E)\right)\left(r_{M,i}-E(\tilde{r}_M)\right),\\
    V_D &= \frac{E(\tilde{c}_D) - \left( E\left(\tilde{r}_M\right) - r_f\right)\frac{Cov\left(\tilde{c}_D,\tilde{r}_M\right)}{\sigma_{\tilde{r}_M}^2}}{1+r_f},\\
    V_U &= \frac{E(\tilde{c}_E) - \left( E\left(\tilde{r}_M\right) - r_f\right)\frac{Cov\left(\tilde{c}_E,\tilde{r}_M\right)}{\sigma_{\tilde{r}_M}^2}}{1+r_f},\\
    \mu_D &= \frac{E(\tilde{c}_D)}{V_D} - 1 \text{~und~}\\
    \mu_E &= \frac{E(\tilde{c}_E)}{V_E} - 1.
\end{align}

答案1

好的,我在谷歌搜索另一个问题时自己找到了解决方案。这很有帮助:

\begin{gather}
    \begin{align}
        Cov\left(\tilde{c}_D,\tilde{r}_M\right) &= \sum_{i=1}^4f_i\left(c_{D,i}-E(\tilde{c}_D)\right)\left(r_{M,i}-E(\tilde{r}_M)\right),\\
        Cov\left(\tilde{c}_E,\tilde{r}_M\right) &= \sum_{i=1}^4f_i\left(c_{E,i}-E(\tilde{c}_E)\right)\left(r_{M,i}-E(\tilde{r}_M)\right),
    \end{align}\\
    \begin{align}
        V_D &= \frac{E(\tilde{c}_D) - \left( E\left(\tilde{r}_M\right) - r_f\right)\frac{Cov\left(\tilde{c}_D,\tilde{r}_M\right)}{\sigma_{\tilde{r}_M}^2}}{1+r_f},\\
        V_U &= \frac{E(\tilde{c}_E) - \left( E\left(\tilde{r}_M\right) - r_f\right)\frac{Cov\left(\tilde{c}_E,\tilde{r}_M\right)}{\sigma_{\tilde{r}_M}^2}}{1+r_f},
    \end{align}\\
    \begin{align}
        \mu_D &= \frac{E(\tilde{c}_D)}{V_D} - 1 \text{~und~}\\
        \mu_E &= \frac{E(\tilde{c}_E)}{V_E} - 1.
    \end{align}
\end{gather}

答案2

我建议进行一些改进:subequations由于方程式是成对出现的,因此使用来自nccmath分数中的分数的中等大小的分数,将其声明Cov为数学运算符(现在看起来像三个变量的乘积),并使用来自的命令Cov再次放置单词“und” :ArrowBetweenLinesmathtools

\documentclass{article}
\usepackage{mathtools, nccmath}
\DeclareMathOperator{\Cov}{Cov}

\begin{document}

\begin{gather}
  \begin{subequations}
    \begin{align}
      \Cov\left(\tilde{c}_D,\tilde{r}_M\right) & = ∑_{i=1}⁴f_i\left(c_{D,i}-E(\tilde{c}_D)\right)\left(r_{M,i}-E(\tilde{r}_M)\right), \\
      \Cov\left(\tilde{c}_E,\tilde{r}_M\right) & = ∑_{i=1}⁴f_i\left(c_{E,i}-E(\tilde{c}_E)\right)\left(r_{M,i}-E(\tilde{r}_M)\right),
    \end{align}
  \end{subequations}
  \\
  \begin{subequations}
    \begin{align}
      V_D & = \frac{E(\tilde{c}_D) - \left( E\left(\tilde{r}_M\right) - r_f\right)\mfrac{\Cov\left(\tilde{c}_D,\tilde{r}_M\right)}{\sigma_{\tilde{r}_M}²}}{1+r_f}, \\
      V_U & = \frac{E(\tilde{c}_E) - \left( E\left(\tilde{r}_M\right) - r_f\right)\mfrac{\Cov\left(\tilde{c}_E,\tilde{r}_M\right)}{\sigma_{\tilde{r}_M}²}}{1+r_f},
    \end{align}
  \end{subequations}\\
  \begin{subequations}
    \begin{alignat}{2}
        & & \mu_D & = \frac{E(\tilde{c}_D)}{V_D} - 1 \\
      \ArrowBetweenLines[\text{und~}]
        & & \mu_E & = \frac{E(\tilde{c}_E)}{V_E} - 1.
    \end{alignat}
  \end{subequations}
\end{gather}

\end{document} 

在此处输入图片描述

相关内容