在 Beamer 中通过单击图片创建超链接

在 Beamer 中通过单击图片创建超链接

我在幻灯片上有 data.jpg tikzpicture,上面有一个按钮,上面写着“数据”,当我点击它时,我想转到标有数据的幻灯片。我该如何实现这一点。

\begin{frame}{}

\begin{tikzpicture}[
            scale = 1.0, % <-- modify this number for scaling up/down
            invisi/.style  = {circle, draw = white, minimum size = 5mm},

        ]
        \node[invisi] (0)  {\includegraphics[scale=0.2]{brokenRail.jpg}};
        \node[invisi] (1) [above left= 0.1 cm and 0.8 cm of 0 ]{\includegraphics[width=2.5cm, height=1.5cm]{data.jpg}};
        \node[invisi] (2) [above right=0.1 cm and 0.8 cm of 0] {\includegraphics[width=2.5cm, height=1.5cm]{prediction.jpg}};
        \node[invisi] (3) [below left= 0.1 cm and 0.8 cm of 0]  {\includegraphics[width=2.5cm, height=1.5cm]{unconstrained.jpg}};
        \node[invisi] (4) [below right= 0.1 cm and 0.8 cm of 0]  {\includegraphics[width=2.5cm, height=1.5cm]{constrained.jpg}};

             \draw (0) -- (1);
             \draw (0) -- (2);
             \draw (0) -- (3);
             \draw (0) -- (4);
    \end{tikzpicture}


\end{frame}


\begin{frame}{}[label=data]

The data is presented here

\end{frame}

答案1

您可以使用 使图像成为另一个框架的链接\hyperlink{<lebel name>}{\includegraphics{example-image-duck}

此外,标记框架的语法应该\begin{frame}[label=data]改为\begin{frame}{}[label=data]

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}

\begin{frame}{}

\begin{tikzpicture}[
            scale = 1.0, % <-- modify this number for scaling up/down
            invisi/.style  = {circle, draw = white, minimum size = 5mm},
        ]
        \node[invisi] (0)  {\includegraphics[scale=0.2]{example-image}};
        \node[invisi] (1) [above left= 0.1 cm and 0.8 cm of 0 ]{\hyperlink{data}{\includegraphics[width=2.5cm, height=1.5cm]{example-image-duck}}};
        \node[invisi] (2) [above right=0.1 cm and 0.8 cm of 0] {\includegraphics[width=2.5cm, height=1.5cm]{example-image}};
        \node[invisi] (3) [below left= 0.1 cm and 0.8 cm of 0]  {\includegraphics[width=2.5cm, height=1.5cm]{example-image}};
        \node[invisi] (4) [below right= 0.1 cm and 0.8 cm of 0]  {\includegraphics[width=2.5cm, height=1.5cm]{example-image}};

             \draw (0) -- (1);
             \draw (0) -- (2);
             \draw (0) -- (3);
             \draw (0) -- (4);
    \end{tikzpicture}


\end{frame}


\begin{frame}[label=data]

The data is presented here

\end{frame}

\end{document}

相关内容