4

I would like to break the following two equations. I would like for them to have the colons aligned together, but besides that they should have their own, unique alignment points. Please see the picture for a reference regarding alignment of the colons.

Here is a MWE illustrating the problem:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{alignat*}{2}
a + a + a + a + a + a \quad &: \quad \alpha + \alpha + \alpha + \alpha + \alpha =&& +1 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2\\
        &                && -3 + 4-3 + 4-3 + 4-3 + 4-3 + 4-3 \\
a \quad &: \quad \beta  =&& +4+4+4+4+4+4+4+4+4+4+4+4+4+4+4 \\
        &                && +4+4+4+4+4+4+
\end{alignat*}
\end{document}

enter image description here

2
  • I'm afraid your screenshot doesn't correspond to the LaTeX code you've posted. Moreover, the screenshot doesn't make clear what you want to change. Please clarify.
    – Mico
    Jun 30, 2014 at 15:36
  • @Mico Bernard's answer is just what I am looking for. Sorry for not being clearer
    – BillyJean
    Jun 30, 2014 at 15:55

2 Answers 2

3

A solution using two aligned environments within an align, to have a partial alignment of the two groups of equations. I think aligning inside the groups a little further looks better:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage[showframe, nomarginpar]{geometry}

\usepackage{mathtools}

\begin{document}

\begin{align*}
a + a + a + a + a + a \quad & : \quad \begin{aligned}[t]
\alpha + \alpha + \alpha + \alpha + \alpha = +1 & + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2\\
         & -3 + 4-3 + 4-3 + 4-3 + 4-3 + 4-3 \\
\end{aligned}\\[1ex]
a \quad & : \quad \begin{aligned}[t]
\beta = +4+4+4 & +4+4+4+4+4+4+4+4+4 \\&+4+4+4 +4+4+4+4+4+4+{}
\end{aligned}
\end{align*}

\end{document} 

enter image description here

Depending on the context, the aligned environments could as well be multilined environments

2
  • Thanks, just what I was looking for. Sorry for my poor question.
    – BillyJean
    Jun 30, 2014 at 15:55
  • 3
    You're welcome. It's not always easy to explain what one wants.
    – Bernard
    Jun 30, 2014 at 16:06
5

You could have two separate alignat* environments inside a gather* environment:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
\begin{alignat*}{2}
a + a + a + a + a + a \quad &: \quad \alpha + \alpha + \alpha + \alpha + \alpha =&& +1 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2\\
        &                && -3 + 4-3 + 4-3 + 4-3 + 4-3 + 4-3 
\end{alignat*}\\
\begin{alignat*}{2}
a \quad &: \quad \beta  =&& +4+4+4+4+4+4+4+4+4+4+4+4+4+4+4 \\
        &                && +4+4+4+4+4+4
\end{alignat*}
\end{gather*}
\end{document}
3
  • But this way the left part (the colons) are not aligned
    – BillyJean
    Jun 30, 2014 at 14:26
  • @BillyJean - I had understood your request as stating that the first and second lines should be aligned, as should be the third and fourth lines, but that lines 1&2 should not share any alignment points with lines 3&4. If this understanding is incorrect, please indicate what you want instead.
    – Mico
    Jun 30, 2014 at 14:30
  • 1
    I don't understand whether there's to be 1 or 4 α's?
    – Bernard
    Jun 30, 2014 at 15:16

You must log in to answer this question.

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