4

I often read scientific books on my iPad and I've come through this problem a lot : when I read something like

From equation (2.45), we can deduce that...

I often need to swipe back the screen a few times until I find the page where the equation is defined (which can be very tedious when repeated).

I was wondering if there was a way to make this simpler. For instance, I think it would be great if one just needed to touch the numbered equation for the equation to "pop-up" much like you can read the definition of a word by pressing on it (e.g. in iBooks and Kindle).

Is there a way to do this? Using an app or by changing the TeX code?

  • 3
    If you include the package hyperref those numbers become hyperrefs, which are clickable (there might be other packages with similar results). I don't know how an app should reliably find the correct equation. You might try searching for that number. The question all in all seems displaced in this forum, as it's not really about TeX (except for the one part I already answered in this comment), therefore I'm voting to close it as it is now as too broad. – Skillmon Jul 25 '17 at 15:29
  • With hyperref is easy to link "2.45" or even "equation (2.45)" to the origional equation. Jumping back is trickier - but good pdf viewers can jum back to the previous position. – samcarter_is_at_topanswers.xyz Jul 25 '17 at 15:29
  • 2
    The question is a good one and is different from what commenters hvae in mind. I think the OP wants the equation to `pop up' instead of having the pdf viewer jump to it. That should be feasible to implement, but I don't know of a package that does it. Perhaps this question will help: https://tex.stackexchange.com/questions/84681/interactive-pdf-latex-and-article-of-the-future/85910#85910 – JPi Jul 25 '17 at 16:44
  • 3
    @JPi that would be something other, but only be applicable by the author of the books he reads. For a way to create tooltips in LaTeX see for example here. But this depends on the PDF-Viewer in question (and I doubt that a mobile one does support it, but I don't know). – Skillmon Jul 25 '17 at 17:24
  • @Skillmon My reader (Sony DPTS1) would show tool tips. But I think OP looks for something automated, i.e. something that automatically provides a tool tip. I think I could throw something like that together, but don't have time right now. I might even use that myself: I like the idea a lot. – JPi Jul 25 '17 at 17:35
  • 2
    @JPi still the author (or the one who does have the tex-files) would have to do it, which is not the main use case described by OP. So even if you hook into the ref-family of macros, you would have to test/define which are displayable with tool tips and which not (imagine a complete section being a tooltip...). The idea is interesting and usable for own projects, but not really applicable in the described use case. When I have time, I'll try some things (currently I have a report which is due on Friday). – Skillmon Jul 25 '17 at 18:06
  • Thanks @Skillmon. I think OP just wants it for equations, which is presumably somewhat easier. – JPi Jul 25 '17 at 19:09
  • Apparently this package can do it with the help of a Perl script: https://www.google.com/url?sa=t&source=web&rct=j&url=http://ctan.mackichan.com/macros/latex/contrib/fancytooltips/fancytooltips.pdf&ved=0ahUKEwi17577s6XVAhUJGj4KHZW0DzoQFgg1MAU&usg=AFQjCNFC1rn3KXOQB9LylZ4vmNqcbAgyiA – JPi Jul 25 '17 at 21:54
  • I'd like to provide an answer. – JPi Jul 26 '17 at 12:34
  • 2
    On a mac the skim previewer does this by default. I don't know if a version exists for iPad – Andrew Swann Jul 26 '17 at 13:30
  • 1
    @samcarter unfortunately "good pdf readers" and tablets don't really go together – Chris H Jul 26 '17 at 14:27

1 Answers1

4

enter image description here

This can be done, albeit with significant caveats.

Caveat 1: This works for acrobat reader, but not for most other pdf readers.

Caveat 2: It's a hassle to install; see below.

Caveat 3: It won't work with all TeX engines: if you're using pdftex then you're ok.

Caveat 4; It doesn't pick up all reference commands, such as \cref from the cleveref package.

That said, here goes (assuming texlive; if you're on windows you likely have miktex)

  1. This uses the `fancytooltips` package which is in texlive, but fancytooltips requires the `acrotex` bundle, which for curious reasons appears not to be included in texlive. So you need to install acrotex, which you can download from ctan.
  2. Although fancytooltips is installed, the `fancy-preview` script is still gzipped. Find the file `fancy-preview.gz` on your system and ungzip it. Then make it executable.
  3. Try to run `fancy-preview` on the example code below. If it complains that `Config::IniFiles module` is missing or some such thing, then you have to install that. I achieved this by running cpan install Config::IniFiles .
  4. If it runs, then all should be fine. Just open up the pdf file in acrobat reader and enjoy. Note that if you run fancy-preview then you should *not* load the fancytooltips package in your LaTeX code; the manual doesn't tell you this, but it won't work if you do.
\documentclass{article}


\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{hyperref}


\begin{document}


\begin{equation}
y=e^{x'\beta+u} \label{eq}
\end{equation}

\lipsum[1-2]

blabla \eqref{eq}

\end{document} 
JPi
  • 13,595