![为什么不能编译?](https://linux22.com/image/363226/%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%8D%E8%83%BD%E7%BC%96%E8%AF%91%EF%BC%9F.png)
我有这个等式
\begin{equation}
\hat{H} = -\displaystyle\frac{\hslash^{2}}{2}\sum\limits_{\alpha=1}^{n}\frac{\nabla_{\alpha}^{2}}{M_{\alpha}} -\displaystyle\frac{\hslash^{2}}{2m_{e}}\sum\limits_{i=1}^{N}\nabla_{i}^{2} - \frac{e^{2}}{4\pi\epsilon_{0}}\sum\limits_{\alpha=1}^{n}\sum\limits_{i=1}^{N}\frac{Z_{\alpha}}{\vert\vec{r_{i}} - \vec{R_{\alpha}}\vert} + \frac{e^{2}}{4\pi\epsilon_{0}}\sum\limits_{\alpha\leq\beta}^{n}\frac{Z_{\alpha}Z_{\beta}}{\vert\vec{R_{\alpha}} - \vec{R_{\beta}}\vert} + \frac{e^{2}}{4\pi \epsilon_{0}}\sum\limits_{i\leqj}^{N}\frac{1}{\vert\vec{r_{i}} - \vec{r_{j}}\vert}
\end{equation}
并且 texmaker 返回以下错误:
! Undefined control sequence.
l.15 ...{2}}{4\pi \epsilon_{0}}\sum\limits_{i\leqj
}^{N}\frac{1}{\vert\vec{r_...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
答案1
无关:
- 都是多余
\displaystyle
的limits
- 方程式太长,文本宽度无法容纳,应该分成两行:
(图片上的红线表示文字边框)
\documentclass{article}
\usepackage{mathtools, amssymb}
%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{equation}
\begin{multlined}[0.8\linewidth]
\hat{H} = - \frac{\hslash^{2}}{2}
\sum_{\alpha=1}^{n}\frac{\nabla_{\alpha}^{2}}{M_{\alpha}}
- \frac{\hslash^{2}}{2m_{e}}\sum_{i=1}^{N}\nabla_{i}^{2}
- \frac{e^{2}}{4\pi\epsilon_{0}}\sum_{\alpha=1}^{n}
\sum_{i=1}^{N}\frac{Z_{\alpha}}{\vert\vec{r_{i}}
- \vec{R_{\alpha}}\vert} \\
%
+ \frac{e^{2}}{4\pi\epsilon_{0}}
\sum_{\alpha\leq\beta}^{n}\frac{Z_{\alpha}Z_{\beta}}{\vert\vec{R_{\alpha}}
- \vec{R_{\beta}}\vert}
+ \frac{e^{2}}{4\pi \epsilon_{0}}\sum_{i\leq j}^{N}\frac{1}{\vert\vec{r_{i}} - \vec{r_{j}}\vert}
\end{multlined}
\end{equation}
\end{document}
切题:
- 错误原因已在上面的评论中描述