10

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{equation}...\end{equation}).

\begin{figure}[h!]
  \caption{Caption}
  \centering
   \begin{overpic}[width=\textwidth]{ipad-frame.jpg}
    \put(150,140){
     \color{black
     \begin{equation} 
     \cos\alpha = \frac{u \times v}{|u| \times |v|}
     \end{equation}
     }
    }
   \end{overpic}
\end{figure}

Any way to solve this?

8

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}{%
     \begin{equation}
     \cos\alpha = \frac{u \times v}{|u| \times |v|}
     \end{equation}}}}
\end{overpic}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.