<2->
在 beamer 中,我无法使用诸如和 之类的覆盖规范显示第二张幻灯片上的路径上方的文本onslide<2->
。该怎么办?
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}{}
\begin{tikzpicture}
% Error: giving up on this path
\draw (0,0) to node<2-> [sloped, above = 5pt] {text} (1,1);
% Error: giving up on this path
\draw (0,0) to \onslide<2->{node [sloped, above = 5pt] {text}} (1,1);
\end{tikzpicture}
\end{frame}
\end{document}
答案1
没有问题overlay-beamer-styles
。
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}{}
\begin{tikzpicture}
\draw (0,0) to node [visible on=<2->,sloped, above = 5pt] {text} (1,1);
\end{tikzpicture}
\end{frame}
\end{document}