\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}
- 3
- 1
1 Answers
Making a test document from your fragment
\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}
Produces the error
! Missing $ inserted.
<inserted text>
$
l.6
?
as blank lines are not allowed in math mode.
Deleting the blank lines you get
LaTeX Font Warning: Command \Large invalid in math mode on input line 6.
so deletimg \Large
you get
! Undefined control sequence.
l.10 \captionof
as \captionof is defined by the caption or capt-of packages, but adding
\usepackage{capt-of}
defines \captionof command but as equations captioning is not set up you get
! Undefined control sequence.
<write> \@writefile{\ext@equation
}{\protect \contentsline {equation}{\prote...
l.14 \end{document}
?
as the equation already has an equation number it is hard to guess what formatting you would want for a separately numbered caption, so I suggest deleting this. Also \centering and \textbf are doing nothing in this context, so I think you want:
\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}
- 757,742

\captionofis not a standard command and is presumably the command that tex reported is undefined, although you did not show the error message, also\Largewill have generated a warning as size commands are invalid in math mode,\centeringalso does nothing useful insideequation– David Carlisle Dec 27 '21 at 22:05equation. – egreg Dec 27 '21 at 22:09\textbf{$...$}does nothing at all and it is very unusual to use captions with equations, the textwhere...would normally just be set as normal text after the equation. You have not provided a usable test document nor said what output you want, only provides a fragment that is really hard to guess what you want it to do. – David Carlisle Dec 27 '21 at 22:31