0

I want to align my equations in such a way that every + and - are written in one row.

I want to do it like this:

\begin{align*}
&+ \left( \gamma^{r}_{y} \gammabar^{v}_{u} \gammabar^{x}_{s}  &- \gamma^{r}_{y} \gammabar^{v}_{s} \gammabar^{x}_{u} \right) \\
&- \lb \gamma^{r}_{y} \gammabar^{v}_{q} \gammabar^{x}_{s}  &+ \gamma^{r}_{y} \gammabar^{v}_{s} \gammabar^{x}_{q} \rb \\
\end{align*}

Where \gammabar is a macro for \bar{\gamma}

But if I want to do that I get an error:

Extra } or forgotten \right \end{align*}

So does anybody know what's going on there?

So I want to align not only with one &, but many &'s.

1 Answers1

0

If I've well understood what you want to achieve, you need the alignat environment, for a full control on the spacing between the alignment columns. This is what I propose:

\documentclass{article}
\usepackage{amsmath}
\newcommand{\gammabar}{\bar{\gamma}}
\newcommand{\lb}{\bigl(}
\newcommand{\rb}{\bigr)}

\begin{document}

\begin{alignat*}{2}
&+ \bigl( \gamma^{r}_{y} \gammabar^{v}_{u} \gammabar^{x}_{s} &{}-{} & \gamma^{r}_{y} \gammabar^{v}_{s} \gammabar^{x}_{u} \bigr) \\
&- \lb \gamma^{r}_{y} \gammabar^{v}_{q} \gammabar^{x}_{s} &{}+{} & \gamma^{r}_{y} \gammabar^{v}_{s} \gammabar^{x}_{q} \rb \\
\end{alignat*}

\end{document} 

enter image description here

Bernard
  • 271,350