beamer:如何让 tikz spy 覆盖在框架的其他内容之上

beamer:如何让 tikz spy 覆盖在框架的其他内容之上

问题如下:
在幻灯片上,我有几个图形。我想依次放大整个图形或其中的一部分。我尝试使用tikz spy带有 tikzpicture 选项的库来实现spy using overlays这一点。原则上,这是可行的。图形的所需区域被放大到幻灯片上的所需位置,只是它被绘制在框架的其他内容下方,即背景中。我怎样才能将缩放的内容放在前面?以下 MWE 说明了这个问题(图形包含在 -package 中mwe)。

\documentclass[]{beamer}
\usepackage{mwe}
\usepackage{tikz}
\usetikzlibrary{spy}
\begin{document}

 \begin{frame}
    \begin{minipage}[l]{0.6\textwidth}
     \centering
     \begin{tikzpicture}[
      spy using overlays
     ]
     \node[inner sep=0pt]{\pgfimage[width=0.98\textwidth]{example-image-16x10}};
     \only<2>{\spy[overlay,width=7cm,height=2cm,magnification=2] on (0,0) in node[] at (2,-3);}
     \end{tikzpicture}
     some description

     \includegraphics[width=0.98\textwidth]{example-image-16x10}

     some description
    \end{minipage}%
    \hfill%
    \begin{minipage}[r]{0.35\textwidth}
     \centering
     \includegraphics[width=0.98\textwidth]{example-image-10x16}

     some description
    \end{minipage}%
\end{frame}
\end{document}

答案1

例如,您可以做这样的事情(需要一点润色,但我假设这些不是您的实际图像):

  \begin{frame}
      \centering
      \begin{tikzpicture}[
        spy using overlays
        ]
        \node (pic1) [inner sep=0pt] {\pgfimage[width=0.588\textwidth]{example-image-16x10}};
        \only<2>{
          \spy[overlay,width=7cm,height=2cm,magnification=2] on (0,0) in node[] at (2,-3);
        }
        \node [anchor=north, yshift=-.5pt] at (pic1.south) {some description};

        \node (pic2) [inner sep=0pt, anchor=north, yshift=-17.5pt] at (pic1.south) {\includegraphics[width=0.588\textwidth]{example-image-16x10}};
        \node [anchor=north, yshift=-.5pt] at (pic2.south) {some description};

        \node (pic3) [inner sep=0pt, anchor=west, xshift=20pt] at (pic1.south east) {\includegraphics[width=0.343\textwidth]{example-image-10x16}};
        \node [anchor=north, yshift=-.5pt] at (pic3.south) {some description};
      \end{tikzpicture}
  \end{frame}

在前台监视

相关内容