I would like to get popups for acronyms giving their meaning at mouse hover.

The following works with pdflatex when viewed with acroread:

\newacro{ADS}{NASA Astrophysics Data System}

Hovering over an acronym as \acp{ADS} indeed shows its meaning.

It doesn't work in evince. So be it.

My big problem is that in MacOS Preview it works, but one sees ugly bad frames around each acronym making the text quite unreadable. My readers are likely to be Mac types, making this no go.


Kevin C: many thanks! The final item in your first link pointed me to the following solution, using another command from pdfcomment.sty:

%% popup acronym expansion

\gdef\acp#1{\pdfmarkupcomment[markup=Underline,color={1 1 1},author={{#1}}]{{#1}}{{\acl{#1}}}}

which together with \newacro{acronym}{full expansion} of the acronym-package indeed does the job, when the PDF is viewed in acroread and Adobe reader for Mac OS X. It does not open the popup in evince, okular, or Preview (Mac OS X built-in tool), but at least it does not generate the ugly black boxes in Preview, that I had from \pdftooltip. So I can stick these popups now in any PDF I produce and if my readers are smart enough to use Acrobat, they will get the popup explanation at any acronym they hover over. Should be standard in scientific papers! If they use another viewer, at least there is no fatal interference.

I hesitated about underlining such hoverable acronyms in blue, but chose not to mark the pop-ability at all. Let the reader discover by herself. Hence defining the white color.

Apologies for not knowing how to typeset the LaTeX code above. Typing in this site is fighting my emacs habits.

  • Acronyms should not have under lengths, so it should not be a problem. But in this case you better use opacity=0
    – Josef
    Feb 5 '15 at 18:19
  • Next problem: \pdfmarkupcomment doesn't seem to work with \input or \include files. Apparently soul.sty then does not write a .upb file. So the above only works for simple files.
    – Rob Rutten
    Feb 7 '15 at 21:09
  • Yes, it's a known problem and reported to the author of soulpos, but not fixed yet
    – Josef
    Feb 8 '15 at 7:54
  • related: tex.stackexchange.com/questions/132973/…
    – Josef
    Feb 8 '15 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.