我正在尝试在两个连续的帧中固定文本的位置。当我尝试叠印时,它可以工作,但两个帧的帧号保持不变。我怎样才能在第二帧上增加它?
我所拥有的例子:
\begin{frame}
Common text, that keeps its position in the two frames \\
\begin{overprint}
\onslide<1>
First slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
\onslide<2>
Second slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
Some more text
\end{overprint}
\end{frame}
第一张幻灯片显示“框架 - 6 / 10“第二个也显示”框架 - 6 / 10“。我希望它显示”框架 - 7 / 11“。有没有办法可以手动增加计数器?或者有更好的方法吗?
非常感谢。
答案1
你可以欺骗投影仪增加覆盖之间的帧数。
\documentclass{beamer}
\begin{document}
\begin{frame}
Common text, that keeps its position in the two frames \\
\begin{overprint}
\onslide<1>
First slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
\only<2>{\addtocounter{framenumber}{1}}
\onslide<2>
Second slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
Some more text
\end{overprint}
\end{frame}
\end{document}
答案2
从技术上讲,你们处于同一个网络中frame
,但滑动。为此,您应该将内容放在不同的frame
区域以腾出空间,或者使用框/\phantom
区域来复制overprint
区域:
\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/a/94159/5764
\begin{document}
\begin{frame}
Common text, that keeps its position in the two frames
First slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
\phantom{Some more text}
\end{frame}
\begin{frame}
Common text, that keeps its position in the two frames
Second slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
Some more text
\end{frame}
\end{document}
或者,您可以手动调整计数器frame
:
\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/a/94159/5764
\begin{document}
\begin{frame}
Common text, that keeps its position in the two frames
\begin{overprint}
\onslide<1>
First slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
\only<2>{\stepcounter{framenumber}}
\onslide<2>
Second slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
Some more text
\end{overprint}
\end{frame}
\end{document}
答案3
我刚刚得到一个解决方案垂直框:
\begin{frame} %1
\vbox to 0.13\textheight{%
Common text \\
}
\vbox to 0.45\textheight{%
First slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
}
\end{frame}
\begin{frame} %2
\vbox to 0.13\textheight{%
Common text \\
}
\vbox to 0.45\textheight{%
Second slide \\
Frame - \insertframenumber{} of \inserttotalframenumber \\
Some more text
}
\end{frame}