I thought it would be useful to have bibliographic entries displayed as a tooltip so readers are not interrupted by following hyperlinks or trying to find the Bibliography, so I created the following command:


Unfortunately this does not work. Instead of showing the bibliographic entry in the popup, it merely displays the citation key; i.e., the \fullcite command seems to have no effect. I believe the problem is related to argument expansion. Here is a MWE:



  author = {Blinder, Alan S.},
  year = {1974},
  title = {The economics of brushing teeth},
  journaltitle = {Journal of Political Economy},
  volume = {82},
  number = {4},
  pages = {887--891},

Hover over this citation: \annocite{Bli74}

The tooltip should contain the following text: \fullcite{Bli74}


Can anyone think of a solution, or better, a way to redefine biblatex' citation commands (e.g., \parencite, \cite) to do this automatically?

  • 2
    \fullcite is a \protected command. It cannot be expanded, because it contains something that isn't expandable, namely macro definitions. – TH. Apr 10 '11 at 1:28
  • You can probably duplicate \blx@citei@fullcite except save the text produced rather than typeset it and then use \pdfmarkupcomment. I don't have time to try it right now, myself. Maybe someone else can give it a go. – TH. Apr 10 '11 at 1:34
  • If you want to see it done right, try one of these open access articles. – Emre Aug 16 '11 at 21:57
  • @Emre The journal you linked i snot open-access, it seems. – matth Mar 19 '12 at 8:43
  • @matth Thanks for the notice. Try this PDF or search Google for recent articles. – Emre Mar 20 '12 at 4:20

The idea is to use the fancytooltips package. I will show schematically the process: to make my example compilable for everyone, I'll use the following bibliographical database (called biblio.bib):

    author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
    title = "The Latex Companion A",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"


    author = "Donald E. Knuth",
    title = "Tex and Metafont, New Directions in Typesetting",
    year = {1979{(}1950{)}},
    publisher = "American Mathematical Society and Digital Press",
    address = "Stanford"

First you need to create a .pdf file containing the \keytips commands and the text for the tooltips that will be used by the fancytooltips package. To create this .pdf document you can use LaTeX: in this example I used a file (called bibtips.tex) having the following aspect:







You need to use the \MyTip command for every bibliographical entry that will have a tooltip in your final document.

Compile this file in the standard way: pdflatex+bibtex+pdflatex+pdflatex to generate the references, one on each page, nicely framed, and with the corresponding \keytip command. The resulting .pdf file has to be in the same directory containing your main .tex file.

Now, your main document has to be something like the following (note that the value for the filename key is exactly the name of the .pdf file obtained in the previous step):







Compile this file in the standard way: pdflatex+bibtex+pdflatex+pdflatex and you'll see your citations with a blue balloon; if you move the mouse pointer to the active area, a tooltip will open displaying the complete bibliographical information corresponding to the citation.

Some remarks:

  1. Of course, you can obtain fancyer tooltips by changing the aspect of the references in the file bibtips.pdf.

  2. This approach doesn't work in all PDF viewers, since it requires cooperation with JavaScripts; you have to use Adobe Reader or Adobe Acrobat to see the tooltips.

  • 1
    Good solution. But could you say how to use it in XeLaTex? – filokalos Apr 10 '11 at 9:05
  • 1
    @filokalos: there's some incompatibility with fancytooltips and XeLaTeX (some driver option). If I have the time I will look into it. – Gonzalo Medina Apr 11 '11 at 20:28
  • 2
    @filokalos: fancytooltips might depend on some support for directly outputting PDF code. Maybe the difference is that the pdftex engine goes directly to PDF while xetex routes through DVI? Perhaps lualatex would work? – Sharpie Apr 11 '11 at 20:46
  • @Gonzalo Medina: Would it be possible to deposit somewhere a compiled version of your example, please? – Stephen Aug 20 '11 at 18:14
  • @Stephen: I could compile my example and upload it somewhere, but I don't know if the tooltips will then be visible. – Gonzalo Medina Aug 20 '11 at 22:59

Both Gonzalo Medina and Audrey posted an excellent solution. But the things are simpler now. See the fancy-preview webpage - based on the new version of fancytooltips (May 2012), preview.sty and some bash scripts you get tooltips for bibliographic entries, theorems, definitions, displayed equations etc. automatically.

Edit: Small example and screenshots are attached.

\usepackage{hyperref} % Important!

\begin{lemma}[Lemma from \cite{M}]\label{lemma}
  If $k<0$, then
  for every real number $x$.

Inequality \eqref{eq:1} in Lema \ref{lemma} can be proved easily. Is
more general than \cite[Theorem 3.4]{K}.

\bibitem[M]{M} Me: My book related to the problem (2006), 145 p.
  % The new line is important!

\bibitem{K} Karl: Karl's paper published in some minor proceedings, 
    a local conferrence organized by his university (2005), 23--25.
  % The new line is important!


The file in Adobe Reader

enter image description here

Ref M

enter image description here

Ref 1

