在 Beamer 中:单击时放大图形,再次单击时缩小图形

在 Beamer 中:单击时放大图形,再次单击时缩小图形

我对 Beamer 完全陌生,想知道是否有办法先显示一帧中多幅图像的概览,然后通过单击每幅图像来填满屏幕,从而更详细地讨论每幅图像。帧的其他部分(如标题和说明)不必保持可见。我希望这可以在 Apple 的预览中实现。

这是一个最简单的工作示例,说明了我的布局

\PassOptionsToPackage{demo}{graphicx}
\documentclass[11pt]{beamer}
\usepackage{caption}

\begin{document}

\begin{frame}{Demo}
\centering
\includegraphics[width=0.45\textwidth,height=0.35\textheight]{demo1}
\hfil
\includegraphics[width=0.45\textwidth,height=0.35\textheight]{demo2}
\vspace{9pt}
\includegraphics[width=0.45\textwidth,height=0.35\textheight]{demo3}
\hfil
\includegraphics[width=0.45\textwidth,height=0.35\textheight]{demo4}
\captionof{figure}{Nice overview! Let's look get into more detail on each image.}
\end{frame}

\end{document}

在此处输入图片描述

答案1

再想想,用绝对坐标指定可点击区域的工作量太大了。

\documentclass[11pt]{beamer}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{mwe}

\begin{document}

\begin{frame}{Demo}
\hypertarget{Demo}{}
\centering
\hyperlink{demo1}{%
\includegraphics[width=0.45\textwidth,height=0.35\textheight]{example-image}}
\hfil
\hyperlink{demo2}{%
\includegraphics[width=0.45\textwidth,height=0.35\textheight]{example-image-a}}
\vspace{9pt}
\hyperlink{demo3}{%
\includegraphics[width=0.45\textwidth,height=0.35\textheight]{example-image-b}}
\hfil
\hyperlink{demo4}{%
\includegraphics[width=0.45\textwidth,height=0.35\textheight]{example-image-c}}
\captionof{figure}{Nice overview!. Let's look get into more detail on each image.}
\end{frame}

\begin{frame}{demo1}
\hypertarget{demo1}{}
\hyperlink{Demo}{
\hfil\includegraphics[width=.9\textwidth,height=.7\textheight]{example-image}}
\end{frame}

\begin{frame}{demo2}
\hypertarget{demo2}{}
\hyperlink{Demo}{
\hfil\includegraphics[width=.9\textwidth,height=.7\textheight]{example-image-a}}
\end{frame}

\begin{frame}{demo3}
\hypertarget{demo3}{}
\hyperlink{Demo}{
\hfil\includegraphics[width=.9\textwidth,height=.7\textheight]{example-image-b}}
\end{frame}

\begin{frame}{demo4}
\hypertarget{demo4}{}
\hyperlink{Demo}{
\hfil\includegraphics[width=.9\textwidth,height=.7\textheight]{example-image-c}}
\end{frame}
\end{document}

相关内容