After adding support for tooltips today in pdfcomment (\pdftooltip) I wanted to make a TikZ example with tooltip annotations.
Within \pdftooltip the annotated element is set into a box to measure the size, which does not work for parts of a TikZ graphic. There are workarounds (manual box or \textbullet) in the following example:
\documentclass{article}
\usepackage{tikz}
\usepackage{pdfcomment}[2011/05/19]
% http://svn.berlios.de/viewvc/pdfcomment/trunk/dev/tex/latex/pdfcomment/pdfcomment.sty?revision=11
\begin{document}
\begin{tikzpicture}[scale=1.5]
% Draw axes
\draw [<->,thick] (0,2) node (yaxis) [above] {$y$}
|- (3,0) node (xaxis) [right] {$x$};
% Draw two intersecting lines
\draw (0,0) coordinate (a_1) -- (2,1.8) coordinate (a_2);
\draw (0,1.5) coordinate (b_1) -- (2.5,0) coordinate (b_2);
% Calculate the intersection of the lines a_1 -- a_2 and b_1 -- b_2
% and store the coordinate in c.
\coordinate (c) at (intersection of a_1--a_2 and b_1--b_2);
% Draw lines indicating intersection with y and x axis. Here we use
% the perpendicular coordinate system
\draw[dashed] (yaxis |- c) node[left] {$y'$}
-| (xaxis -| c) node[below] {$x'$};
% Draw a dot to indicate intersection point
%% 1 - add a box manually %%
\fill[red] (c) circle (2pt);
\draw (c) node {\pdftooltip{\rule{0pt}{5pt}\rule{5pt}{0pt}}{This is the intersection point\textCR of the two lines!}};
%% 2 - use \textbullet, which produxes a size in a box %%
%\draw[red] (c) node {\pdftooltip{\textbullet}{This is the intersection point\textCR of the two lines!}};
%% 3 - produces an error %%
% "\fill[red] (c) circle (2pt);" can not be put in a box to measure the size
%\pdftooltip{\fill[red] (c) circle (2pt);}{This is the intersection point\textCR of the two lines!}}
\end{tikzpicture}
\end{document}

Is there a way that part of a TikZ graphic does produce a size when set into a box?
pdfcommentversion seems to not be on CTAN yet. Could you provide an alternative download link in the meantime? – Martin Scharrer May 19 '11 at 17:37