# Multiple align points with a single equation number

I have the following equation:

\begin{align}
\begin{split}
&\phantom{{}={}} [ (1,1,1) : (1,1) : (1,2) : (1) : (2,2,2) : (2,2) : (2) :  (3) ] \\
\textsc{one} &= [ 0 : 3 : 0 : 0 : 0 : 0 : 0 : 0 ] \\
\textsc{two} &= [ 1 : 0 : 3 : 0 : -1 : 0 : 0 : 0 ] \\
\textsc{three} &= [ 0  : 0 : 3 : 0 : -1 : 0 : 0 : 0 ] \\
\end{split}
\end{align}
\end{document}


I would like to have the opening [, each :, and closing ] aligned vertically to match the top row.

I have tried various combinations of align, alignat, equation, alignedat, but I am unable to find anything that works.

Any pointer would be appreciated.

I tried the alignedat from other answers:

\begin{alignedat}{9} &[ (1,1,1) &: (1,1) &: (1,2) &: (1) &: (2,2,2) &: (2,2) &: (2) &: (3) & & ] \\ \textsc{one} = &[ 0 &: 3 &: 0 &: 0 &: 0 &: 0 &: 0 &: 0 & &] \\ \textsc{two} = &[ 1 &: 0 &: 3 &: 0 &: -1 &: 0 &: 0 &: 0 & & ] \\ \textsc{three} = &[ 0 &: 0 &: 3 &: 0 &: -1 &: 0 &: 0 &: 0 & &] \\ \end{alignedat}


but it doesn't actually seem to do the alignment (only aligns some :'s).

• Number of & should be 2x9-1 on each line. 9 & to mark alignments and 8 & to mark the separation between alignment columns (and alignment column is two columns with and alignment & between them). See it as a large table where the columns are grouped into pairs. In your case you can probably get by using && in many places as the corresponding left part of those alignment columns are empty Jan 24, 2017 at 17:00

You can use autoaligne:

\documentclass{article}
\usepackage{amsmath}
\usepackage{autoaligne}

\begin{document}

\definirseparateurs{\\}{}{:||[||]} \autoaligne[*d]{ [\, (1,1,1) : (1,1) : (1,2) : (1) : (2,2,2) : (2,2) : (2) : (3) \,] \\ \textsc{one}={} [\, 0 : 3 : 0 : 0 : 0 : 0 : 0 : 0 \,] \\ \textsc{two}={} [\, 1 : 0 : 3 : 0 : -1 : 0 : 0 : 0 \,] \\ \textsc{three}={} [\, 0 : 0 : 3 : 0 : -1 : 0 : 0 : 0 \,] }

\definirseparateurs{\\}{}{:||[||]} \autoaligne[*c]{ [\, (1,1,1) : (1,1) : (1,2) : (1) : (2,2,2) : (2,2) : (2) : (3) \,] \\ \hfill\textsc{one}={} [\, 0 : 3 : 0 : 0 : 0 : 0 : 0 : 0 \,] \\ \hfill\textsc{two}={} [\, 1 : 0 : 3 : 0 : -1 : 0 : 0 : 0 \,] \\ \hfill\textsc{three}={} [\, 0 : 0 : 3 : 0 : -1 : 0 : 0 : 0 \,] }

\end{document}


• I like this one the best, but you mention in another question that it is quite a new package. If it cannot be used in arXiv submissions I think that rules it out for me - plus I couldn't find any English documentation. Is there any way to get them centered like in (2) but in a arXiv compatible way? Jan 25, 2017 at 9:28

I'd use an array

\documentclass{article}

\usepackage{amsmath,array}

\begin{document}

$$\begin{array}{r<{{}}@{[}r@{:}r@{:}r@{:}r@{:}r@{:}r@{:}r@{:}r@{]}} & (1,1,1) & (1,1) & (1,2) & (1) & (2,2,2) & (2,2) & (2) & (3) \\ \textsc{one} = & 0 & 3 & 0 & 0 & 0 & 0 & 0 & 0 \\ \textsc{two} = & 1 & 0 & 3 & 0 & -1 & 0 & 0 & 0 \\ \textsc{three} = & 0 & 0 & 3 & 0 & -1 & 0 & 0 & 0 \\ \end{array}$$
\end{document}


Here is a correct code with alignedat:

\documentclass[]{article}
\usepackage{mathtools}
\begin{document}

\begin{alignedat}{9} &[ (1,1,1) & & : (1,1) & & : (1,2) & & : (1) & & : (2,2,2) & & : (2,2) & & : (2) & & : (3) & & ] \\ \textsc{one} = {}&[ 0 & & : 3 & & : 0 & & : 0 & & : 0 & & : 0 & & : 0 & & : 0 & &] \\ \textsc{two} = {}&[ 1 & & : 0 & & : 3 & & : 0 & & : -1 & & : 0 & & : 0 & & : 0 & & ] \\ \textsc{three} = {}&[ 0 & & : 0 & & : 3 & & : 0 & &: -1 & & : 0 & & : 0 & & : 0 & &] \\ \end{alignedat}

\end{document}


Here is a TABstack.

\documentclass[12pt]{article}
\usepackage{tabstackengine,amsmath}
\begin{document}
$$\setstacktabbedgap{3pt} \tabbedCenterstack[r]{ [& (1,1,1) :& (1,1) :& (1,2) :& (1) :& (2,2,2) :& (2,2) :& (2) :& (3) & ] \\ \textsc{one} = [& 0 :& 3 :& 0 :& 0 :& 0 :& 0 :& 0 :& 0 &] \\ \textsc{two} = [& 1 :& 0 :& 3 :& 0 :& -1 :& 0 :& 0 :& 0 & ] \\ \textsc{three} = [& 0 :& 0 :& 3 :& 0 :& -1 :& 0 :& 0 :& 0 &] }$$
\end{document}