仅在覆盖区域内过渡

仅在覆盖区域内过渡

我希望\transpush\transcover仅在覆盖区域. 例如,它可以用于\transglitter

 \begin{block}{Transition in block}
\begin{overlayarea}{\textwidth}{3cm}
\only<1>{
This is the first text, which is to be covered}
\only<2>{This is a new text that covers the previous
\transglitter<2>[duration=1]}
\end{overlayarea}
\end{block}

但是当我使用

\begin{block}{Transition in block}
\begin{overlayarea}{\textwidth}{3cm}
\only<1>{
This is the first text, which is to be covered}
\only<2>{This is a new text that covers the previous
\transcover<2>[direction=90,duration=1]}
\end{overlayarea}
\end{block}

它不起作用。有人有解决办法吗?

MWE 可能看起来像这样:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usetheme{Berlin}

\begin{document}

\begin{frame}
\frametitle{Transition 1}
\begin{block}{Transition in block}
\begin{overlayarea}{\textwidth}{3cm}
\only<1>{
This is the first text, which is to be covered}
\only<2>{This is a new text that covers the previous
\transglitter<2>[duration=1]}
%works inside overlayarea
\end{overlayarea}
\end{block}
\end{frame}


\begin{frame}
\frametitle{Transition 2}
\begin{block}{Transition in block}
\begin{overlayarea}{\textwidth}{3cm}
\only<1>{
This is the first text, which is to be covered}
\only<2>{This is a new text that covers the previous
\transcover<2>[direction=90,duration=1]}
%works with whole slide
\end{overlayarea}
\end{block}
\end{frame}
\end{document}

答案1

覆盖始终适用于整个幻灯片。在第一个示例中,您不会注意到它,因为块外的文本是相同的,但请尝试:

\begin{frame} 
\frametitle{Transition 1} 
\only<1>{some text outside} 
\only<2>{other text} 
\begin{block}{Transition in block} 
\begin{overlayarea}{\textwidth}{3cm} 
\only<1>{ This is the first text, which is to be covered} 
\only<2>{This is a new text that covers the previous \transglitter<2>[duration=1]} %works inside overlayarea 
\end{overlayarea} 
\end{block} 
\end{frame} 

据我所知,覆盖动画也是来自 pdf 格式(与查看器交互)本身的东西,所以乳胶不会产生影响,页面的哪些部分在过渡中是动画,它始终是整个页面。

相关内容