7

I am trying to get two sets of displayed formulas, each pair of them with only one equation number using the aligned environment inside an align environment and with the additional requirement of an intertext between them. I would like the alignment of the four equations to be the same. My code is:

\begin{align}\label{eq9.1}
\begin{aligned}
b(v+v',w)&=b(v,w)+b(v',w). \\
b(v,w+w')&=b(v,w)+b(v,w'), \\ 
\end{aligned}
\intertext{some text}
\begin{aligned}
 b(\lambda v,w)&=\lambda b(v,w). \\
b(v,\lambda w)&=\lambda b(v,w),  
\end{aligned}
\end{align}

But the result does not align the first two equations with the last two ones.

2
  • What is the purpose of the aligned environments? Equation numbers that label multiple lines? If you use those, at a given point you will be terribly disappointed because this prohibits page breaks. So just remove the aligned stuff.
    – user228539
    Nov 22 '20 at 20:42
  • Thanks for your comment! My solution, albeit not the good one I think, was to remove the \aligned environments, add \notags and let the equation numberings for the second and fourth equations. But I still wonder if there is a better solution . . .
    – F Zaldivar
    Nov 22 '20 at 20:47
5

Replace aligned by split

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\begin{align}
\begin{split}
b(v+v',w)&=b(v,w)+b(v',w). \\
b(v,w+w')&=b(v,w)+b(v,w'), % NO \\ here!!
\end{split}
\intertext{some text}
\begin{split}
b(\lambda v,w)&=\lambda b(v,w). \\
b(v,\lambda w)&=\lambda b(v,w),  
\end{split}
\end{align}

\end{document}

enter image description here

Explanation: aligned is just an internal version of align. It can have as many alignment points as you wish, but behaves otherwise like a closed block.

On the other hand, while split admits only one alignment point, it is "aware" of the alignment points in an enclosing align, as this example makes clear

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\hsize=8cm % smaller picture

\begin{align}
a &= b & a &= b\\
\begin{split}
A &= B + C \\
D &= E + F
\end{split}
\\
&&
\begin{split}
A &= B + C \\
D &= E + F
\end{split}
\\
x &= r \cos(\varphi) & y &= r \sin(\varphi)
\end{align}

\end{document}

enter image description here

3
  • 1
    Super! Thanks a lot!
    – F Zaldivar
    Nov 22 '20 at 20:58
  • Interesting. This behaviour of split inside align does not seemed to be described in the amsmath documentation. Nov 25 '20 at 8:32
  • @AndrewSwann Yeah, and that's a shame, because it is a very useful feature indeed.
    – campa
    Nov 25 '20 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.