在 beamer 中使用 tikzpicture 和 \pause 时页脚消失

在 beamer 中使用 tikzpicture 和 \pause 时页脚消失

我想要一种动画,点击后根节点的每个子节点都会出现。效果很好,只是页脚仅在幻灯片的所有动画完成后才会出现。也许有人可以帮助修复下面的最小可重现示例代码或提出其他解决方案。提前致谢。

\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[style=verbose]{biblatex}
\bibliography{biblio}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title[tikzpicture with beamer]{}

\begin{document}
\begin{frame}{tikzpicture}{}
\begin{tikzpicture}[node distance=3cm]

\node (root) [process] {root};
\node (child1) [process, below of=root, xshift=-4cm] {child1};
\draw [arrow] (root) -- (child1);

\pause 
\node (child2) [process, below of=root, xshift=0cm] {child2};
\draw [arrow] (root) -- (child2);

\pause 
\node (child3) [process, below of=root, xshift=4cm] {child3};
\draw [arrow] (root) -- (child3);

\end{tikzpicture}   

\end{frame}

\end{document}

答案1

在这种情况下不要使用\pause,这是一个非常粗糙的命令。你可以改用覆盖:

\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[style=verbose]{biblatex}
\bibliography{biblio}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikzset{
  startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30},
  io/.style={trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30},
  process/.style={rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30},
  decision/.style={diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30},
  arrow/.style={thick,->,>=stealth}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title[tikzpicture with beamer]{}

\begin{document}
\begin{frame}{tikzpicture}{}
\begin{tikzpicture}[node distance=3cm]

\node (root) [process] {root};
\node (child1) [process, below of=root, xshift=-4cm] {child1};
\draw [arrow] (root) -- (child1);

\node<+(1)-> (child2) [process, below of=root, xshift=0cm] {child2};
\draw<.(1)-> [arrow] (root) -- (child2);

\node<+(1)-> (child3) [process, below of=root, xshift=4cm] {child3};
\draw<.(1)-> [arrow] (root) -- (child3);

\end{tikzpicture}   

\end{frame}

\end{document}

在此处输入图片描述

相关内容