I use psfrag to replace tags in figures by LaTeX text and formulas. Recently I wanted to go one step further, lets say I have a figure that has two tags in it "a" and "b", I'd like to have a nice arrow going from "a" to "b", so my idea was to create nodes using psfrag
\psfrag{a}{\tikz[remember picture]\node (A){a};}
\psfrag{b}{\tikz[remember picture]\node (B){b};}
then import the figure and then add the arrow
\tikz \draw[->, remember picture] (A) -- (B) ;
needless to say (?) it doesn't work.....psfrag is doing some clever things in the background, but the nodes that have created are not available for me later...
Any ideas on how I could either make psfrag work or get similar functionality (within my framework more-or-less)?

\tikz [overlay,remember picture]when drawing the path: Then the nodes are available to me. However, it seems likepsfragstacks all the nodes on top of each other to the left of the figure, and then shifts the output of the TikZ commands to their correct positions in the figure. TikZ doesn't know this, though, and does not update the coordinates. Try drawing a path with\tikz [overlay,remember picture] \draw (A.north west) -- (B.south east);to see what I mean. Looks like this won't work, unfortunately. – Jake Jan 22 '11 at 20:06\tikz [overlay,remember picture], the nodes are unknown and the attempt to draw the arrow fails. But I understand your comment to say that the arrow drawing succeeds. – orome Jun 12 '12 at 03:21