0

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:

enter image description here

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:

enter image description here

Is there any way to use the above syntax (or something similarly elegant) and still get the desired output?

1 Answer 1

4

Use aligned inside a single alignment point environment. This should do what you want, if I've well understood:

\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} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .