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}
ocgxpackage; 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:48Acrotex: 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:49ocgis probably the most general, I am trying to avoid external scrips and Acrotex dependency. – alfC Dec 28 '12 at 0:39