# Equation over picture (overpic)

Is there a way to place a mathematical equation over a picture? I am using the overpic package and \put command, but it doesn't work (\usemath, $$...$$).

\begin{figure}[h!]
\caption{Caption}
\centering
\put(150,140){
\color{black
$$\cos\alpha = \frac{u \times v}{|u| \times |v|}$$
}
}
\end{overpic}
\end{figure}


Any way to solve this?

you have to put the equation into a \parbox:

\documentclass{article}
\usepackage[abs]{overpic}
\usepackage{xcolor,varwidth}
\begin{document}

\begin{overpic}[grid,scale=0.5,unit=1mm]{tiger}
\put(30,60){\colorbox{white}{\parbox{0.4\linewidth}{%
$$\cos\alpha = \frac{u \times v}{|u| \times |v|}$$}}}
\end{overpic}

\end{document}