具有多个对齐点但仅位于某些线上的方程

具有多个对齐点但仅位于某些线上的方程

我有一个多线方程,我想在两个点独立对齐。第二个对齐点仅出现在最后一行和倒数第二行。我的预期输出是:

在此处输入图片描述

为了实现这一点,我通常做的是添加一个&\hphantom{}包含第一个和第二个对齐点之间的所有内容,如下所示:

\documentclass{article}

\usepackage{mathtools}
\DeclareMathOperator{\Tr}{Tr}
\newcommand{\dif}{\mathrm{d}}

\begin{document}
\begin{alignat*}{2}
    \partial_k \Gamma_{k,a}^{(1)}(q)
    &= \frac{\partial}{\partial k} \, \frac{\delta \Gamma_k[\varphi]}{\delta \varphi_a(q)}
    = \frac{\delta}{\delta \varphi_a(q)} \, \frac{1}{2} \Tr\Biggl[\frac{\partial_k R_k}{\Gamma_k^{(2)} + R_k}\Biggr]\\
    &= \frac{\delta}{\delta \varphi_a(q)} \, \frac{1}{2} \sum_{b,c=1}^N \int \frac{\dif^d p_1}{(2 \pi)^d} \frac{\dif^d p_2}{(2 \pi)^d} \, \frac{\partial_k R_{k,bc}(p_1,p_2)}{\Gamma_{k,bc}^{(2)}(p_1,p_2) + R_{k,bc}(p_1,p_2)}\\
    &= -\frac{1}{2} \sum_{b,c,d=1}^N \int \frac{\dif^d p_1}{(2 \pi)^d} \frac{\dif^d p_2}{(2 \pi)^d} \frac{\dif^d p_3}{(2 \pi)^d} \, \partial_k R_{k,bc}(p_2,p_3) \, \frac{1}{\Gamma_{k,bc}^{(2)}(p_1,p_2) + R_{k,bc}(p_1,p_2)}\\
    &\hphantom{{}= -\frac{1}{2} \sum_{b,c,d=1}^N \int} \Gamma_{k,abc}^{(3)}(q,p_1,p_3) \, \frac{1}{\Gamma_{k,bc}^{(2)}(p_2,p_3) + R_{k,bc}(p_2,p_3)}.
\end{alignat*}
\end{document}

&但这确实很麻烦。如果能使用可以定义多个对齐点(和)的语法就更好了&&

\documentclass{article}

\usepackage{mathtools}
\DeclareMathOperator{\Tr}{Tr}
\newcommand{\dif}{\mathrm{d}}

\begin{document}
\begin{alignat*}{2}
    \partial_k \Gamma_{k,a}^{(1)}(q)
    &= \frac{\partial}{\partial k} \, \frac{\delta \Gamma_k[\varphi]}{\delta \varphi_a(q)}
    = \frac{\delta}{\delta \varphi_a(q)} \, \frac{1}{2} \Tr\Biggl[\frac{\partial_k R_k}{\Gamma_k^{(2)} + R_k}\Biggr]\\
    &= \frac{\delta}{\delta \varphi_a(q)} \, \frac{1}{2} \sum_{b,c=1}^N \int \frac{\dif^d p_1}{(2 \pi)^d} \frac{\dif^d p_2}{(2 \pi)^d} \, \frac{\partial_k R_{k,bc}(p_1,p_2)}{\Gamma_{k,bc}^{(2)}(p_1,p_2) + R_{k,bc}(p_1,p_2)}\\
    &= -\frac{1}{2} \sum_{b,c,d=1}^N \int&& \frac{\dif^d p_1}{(2 \pi)^d} \frac{\dif^d p_2}{(2 \pi)^d} \frac{\dif^d p_3}{(2 \pi)^d} \, \partial_k R_{k,bc}(p_2,p_3) \, \frac{1}{\Gamma_{k,bc}^{(2)}(p_1,p_2) + R_{k,bc}(p_1,p_2)}\\
    &&\Gamma_{k,abc}^{(3)}(q,p_1,p_3) \, \frac{1}{\Gamma_{k,bc}^{(2)}(p_2,p_3) + R_{k,bc}(p_2,p_3)}.
\end{alignat*}
\end{document}

不幸的是,这会导致:

在此处输入图片描述

有什么方法可以使用上述语法(或类似的优雅语法)并仍然获得所需的输出?

答案1

在单个对齐点环境中使用对齐。如果我理解得没错的话,这应该可以满足您的要求:

\documentclass{article}

\usepackage{mathtools, esdiff}
\DeclareMathOperator{\Tr}{Tr}
\newcommand{\dif}{\mathrm{d}}

\begin{document}

\begin{align*}
    \partial_k \Gamma_{k,a}^{(1)}(q)
    &= \diffp{}{ k} \, \frac{\delta \Gamma_k[\varphi]}{\delta \varphi_a(q)}
    = \frac{\delta}{\delta \varphi_a(q)} \, \frac{1}{2} \Tr\biggl(\frac{\partial_k R_k}{\Gamma_k^{(2)} + R_k}\biggr)\\
    &= \frac{\delta}{\delta \varphi_a(q)} \, \frac{1}{2} \sum_{b,c=1}^N \int \frac{\dif^d p_1}{(2 \pi)^d} \frac{\dif^d p_2}{(2 \pi)^d} \, \frac{\partial_k R_{k,bc}(p_1,p_2)}{\Gamma_{k,bc}^{(2)}(p_1,p_2) + R_{k,bc}(p_1,p_2)}\\
    &= -\frac{1}{2} \sum_{b,c,d=1}^N \int\begin{aligned}[t]& \frac{\dif^d p_1}{(2 \pi)^d} \frac{\dif^d p_2}{(2 \pi)^d} \frac{\dif^d p_3}{(2 \pi)^d} \, \partial_k R_{k,bc}(p_2,p_3) \, \frac{1}{\Gamma_{k,bc}^{(2)}(p_1,p_2) + R_{k,bc}(p_1,p_2)}\\
 &\Gamma_{k,abc}^{(3)}(q,p_1,p_3) \, \frac{1}{\Gamma_{k,bc}^{(2)}(p_2,p_3) + R_{k,bc}(p_2,p_3)}.
 \end{aligned}
\end{align*}

\end{document} 

在此处输入图片描述

相关内容