我在第 38 行不断收到错误,提示“额外的对齐制表符已更改为 \cr”。

我在第 38 行不断收到错误,提示“额外的对齐制表符已更改为 \cr”。
\documentclass [12pt]{article}
\oddsidemargin=0pt
\topmargin=0pt
\textwidth=6.5in
\textheight=8.5in
\begin{document}
\begin{center}
{\large\bf\LaTeX\ Example 6}
\end{center}
We can typeset array structures
\begin{equation}
\mathbf{A}\times \mathbf{B}=\left|
\begin{array}{ccc}
\mathbf{i} & \mathbf{j}  & \mathbf{k} \\
     a_1  &      a_2        & a_3 \\
      b_1  &      b_2        & b_3
 \end{array}
 \right|
\end{equation}
\begin{quote}
\begin{verbatim}
\begin{equation}
\mathbf{A}\times \mathbf{B}=\left|
\begin{array}{ccc}
\mathbf{i} & \mathbf{j}  & \mathbf{k} \\
 a_1  &  a_2   & a_3 \\
 b_1  &  b_2   & b_3
\end{array}
\right|
\end{equation}
\end{verbatim}
\end{quote}
Or
\begin{equation}
\mathbf{A}=\left(
\begin{array}{ccc}
a_{11} & a_{12} & \cdots & a_{1n} \\
a_{21} & a_{22} & \cdots &  a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n1} & a_{n2} & \cdots & a_{nn}
\end{array}
\right)
\end{equation}
\end{document}

答案1

最后array你声明了三列,但实际使用了四列;添加另一列

\documentclass [12pt]{article}
\oddsidemargin=0pt
\topmargin=0pt
\textwidth=6.5in
\textheight=8.5in
\begin{document}
\begin{center}
\large\bfseries\LaTeX\ Example 6
\end{center}
We can typeset array structures
\begin{equation}
\mathbf{A}\times \mathbf{B}=\left|
\begin{array}{ccc}
\mathbf{i} & \mathbf{j}  & \mathbf{k} \\
     a_1  &      a_2        & a_3 \\
      b_1  &      b_2        & b_3
 \end{array}
 \right|
\end{equation}
\begin{quote}
\begin{verbatim}
\begin{equation}
\mathbf{A}\times \mathbf{B}=\left|
\begin{array}{ccc}
\mathbf{i} & \mathbf{j}  & \mathbf{k} \\
 a_1  &  a_2   & a_3 \\
 b_1  &  b_2   & b_3
\end{array}
\right|
\end{equation}
\end{verbatim}
\end{quote}
Or
\begin{equation}
\mathbf{A}=\left(
\begin{array}{cccc}
a_{11} & a_{12} & \cdots & a_{1n} \\
a_{21} & a_{22} & \cdots &  a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n1} & a_{n2} & \cdots & a_{nn}
\end{array}
\right)
\end{equation}

\end{document}

与问题无关,但\bf已过时;改用\bfseries;此外,center形成一个组,因此您不需要在其中明确分组:

\begin{center}
\large\bfseries\LaTeX\ Example 6
\end{center}

相关内容