TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like to prepare an interactive timeline graph (static on load, but dynamic on MouseHover event). Somehow is similar to the Stack-exchange reputation tab for an user. One classic example is here. When the page loads, it shows the graph with separate colored lines for every sites. But, on mouse hover at any point an interactive pop-up shows the status of reputation on that particular day of that user.

Since this is a regular task for me to prepare a Record Tracker every day. I wish to automate this by:

  • preparing a template for the report (containing only the graph),
  • connecting to an external CSV containing data, on which basis the report would be generated,
  • and finally add some interactivity like the previous link.

Connecting to database is some how I have managed using datatool package. But, I have no idea how to create a PDF file, that is static on load but dynamic on hover.

I have gone through some animated examples from animate package. But, not able to find any specific package to use in this occasion. Being less-known in this field, I wish if someone guides me to the way to get the solution.

I am unsure whether this could be done in LaTeX or not. Is this possible using LaTeX at all? Any help (either some code or pointing out some resources) is greatly appreciated.

share|improve this question
pdf allows a certain amount of interactivity but isn't that kind of "dynamic on hover" behaviour more suited to html/javascript, as in the example graphs that you gave? – David Carlisle Mar 23 '13 at 15:09
Thank you very much Sir, for your prompt response, to make me sure, that what I am trying to achive is impossible, as PDF does not supports something like hover events. I rather have to choose any other way. Thanks again Sir. – Cylian Mar 23 '13 at 16:52
I'm not saying it's impossible to do in pdf but pdf is at its heart a format for typeset text in a fixed layout, modern versions have more interactivity and javascript etc, but they are not supported in all pdf viewers and the more fluid html format just seems a better fit for that kind of thing – David Carlisle Mar 23 '13 at 17:01
Sir, I am going to be too rigid on this. As I am looking forward to get the job done byocgx. But, still I wonder if there is really a way to do the same thing with hover effect , no matter if only a few PDF browers supports that. And I would highly obliged if you point me to some of these resources. Thank you, Sir. – Cylian Mar 24 '13 at 7:43
My comment was just a general observation rather than something backed up with technical links. Glad to see you got up to date information in the other answer. (By the way, no need to be too formal around here, you can drop the "sir":-) – David Carlisle Mar 24 '13 at 10:06
up vote 6 down vote accepted

Sounds like a job for OCGs, if you do not insist on mouseover but can live with clicks. See parindent in TikZ node for my question on ocgx.sty. It can toggle the visibility of OCG layers.

Take also a look at the demo file of the package.

share|improve this answer
Well that's really cool! But, i think I have to update pacakes for this... As I am using MiKTeX 2.8. Anyway it seems to match my requirement. Thanks again for your help! – Cylian Mar 24 '13 at 7:34

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.