我对 LaTeX 方程式编号有疑问。例如,我输入:
\begin{equation}\label{eq2}
A = \begin{pmatrix}
a_{11}x_{1} & a_{12}x_{2} &\space... & a_{1n}x_{n}
\\ a_{21}x_{1} & a_{22}x_{2} &\space ... & a_{2n}x_{n}
\\ \vdots & \vdots & \ddots & \vdots
\\ a_{m1}x_{1} & a_{m2}x_{2} & ... & a_{mn}x_{n}
\end{pmatrix}
\end{equation}
我期望得到正确的数字,但是我得到的是:
我的区块存在什么问题equation
?
答案1
\begin{equation}\label{eq2}
最后我终于找到了问题所在。我在公式的开头和结尾之间有多余的换行符。正确的代码是:
\begin{equation}\label{eq2}
A = \begin{pmatrix}
a_{11}x_{1} & a_{12}x_{2} &\space... & a_{1n}x_{n}
\\ a_{21}x_{1} & a_{22}x_{2} &\space ... & a_{2n}x_{n}
\\ \vdots & \vdots & \ddots & \vdots
\\ a_{m1}x_{1} & a_{m2}x_{2} & ... & a_{mn}x_{n}
\end{pmatrix}
\end{equation}