I have a multi-line equation which I'd like to align at two points independently. The second alignment point appears only in the last and second-to-last line. My intended output is:
What I usually do to obtain this is add an &\hphantom{}
containing everything that comes between the first and second alignment point, like so:
\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}
This feels really cumbersome, however. It would be much nicer to use a syntax in which I can define multiple alignment points (&
and &&
):
\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}
Unfortunately, this results in:
Is there any way to use the above syntax (or something similarly elegant) and still get the desired output?