# How can I write an equation in the label section?

Code:

\begin{figure}[ht]
\centering
\includegraphics[width=0.8\textwidth]{Images/Co2EOR.JPG}
\caption{.....}  }
\label{Cross-section  $$\textrm{CO}_{2}$$ EOR}
\end{figure}


Error Message:

"Missing \endcsname inserted.

\protect l.191 ...ction $\textrm {CO}_{2}$ EOR}{{5.1}{35}}

                                               The control sequence marked <to be read again> should not appear between \csname


and \endcsname."

• label is not the caption ... but a way to refer to the figure by using ref command ... So, a label like cc-Co-2 should be enough to be used. – koleygr Sep 30 at 11:19

\label{Cross-section-CO2-EOR}