# How to magnify pre-selected text?

I want to be able to magnify (by say 2X) a group of equations in the output of PDFLaTeX by a single click on the box containing them. A second click is to revert to the previous state. The viewer is Adobe Reader.

-
Do you have an example PDF file that shows that PDF can do this? –  Peter Grill May 12 '12 at 4:47
The AcroTeX bundle can do this kind of thing. Have a look at their rollover demo. –  Stephan Lehmke May 12 '12 at 12:45
@PeterGrill Other the very useful link provided by Stephan there was this prototype tex.stackexchange.com/questions/12290/… but I had two problems 1) going back to previous view 2) feeding it a set of equations (as opposed to text) –  Maesumi May 12 '12 at 17:33

One solution would be to add two copies of the page to the document, one with the small formula and one with the enlarged formula. Then you can use hyperlinks to switch between the pages, effectively toggling the formula between the small and big version. As a proof of concept, try the TeX code below.

Here is the initial document:

Clicking on the formula yields:

Clicking again returns to the first image.

\documentclass{article}

\usepackage{hyperref}
\usepackage{amsmath}

\begin{document}
Click on the formula to make it bigger:
d\bigl(f(t, X_t)\bigr)
&= \frac{\partial}{\partial t} f(t, X_t) \,dt
+ \sum_{i=1}^d \frac{\partial}{\partial x_i} f(t, X_t) \,dX^{(i)}_t \\
&\hskip2cm
+ \frac12 \sum_{i,j=1}^d \frac{\partial^2}{\partial x_i \partial x_j} f(t, X_t)
\,dX^{(i)}_t \, dX^{(j)}_t,
\end{align*}}
Some more text could be here.

\newpage

Click on the formula to make it smaller:
d\bigl(f(t, X_t)\bigr)
&= \frac{\partial}{\partial t} f(t, X_t) \,dt
+ \sum_{i=1}^d \frac{\partial}{\partial x_i} f(t, X_t) \,dX^{(i)}_t \\
&\hskip2cm
+ \frac12 \sum_{i,j=1}^d \frac{\partial^2}{\partial x_i \partial x_j} f(t, X_t)
\,dX^{(i)}_t \, dX^{(j)}_t,
\end{align*}}
Some more text could be here.
\end{document}


The extra page(s) could be hidden at the end of the document to not disturb the normal sequence of pages.

-
Very interesting solution. Wondering why the bounding boxes are drawn so wacky? I added the two images, hope that is ok. –  Peter Grill Jun 24 '12 at 3:08
Thanks for the pictures. I guess the bounding boxes are just where the \hyperlink{} command is active. When \hyperlink starts, TeX is still in the middle of the paragraph, the line break etc. only happens in the \begin{align*}. So maybe things look tidier, if empty lines are added before and after the \hyperlink{}? –  jochen Jun 26 '12 at 10:38