Let's say I'm editing a latex in Auctex's latex-mode, and I have the following equation.
\begin{align}
\phi & = a + b
+ c + d \\
& = a + b
+ c + d + e
\end{align}
The above alignment is what I get if I select everything and hit TAB
,
that is, if I'm just using indent-region
.
What I would like to get is the following:
\begin{align}
\phi & = a + b
+ c + d \\
& = a + b
+ c + d + e
\end{align}
Below is what I get if I call align-current
.
\begin{align}
\phi & = a + b
+ c + d \\
& = a + b
+ c + d + e
\end{align}
Which almost gets there, but not quite. The difference is clear.
Also, if I decide to remove the \phi
, align-current
does something simply bizarre:
\begin{align}
& = a + b
+ c + d \\
& = a + b
+ c + d + e
\end{align}
Is there a way I can customize align-current
or use something else to get the desired effect?