1. 是aligned,不是align!!
网上写的公式大多是这样的
\begin{equation}\label{eq:2}
\begin{align}
Q\left( {s,t} \right) = a{s^2} + 2bst + c{t^2} + 2ds + 2et + f
\end{align}
\end{equation}
但是报错:
! Package amsmath Error: Erroneous nesting of equation structures;
(amsmath) trying to recover with `aligned'.
! 包amsmath错误:方程结构嵌套错误;
(amsmath)尝试用`aligned'恢复。
See the amsmath package documentation for explanation.
Type H <return> for immediate help.
align换成aligned,不报错了
\begin{equation}\label{eq:2}
\begin{aligned}
Q\left( {s,t} \right) = a{s^2} + 2bst + c{t^2} + 2ds + 2et + f
\end{aligned}
\end{equation}
2. \begin{document}
重新运行报错
Runaway argument?
{2
! File ended while scanning use of \@LN.
<inserted text>
\par
l.30 \begin{document}
?
解决办法:关掉所有编译后,
选择:文件→删除辅助文件→选择所有→删除。
再次运行就可以了