# Is there a way to get \framezoom to do what I expected it would?

Before trying it, I thought \framezoom would make slides that looked something like this workaround:

\documentclass{beamer}
\usepackage{tikz}
\usepackage{graphicx}
\title{Zoomed Image}
\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}<1-2>[label=original]
\frametitle<1,3>{Image}
\frametitle<2>{Region of Interest}
\begin{center}
\begin{tikzpicture}
\node<1->[anchor=south west,inner sep=0] at (0,0) {\includegraphics[height=0.75\paperheight]{standardWheel} };
\draw<2>[red,ultra thick,rotate=53] (5.4,-0.4) ellipse (32pt and 18pt);
\end{tikzpicture}
\end{center}
\end{frame}

\begin{frame}{Caliper}
\begin{center}
\includegraphics[trim=800 900 1500 600,clip,height=0.75\paperheight]{standardWheel}
\end{center}
\end{frame}

\againframe<3->{original}

\begin{frame}{Next Slide}
This is the next slide.
\end{frame}


Please note that when you navigate through the resulting slides, you see the full image, (then the image with the Tikz drawing), then the zoomed image, then the full image, then the next slide. I tried a bunch of different things with \framezoom but I couldn't get any of them to navigate like that. The closest I was able to get was:

\documentclass{beamer}
\usepackage{graphicx}
\title{Zoomed Image}
\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}<1-2>[label=original]{An Attempt}
\frametitle<1,3>{Image}
\frametitle<2>{Region of Interest}
\framezoom<1><2>[border](2.5cm,2cm)(2cm,2cm)
\begin{centering}
\includegraphics[height=0.75\paperheight]{standardWheel}
\end{centering}
\end{frame}

\againframe<3->{original}

\begin{frame}{Next Slide}
next slide
\end{frame}

\end{document}


Even if I navigate through the slides by clicking instead of using the keyboard, I always end up showing the enlarged image twice. Once by clicking the button that \framezoom creates, (then clicking the enlarged image to return to the original image), then again when I click the slide with the original image to navigate to my next slide (I have to navigate through the enlarged image to continue my presentation). Is this how \framezoom was intended to work? If I add additional zoom locations to the image, I'll have to navigate through all the enlarged images to continue my presentation. I don't get it.

EDIT: Alternatively, does anyone know how to override the page down/arrow/click anywhere (as opposed to making a button hyperlink) command for one slide? Then I could set the target to the slide after the zoomed images.

The image is a JPG but this is just a test - when I put it into my presentation I intend to use an EPS. I'm compiling with pdflatex and using acroread to view since my version of evince (2.28.1) can't follow the zoomed image link back to the original image.

-

That's a tricky one, as the beamer manual only explains the "technical" aspects of \framezoom, but not how one is supposed to actually use the command. The good news, however, is that it is possible achieve what you want, using \againframe in combination with the right overlay specifications as hinted in the second \framezoom example in the documentation:

\documentclass{beamer}

\begin{document}

\begin{frame}<1>[label=zooms]
\frametitle<1>{The \TeX{} logo}
\frametitle<2>{The letter T''}
\frametitle<3>{The letter E''}
\frametitle<4>{The letter X''}
\framezoom<1><2>[border](0.1cm,0cm)(3.6cm,4cm)
\framezoom<1><3>[border](3.4cm,1.2cm)(2.7cm,4.1cm)
\framezoom<1><4>[border](5.7cm,0cm)(3.7cm,4cm)
{\scalebox{15}{\TeX}\\}
\end{frame}

\begin{frame}{Next Slide}
next slide
\end{frame}

\end{document}


The idea is to display only the first overlay of the full image slide in your actual presentation:

\begin{frame}<1>[label=zooms]


The rest of the overlays containing the \framezoom areas are "outsourced" to the end of the presentation using

\againframe<2->[noframenumbering]{zooms}


Like this, the enlarged frames don't disturb the course of your presentation, so you can proceed directly to "Next slide" from "The TeX logo" in the example. Note that the \againframe command has to be at the very end of your presentation.

Here you can see the sequence of frames for the above example. Clicking on one of the letters of the TeX logo takes you to the respective zoomed frame, another click brings you back (click on the image to see it full-size):

-
Lately I'm learning a lot of cool tricks from your beamer answers. Thanks a lot! –  percusse Mar 29 '12 at 12:15
@percusse Thank you, glad you like them! I'm still at the beginning of understanding the tightly interwoven beamer internals, but answering these questions helps me a lot :-) –  diabonas Mar 29 '12 at 17:15
oh, putting them at the end of the presentation is a good idea. i haven't tried this but the logic works for me. would it still work if i put the \againframe in the appendix/backup slides? –  asia1281 Apr 2 '12 at 5:00
@asia1281 No problem, as long as the zoomed frames are anywhere in your presentation, beamer hyperlinks them correctly. –  diabonas Apr 2 '12 at 6:48