In LaTeX, how can I place text over an imported graphics object?

image, latex

Solution

You can use pgfonlayer and tikz. It is a bit complicated, but here is an example I have from a beamer presentation:

 \pgfdeclarelayer{foreground}
 \pgfdeclarelayer{background}
 \pgfsetlayers{background,main,foreground}
 \begin{tikzpicture}
 \begin{pgfonlayer}{foreground}
      \path  (1.0,2.0) node (c) {{\color{blue} Some info...}}
         (1.0,1.5) node (b) {{\color{blue}... which is cool!}};
 \end{pgfonlayer}
 \begin{pgfonlayer}{background}
   \path      (0,0) node (o) {
      \includegraphics[width=\textwidth]{./figures/somefigure.eps}};
 \end{pgfonlayer}
 \end{tikzpicture}

Problem

I have an image in the eps format that I want to include in my document. The image contains only the geometry of the object; it does not contain the necessary text. It has some arrows, and I'd like to add the text in LaTeX so the labels (which include math) look clean. How can I place an equation at a particular location over an imported figure?

Original source