I am trying to typeset the Mayer-Vietoris sequence (concisely – without the map names above the arrows). Currently I am simply using the AMS align environment with a bunch of \rightarrow
, \cdots
and a \hphantom
to align the last line horizontally:
\begin{align*}
\cdots & \rightarrow H_{n}\left(A\cap B\right)\rightarrow H_{n}\left(A\right)\oplus H_{n}\left(B\right)\rightarrow H_{n}\left(X\right)\rightarrow \\
& \rightarrow H_{n-1}\left(A\cap B\right)\rightarrow\cdots \\
& \hphantom{\rightarrow H_{n}\left(A\cap B\right)\rightarrow H_{n}\left(A\right)\oplus H_{n}\left(B\right)}\cdots\rightarrow H_{0}\left(X\right)\rightarrow 0
\end{align*}
The result looks like this:
I would like to align the first arrow on the last line correctly under the penultimate arrow on the first line, and also to merge the last line with the second one, so it looks like this (image made with image editor):
How should I do this?
Best Answer
Here is a possible solution using the package
mathtools
(which is kind of a successor ofamsmath
):A short explanation:
I used an
alignat
with two alignment points (as requested by you). First, I tried to push the\cdots
to the right with\hfill
but this does not work here. For sure you could find somearray
solution with this trick.Therefore, I had to add the dots to the right of the second alignment mark and change its width to zero. The command
\mathllap
is provided bymathtools
and smashes the box width setting its content to the left.