enter image description here

Equation (1)

enter image description here

Lemma 1.

enter image description here

  • 3
    +1. Thank you for developing this. Is it possible to have it work with Xetex/Luatex and using a package, rather than a bash script? – Emre May 7 '12 at 20:03
  • 7
    Your answer would benefit if you made it more self contained by including a description of how to use that script and screenshots of its results. – N.N. May 7 '12 at 20:11
  • +1 biblatex doesn't print bibliography items via \bibitem, but this looks like a great solution for biblatex alternatives. Thanks for this (and the fancytooltips package). – Audrey May 7 '12 at 20:37
  • Emre: I have no experience with Xetex, but the answer is probably no, since it does not generate PDF directly. I have minor experience with luatex, but guess, it will work. – robert.marik.cz May 8 '12 at 15:10
  • 2
    I copied and pasted your example document into TeXMaker on my Windows 7 PC. When I compile I get the normal output, but the 'previews' don't work for me (in Adobe Reader) :( Is there something that I am missing? – User 17670 Oct 14 '12 at 11:11

After giving Gonzalo's nice answer a whirl, I put together some tweaks. Here's a summary.

  • Tooltip creation. A tooltip for every entry in the given bib file(s) can easily be created using \nocite{*}, \AtDataInput and list processing commands from etoolbox.

  • Tooltip location. By default tooltips appear at the top of the page in the presentation document, no matter where the active areas are located. We can move each tooltip closer to its active area by resizing the pages in the tooltips document and using the movetips option setting.

  • Citation commands. Instead of issuing the \tooltip command directly, tooltips can be incorporated into existing citation commands via the bibhyperref format. The starred variant of \tooltip allows us to separate the active areas for citation links and tooltips.

Here's an example of how all these ideas can be implemented.

% --- tooltips document

% Size page a little larger than the longest tooltip

  {\null\vfill% Move tooltip to bottom of page
           {\clearfield{extrayear}% Omit extraneous fields here
   \medskip% Leave space below tooltip to avoid obscuring text


% --- end of tooltips document

% --- presentation document

% Display nothing in "extratext" area following the tooltip (by default this
% area displays a speech bubble/balloon)

% Apply tooltip to "extratext" area just after inline citation links

% Define new citation commands that replace citation links with tooltips

% Apply tooltip to instance where numeric-comp uses \bibhyperref instead
% of bibhyperref format

\subsection*{Inline citations}
\textcite[10--15]{companion} showed that...
Filler text \parencites(e.g.)()[10]{companion}{cicero}{baez/article}.
Filler text.\supercite{bertram}
\subsection*{Footnote citations}
Filler text.\footcites{cicero}{companion}
Filler text.\footnote{See \smartcite{cicero}.}
\subsection*{More inline citations}
\textcites[10--15]{companion}[10]{cicero} show that...
Filler text \parencites(e.g.)()[10]{companion}{cicero}{baez/article}.
Filler text \tooltipcites(e.g.)()[10]{companion}{cicero}{baez/article}.
Filler text \parencite[e.g.][]{baez/article,bertram,cicero,kant:ku,companion}.
Filler text

enter image description here

Note the following:

  • I've used filecontents to just to keep all the code together.

  • The above formats can apply tooltips to any standard citation label, but \tooltip*/\tooltip needs to be applied directly whenever \bibhyperref is used instead of the format. The numeric-comp style's cite:dump macro is an example of this.

  • The load order of the fancytooltips and biblatex packages is intentional. If biblatex is loaded first in the presentation document, it will generate persistent "rerun LaTeX" messages.

  • Documents are best viewed at their full width. Otherwise you should consider making the tooltips half the \textwidth of the presentation document.

  • When you published your answer I thought about writing a note like this, but then I forgot. Better late than never: nice answer! – Gonzalo Medina May 19 '12 at 0:55
  • @Audrey: \supercite{bertram} in Inline citations actually adds extra vertical space between the current and the upper line. Might it be possible to change that? – maetra Oct 24 '12 at 16:07
  • @maetra Odd. I didn't notice that back then. This can't get fixed without adjustments to how fancytooltips sets the "extratext" area - something that I won't have time to look into for awhile. If you're willing to part with the bibliography links, you could use \DeclareFieldAlias{bibhyperref}{bibtooltip}. Otherwise you could try contacting Robert with a stripped-down MWE (i.e. without biblatex). – Audrey Oct 25 '12 at 3:42
  • @Audrey I tried to analyze this a bit more and found that the line spacing is correct in the article class if you use \tooltip instead of \tooltip* in \DeclareFieldFormat{bibhyperref}, but this doesn't work in beamer, so I posted a question here: tex.stackexchange.com/questions/79168/… – maetra Oct 26 '12 at 13:11
  • @maetra Yes, the new bibtooltip format I defined does the same thing. I don't think the culprit here is beamer, but \tooltip*. Unlike its unstarred variant, it sets an "extratext" area following the tooltip text. – Audrey Oct 26 '12 at 14:44

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.