I used
\begin{matrix}
\ldots & 1 & 0 & 0 & 2 & 1 & | & 2 & 0 & 0 & 1 & \ldots \\
\ldots & & & & & 0 & | & 1 & & & &
\end{matrix}
But Latex says:
Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
Where is my mistake?


\halignprimitive with unlimited number of columns. – wipet May 01 '15 at 13:43arraythat's not simply\halign. – egreg May 01 '15 at 13:45\halignbut it is implemented by\halignand it can be implemented more general. But I understand that this is for somebody problem. – wipet May 01 '15 at 14:20amsmathwas a very skilled TeX programmer and he chose this approach. I'd be wary of offending his memory. If you think you can do better, why don't you offer your services to AMS or at least propose a different implementation that behaves the same? – egreg May 01 '15 at 14:25