\begin{equation}
\centering \Large \textbf{$\lambda_{c} = \frac{18.64}{B \times E^{2} }$ }
\label{eq1:Critical wavelength}
\end{equation}
\begin{center}
\captionof
{equation}{where B is the bending magnet magnetic field ( B = 1T ) , E is the energy of the booster}
\end{center}
答案1
从片段制作测试文档
\documentclass{article}
\begin{document}
\begin{equation}
\centering \Large \textbf{$\lambda_{c} = \frac{18.64}{B \times E^{2} }$ }
\label{eq1:Critical wavelength}
\end{equation}
\begin{center}
\captionof
{equation}{where B is the bending magnet magnetic field ( B = 1T ) , E is the energy of the booster}
\end{center}
\end{document}
产生错误
! Missing $ inserted.
<inserted text>
$
l.6
?
因为数学模式不允许有空行。
删除空白行
LaTeX Font Warning: Command \Large invalid in math mode on input line 6.
所以删除\Large
你得到
! Undefined control sequence.
l.10 \captionof
按照或包\captionof
的定义,但添加caption
capt-of
\usepackage{capt-of}
定义\captionof
命令,但由于方程式字幕未设置,因此您得到
! Undefined control sequence.
<write> \@writefile{\ext@equation
}{\protect \contentsline {equation}{\prote...
l.14 \end{document}
?
由于方程式已经有方程式编号,因此很难猜测您希望单独编号的标题采用什么格式,因此我建议删除它。此外,\centering
和\textbf
在此上下文中没有执行任何操作,因此我认为您想要:
\documentclass{article}
\begin{document}
Some text
\begin{equation}
\lambda_{c} = \frac{18.64}{B \times E^{2} }
\label{eq1:Critical wavelength}
\end{equation}
where $B$ is the bending magnet magnetic field ($B = 1T$),
$E$ is the energy of the booster.
\end{document}