column
is essentially minipage
and does not allow breaks accross frames. In a presentation, you should think of your audience and make the critical decisions about exactly how much material should be on each frame, what material is visible simultaneously.
The option [allowframebreaks]
is really intended for things such as bibliographies that are internally generated but may spill over several frames, and usual don't form a part of the main presentation. Indeed the beamer documentation says
- Do not use the option allowframebreaks except for long bibliographies.
- Do not use long bibliographies.
and later about [allowframebreaks]
The use of this option is evil. In a (good) presentation you prepare each slide carefully and think twice before putting something on a certain slide rather than on some different slide.
As @Daniel points out [allowframebreaks]
also switches off some beamer
presentation features such as overlays.
Use the overlay
option to your tikzpicture
; if additionally you use remember picture
, now you have access to the current page
nodes and you can place the spying glass on current page.center
, for example (this last part is, of course, optional; you can place the magnifying glass anywhere you want on the frame using absolute coordinates too); the important thing is to place the glass in a space that won't be occupied for object added after the glass (otherwise, those objects would overlap the glass).
Here's a little example:
\documentclass[10pt, compress]{beamer}
\usepackage{tikz}
\usetikzlibrary{spy}
\begin{document}
\begin{frame}
\begin{columns}[t]
\column{.3\textwidth}
\centering
\includegraphics[width=3cm,height=1.75cm]{example-image-a}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-a}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-a}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-a}
\column{.3\textwidth}
\centering
\includegraphics[width=3cm,height=1.75cm]{example-image-b}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-b}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-b}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-b}\\
\column{.3\textwidth}
\centering
\includegraphics[width=3cm,height=1.75cm]{example-image-c}\\
\parbox[c][1.75cm][c]{3cm}{%
\begin{tikzpicture}[
overlay,
remember picture,
spy using outlines={%
circle,
magnification=10,
size=5cm,
connect spies
}
]
\node[
inner sep=0pt,
anchor=west,
outer sep=0pt
]
{\pgfimage[width=3cm,height=1.75cm]{example-image-c}};
\only<2>{%
\spy[red!70!black] on (1.4,0.15) in node at (current page.center);
}
\end{tikzpicture}%
}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-c}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-c}
\end{columns}
\end{frame}
\end{document}
An animation of the output:
If you want to zoom on the whole image, you can adjust the magnification
, width
and height
keys (width
=magnification
ximage width
, height
=magnification
ximage height
):
\documentclass[10pt, compress]{beamer}
\usepackage{tikz}
\usetikzlibrary{spy}
\begin{document}
\begin{frame}
\begin{columns}[t]
\column{.3\textwidth}
\centering
\includegraphics[width=3cm,height=1.75cm]{example-image-a}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-a}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-a}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-a}
\column{.3\textwidth}
\centering
\includegraphics[width=3cm,height=1.75cm]{example-image-b}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-b}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-b}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-b}\\
\column{.3\textwidth}
\centering
\includegraphics[width=3cm,height=1.75cm]{example-image-c}\\
\parbox[c][1.75cm][c]{3cm}{%
\begin{tikzpicture}[
overlay,
remember picture,
spy using outlines={%
magnification=2.5,
width=7.5cm,
height=4.375cm,
connect spies
}
]
\node[
inner sep=0pt,
anchor=west,
outer sep=0pt
] (a)
{\pgfimage[width=3cm,height=1.75cm]{example-image-c}};
\only<2>{%
\spy[red!70!black] on (1.5,0) in node at ([xshift=-2cm]current page.center);
}
\end{tikzpicture}%
}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-c}\\
\includegraphics[width=3cm,height=1.75cm]{example-image-c}
\end{columns}
\end{frame}
\end{document}
Best Answer
You can use
\hspace
with a negativ length to shift the picture to the left. Pay attention: you must not have a blank line between\hspace
and\includegraphics
You could also automatically resize the picture according the available space: