Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to get tooltips into a LaTeX pdf?

I am working on my CV. I would like to show some more information on my electronic version once you swipe over that field with the mouse. i.e. when swiping with the mouse over education I want to show my subjects taken in undergrad through a tooltip.

Is this possible and if yes would if work for all kind of pdf readers?

share|improve this question
Is it possible? Yes. Would it work for all kinds of PDF readers? Maybe not. –  Werner Jan 23 '14 at 5:37
How PDF viewers show 'hover text' is down the them, not the source (LaTeX or otherwise). Thus the best you can hope is to check with a set of viewers. –  Joseph Wright Jan 23 '14 at 6:58
You have alreay tagged with an according package name, cf. also Mouseover events in beamer: hovering on \eqref and a comment containing the original equation popping up. There is at least the package pdfcomments, as well. For the PDF readers: As example SumatraPDF does not at all execute such tooltips. –  Speravir Jan 23 '14 at 19:04
Also interesting: Showing the bibliographic entry in a popup when you hover over the citation key. Quite probably there are more of this. –  Speravir Feb 16 '14 at 23:45

2 Answers 2

up vote 7 down vote accepted

Finally I came up with a \tooltip command that works across a small number of PDF viewers, among which is an Open-Source one. The tooltip command allows for TeX-formatted tip texts.

It comes in to variants: \tooltip and \tooltip*.

In contrast to the un-starred \tooltip command presented in

Are mouse over definitions of acronyms possible?.

the command

\tooltip[<link colour>]{<link text>}[<tip box colour>]{<tip text>}

has the following restrictions:

  1. The tip text box is not draggable.
  2. The Link must be clicked once for the tip to show up and clicked once again to go away. Mouse-over and mouse-out are not enough.

These were necessary to meet the different PDF viewer capabilities.

Tooltips that become visible on mouse-over work only in Adobe Reader and can be inserted using the starred variant

\tooltip*[<link colour>]{<link text>}[<tip box colour>]{<tip text>}

The result was successfully tested in Evince (open-source!), Adobe Reader and PDF-XChange Viewer. The \tooltip requires package media9, version 0.49 (2015/01/21).


enter image description here


% for Evince (visible on click)
%   usage: \tooltip[<link colour>]{<link text>}[<tip box colour>]{<tip text>}
% optimized for Adobe Reader (visible on mouse-over)
%   usage: \tooltip*[<link colour>]{<link text>}[<tip box colour>]{<tip text>}


  \tpPdfObj{}{dict}{/Type/OCG/Name (tipOCG.\thetcnt)%
        /E<</S/SetOCGState/State [/ON \tpTipOcg]>>%
        /X<</S/SetOCGState/State [/OFF \tpTipOcg]>>%
      /Subtype/Link/Border [0 0 0]/A <</S/SetOCGState/State [/Toggle \tpTipOcg]>>
      /Subtype/Widget/FT/Btn/Ff 65537/T (tip:\thetcnt)%
      /AP<</N \tpPdfLastXform>>%
      /MK<</TP 1/I \tpPdfLastXform/IF<</S/A/FB true/A [0.0 0.0]>>>>%
      /OC \tpTipOcg
  \begin{tikzpicture}[overlay,remember picture]
    \path let \p0 = (0,0), \p1 = (current page.east) in
  Einstein's \tooltip{formula}{$E=m c^2$} is well known.
  Another famous formula is due to \tooltip{Pythagoras}{$a^2+b^2=c^2$}.
  This \tooltip*{tip}{is visible only in AR} is shown on mouse-over, but only in AR.
share|improve this answer

Tooltips in PDF documents are generally possible. I do know two packages; one of them you tagged yourself for your question, the other one I added, click on these tags to see, which questions were already asked in TeX.SX: & . But as Joseph Wright in a comment wrote:

How PDF viewers show 'hover text' is down the them, not the source (LaTeX or otherwise). Thus the best you can hope is to check with a set of viewers.

I can tell you, that SumatraPDF, a popular viewer for Windows, does not show any tooltip at all with “tooltip” in a strict meaning, but does show comments, when you hover with the mouse over one of them. What is supported, what not, can be seen when reading the documentation of package pdfcomment. There is a type \pdfmarkupcomment that actually almost acts like a tooltip.

See also this fixed bug in SumatraPDF Bug tracker: PDF Comments Don't Work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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