I've asked this a while ago but never got any answer. I also googled a
lot today and can't find a single working example...so here goes:
Does anyone know a way of having a tooltip or a popup display when I'm
hovering over a word in a PDF file created with PDFLaTeX??????
Martin
This will depend on the PDF viewer. Adobe acroread will produce a
"tooltip" of the URL of a hyperlink, but other PDF viewers do other
things. So even if you could fool hyperref into accepting arbitrary text
as a URL, you can't depend on what the PDF viewer will do with it.
Bob T.
It's what in the popup that "must" be a URL:
This is a \href{http://www.google.com}{link} to a web site.
But you'd have to re-define the \href macro to get it to accept
arbitrary text *in* the popup. There are options to control the
appearance of the hyper-linked text; for example,
\usepackage[urlcolor=black,colorlinks]{hyperref}
to avoid any change to the text.
Playing around with the specs and Acrobat Profesionnal, I found this,
which is kind of elegant:
\leavevmode\pdfstartlink user{/Subtype/Text/CA
0/Name/Comment/Contents(popup)>>}test\pdfendlink
It creates a Text Annotation of opacity 0 (/CA) around the "test".
Problem is, it works only with Reader 6 and up. Also, it works only
with PDFLaTeX and now you can't click on it if, for example, it is also
an hyperlink...
I'll work on it some more eventually...
Martin