Fancy-preview

perl script for enhancing PDF documents written by LaTeX (Win/Linux)

Introduction

The script fancy-preview is a script which can be used to extract displayed equations, theorem-like environments, figures and bibliography references and attach this material as tooltip to LaTeX \ref, \eqref and \cite comand. This has been requested by several (pdf)(La)TeX users. See this link for some discussion and papers 1 and 2 as demos of interactive PDF with similar properties. Interested? Basicaly I converted the papers from the bottom of the current page to the fancytooltips enhanced versions by adding \usepackage{hyperref}, checking that each \bibitem is followed by blank line and compiling by "perl fancy-preview paper" instead of "pdflatex paper.tex". The compilation is about three times slower and the filesize about two times bigger.

Below you find static pictures, demo and real examples.

User documentation

For short explanation how to use the script see the manual to fancytooltips package, the comments inside the fancy-preview script itself and the help.

Pictures

Lemma (enviroment lemma):


Citation in text:


Displayed equation:


Citation in Theorem header:


Demonstration


Showcase

The examples have been compiled with the script compile and with the following files. Basicaly, you can find here PDF files with hyperref links. Each link is followed by a button in fancy-tooltiped version. This button is invisible in mathematical papers and blue soap in presentations. Mouseover action on this button opens the tooltip.

Presentations

Presentationenhanced PDFclassic PDFTeX source
presentation 1PDFPDFTeX
presentation 2PDFPDFTeX

Papers

Paperenhanced PDFclassic PDFTeX source
paper 2PDFPDFTeX
paper 4PDFPDFTeX
paper 5PDFPDFTeX
paper 6PDFPDFTeX
paper 7PDFPDFTeX
paper 8PDFPDFTeX
paper 9PDFPDFTeX

Demo files

Demoenhanced PDFclassic PDFTeX source
previewreferencesdemo PDFPDFTeX
biblatex-test PDFPDFTeX
fancy-preview-demo PDFPDFTeX

Complex demo files

Here you can find large presentations (screen versions of texbooks) created by fancy-preview script.

Known real world applications of fancytooltips or fancy-preview


Advanced configuration demo

All the files in the following table come from the same TeX source. The difference is only in the config files. Note the line \ifx\PreviewEnvironment\undefined\pagecolor{blue!10}\fi which sets the pagecolor only if the preview package is not active. Also note that all figures are inside minipage environments. This allows to extract figures either by extracting figure or minipage. The command line to produce these examples is fancy-preview ini-demo --ini_file=inifile.ini
ini filePDF sizepreview (click to download PDF file)comments
0.ini390.71 Kpic
  • the biggest filesize (pdfcrop)
  • two figures in one float are extracted together
  • no tooltip for remarks
1.ini224.67 Kpic
  • text in the tooltips is wrapped to different textwidth than in the original document
  • three compilations to split previews for Figures 2 and 3
2.ini222.06 Kpic
  • like the previous example, but we use blue soap to denote tooltips and the toltips to equations show the whole enclosing environment
  • the tooltip on the picture follows reference to equation (3)
3.ini224.46 Kpic
  • customized tooltip appearance(gradient, no shadow, bigger margins)
  • text in the tooltips is wrapped to different textwidth than in the original document
  • the punctation at the end of the tooltips to equations is thrown away

Installation

All operating systems: you can donwload the script here. You need pdflatex, fresh fancytooltips.sty and Acrotex eDucation Bundle (eforms.sty and insdljs.sty). You also need working Perl installation (is usually available in Linux, on Windows you can install from http://www.activestate.com/activeperl) You also need Perl library Config::IniFiles.

Tips for users

See the manual to fancytooltips and the examples.