# Is is possible to associate part of a drawing to a pdfcomment (or similar) interactive bubble?

It is apparently possible to put a TikZ drawing inside a pdfcomment (but using mbox).

Is is possible to associate only part of a drawing (e.g. a line) to a pdfcomment? Below it is the suggested code.

I am open to use other interactive packages (similar to pdfcomment) if that can solve the problem. The final goal is to associate individual curves in a pgfplot to a tooltip when dragging the mouse.

\documentclass[]{article}
\usepackage{tikz}
\usepackage[]{pdfcomment}
\begin{document}

%ok
\pdfmarkupcomment[]{
text
}{
a paragraph
}

% ok but needs mbox
\pdfmarkupcomment[]{
\mbox{
\begin{tikzpicture}
\draw(0,0)--(1,1);
\draw(0,1)--(1,0);
\end{tikzpicture}}
}{
a drawing
}

%not ok (Error: Missing } inserted.)
\begin{tikzpicture}
\pdfmarkupcomment[]{
\draw(0,0)--(1,1);
}{
a line
}
\draw(0,1)--(1,0);
\end{tikzpicture}

\end{document}

-
I think you will be interested in the ocgx package; on this site have a look to Explanatory bubbles in beamer the Interactive word explanation part, Interactive PDF, Latex and Article of the Future and tex.stackexchange.com/questions/65096/… –  Claudio Fiandrino Dec 27 '12 at 10:48
Another possibility is Acrotex: see as reference Mouseover events in beamer: hovering on \eqref and a comment containing the original equation popping up –  Claudio Fiandrino Dec 27 '12 at 10:49
@ClaudioFiandrino, this method looks the most promising tex.stackexchange.com/a/84754/1871. While ocg is probably the most general, I am trying to avoid external scrips and Acrotex dependency. –  alfC Dec 28 '12 at 0:39
Please try the fancytooltips package. –  Malipivo Apr 14 '14 at 14:10