40

I once saw a maths journal which offered PDFs of published papers, where the bibliographic references were formatted as PDF annotations: if you moused over a reference in the text, the bibliography entry would appear in a pop-up window, without having to jump to the end of the file and inevitably have to spend ages re-finding where you were in the text.

Does anyone know of a way of producing this effect automatically using BibTeX?

lockstep
  • 250,273

4 Answers4

27

Pop-up annotations can be made using the pdfcomment package, but I haven't seen an automatic way yet. But you could redefine a cite macro to use, for instance, \pdfmarkupcomment for the output.

doncherry
  • 54,637
Stefan Kottwitz
  • 231,401
  • Thanks for the suggestion; I've seen pdfcomment before, but I'm nowhere near competent enough with hacking LaTeX internals to know how to redefine \cite properly. – David Loeffler Aug 03 '10 at 10:27
  • 2
    @David Loeffler: I don't know how to view pdf pop-ups so I can't test the syntax, but if you can figure out from the pdfcomment documentation what exactly you want to do then redefining the \cite command is easy: \let\oldcite\cite \renewcommand{\cite}[1]{\pdfcomment{whatever the right syntax is}\oldcite{#1}}. Use # inside the \pdfcomment bit to get the label. (Note: this doesn't do quite everything because you'd need to load the bibliography entry in to that argument. That's a little more complicated.) – Andrew Stacey Aug 03 '10 at 17:49
  • 1
    As I just learned (http://tex.stackexchange.com/questions/815/how-to-instert-full-citation-instead-of-citation-key-list-of-authors-publicati) you can get the bibliography entry with the bibentry package. – Caramdir Aug 03 '10 at 18:32
  • Thanks for the excellent suggestion of using pdfcomment and bibentry; but I'm struggling to get this to work. Just redefining \cite to \pdfcomment{\bibentry{#1}}\oldcite{#1} produces errors by the thousand and corrupted output, because the output of bibentry contains LaTeX commands that aren't valid in a PDF comment. – David Loeffler Aug 04 '10 at 12:08
  • See recent related (might be duplicate) posts. http://tex.stackexchange.com/questions/84681/interactive-pdf-latex-and-article-of-the-future/85910#85910, http://tex.stackexchange.com/questions/82336/mouseover-events-in-beamer-hovering-on-eqref-and-a-comment-containing-the-orig – hpesoj626 Dec 23 '12 at 14:52
  • Reading through all the linked stuff, it seems that all those pdfannot, and pdfcomment, and fancy-preview solutions require Acrobat Reader, right? – mafp Dec 23 '12 at 22:08
11

Non-answers that help even if you don't have the source code available:

  • Some PDF viewers display hyperlink popups automatically; at least Skim.app does that. You don't need to do anything in Latex; just use hyperref as usual and open the document in Skim.

  • Most modern PDF viewers have a "back" button, just like a web browser. For example, if you click a hyperlink in Preview.app (built-in PDF viewer in Mac OS X), you can go back to where you were by pressing cmd-[.

Jukka Suomela
  • 20,795
  • 13
  • 74
  • 91
  • 1
    +1 for the non-answer. I was wondering how I got this effect without using anything special, and it was just Skim doing the right thing. – ShreevatsaR Aug 03 '10 at 17:42
5

You can use fancy preview:

Showing the bibliographic entry in a popup when you hover over the citation key

And refer to the following webiste for the details and requirements

http://user.mendelu.cz/marik/fancy-preview/

(I would've put this in a comment but I don't have enough reputation)

esperluette
  • 309
  • 5
  • 9
3

There is cooltooltips package that does what you need..