[Tex/LaTex] Error of Argument of \caption@ydblarg has an extra }

floats

\begin{figure}[H]
 \centering
 \includegraphics[width=14cm]{Text/Images/phi_geometrical.jpg}
  \caption{Depiction of Azimuth Angle\begin{math}\;\phi_{geom}\;\end{math} in 2 
    dimensions}
  \label{fig:phi_geometrical}
   \end{figure}

I am facing the error. Can anyone help me how to solve this ?

Best Answer

\begin{math} is fragile and should be \protected or better replaced by $:

\documentclass{article}

\usepackage{here}
\begin{document}

\begin{figure}[H]
 \centering
% \includegraphics[width=14cm]{Text/Images/phi_geometrical.jpg}
  \caption{Depiction of Azimuth Angle \protect\begin{math}\;\phi_{geom}\;\protect\end{math} in 2 
    dimensions}
  \label{fig:phi_geometrical}
   \end{figure}

    But why not simply

    \begin{figure}[H]
 \centering
% \includegraphics[width=14cm]{Text/Images/phi_geometrical.jpg}
  \caption{Depiction of Azimuth Angle $\;\phi_{geom}\;$ in 2 
    dimensions}
  \label{fig:phi_geometrical}
   \end{figure}

\end{document}

enter image description here

Related Question