我用了
\begin{matrix}
\ldots & 1 & 0 & 0 & 2 & 1 & | & 2 & 0 & 0 & 1 & \ldots \\
\ldots & & & & & 0 & | & 1 & & & &
\end{matrix}
但 Latex 说:
Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
我的错误在哪里?
答案1
看如何在 \bmatrix 中使用超过 10 个制表位?,但你可能想要别的东西:
\[
\begin{array}{@{} *{6}{c} | *{5}{c} @{}}
\dots & 1 & 0 & 0 & 2 & 1 & 2 & 0 & 0 & 1 & \dots \\
\dots & & & & & 0 & 1 & & & &
\end{array}
\]
与输出进行比较
\documentclass{article}
\usepackage{amsmath}
\setcounter{MaxMatrixCols}{12}
\begin{document}
\[
\begin{matrix}
\dots & 1 & 0 & 0 & 2 & 1 & | & 2 & 0 & 0 & 1 & \dots \\
\dots & & & & & 0 & | & 1 & & & &
\end{matrix}
\]
\end{document}