写在前面
前阶段做了人生中第一个Beamer演示,总体感觉还不错,就是在TikZ绘制出来的图进行幻灯片切换的时候底栏不显示了,看了一些文档后才知道了问题所在。
问题
下面这个图就是问题所在,底栏直接消失了!?(请忽略我的配色。。)
对应的代码如下
\begin{frame}
\frametitle{\heiti 多维标度法的计算过程小结}
\begin{tikzpicture}
\onslide<1->{
\fill[cyan!20] (-3, 0) arc (90:-90:3);
\node [black, font=\LARGE] at (-1.75, -3) {\heiti \begin{tabular}{c}
计 \\ 算 \\ 步 \\ 骤
\end{tabular}};
\draw[gray!30, line width=3pt] (-3, .25) arc (90:-90:3.25);
}
\onslide<2->{
\fill[color=cyan!30!white] (-.8, -.5) ellipse (.22 and .28) node [black] {1};
\shadedraw[lightgray] (-.25, -.8) rectangle (2.85, -.2)
node[right, black] at (-.25, -.5) {\heiti \,确定研究的目的};
}
\onslide<3->{
\fill[color=cyan!30!white] (0, -1.5) ellipse (.22 and .28) node [black] {2};
\shadedraw[lightgray] (.8, -1.8) rectangle (4, -1.2)
node[right, black] at (.75, -1.5) {\heiti \,\,选择样品和变量};
}
\onslide<4->{
\fill[color=cyan!30!white] (.25, -2.5) ellipse (.22 and .28) node [black] {3};
\shadedraw[lightgray] (1, -2.8) rectangle (5.15, -2.2)
node[right, black] at (1, -2.5) {\heiti 计算样品间的距离矩阵};
}
\onslide<5->{
\fill[color=cyan!30!white] (.25, -3.5) ellipse (.22 and .28) node [black] {4};
\shadedraw[lightgray] (1, -3.8) rectangle (5.15, -3.2)
node[right, black] at (1, -3.5) {\heiti 分析样品间的距离矩阵};
}
\onslide<6->{
\fill[color=cyan!30!white] (0, -4.5) ellipse (.22 and .28) node [black] {5};
\shadedraw[lightgray] (.75, -4.8) rectangle (4.95, -4.2)
node[right, black] at (.75, -4.5) {\heiti 计算距离矩阵的古典解};
}
\onslide<7->{
\fill[color=cyan!30!white] (-.8, -5.5) ellipse (.22 and .28) node [black] {6};
\shadedraw[lightgray] (-.25, -5.8) rectangle (3.7, -5.2)
node[right, black] at (-.25, -5.5) {\heiti \,检验模型的拟合结果};
}
\end{tikzpicture}
\end{frame}}
问题解决
原因在那个幻灯片切换的命令\onslide
上,只需要将\onslide
改成\visible
就可以完美显示啦!不过也需要注意这个命令需要有大括号,没有的话可能会报错。
下面再贴上代码
\begin{frame}
\frametitle{\heiti 多维标度法的计算过程小结}
\begin{tikzpicture}
\visible<1->{
\fill[cyan!20] (-3, 0) arc (90:-90:3);
\node [black, font=\LARGE] at (-1.75, -3) {\heiti \begin{tabular}{c}
计 \\ 算 \\ 步 \\ 骤
\end{tabular}};
\draw[gray!30, line width=3pt] (-3, .25) arc (90:-90:3.25);
}
\visible<2->{
\fill[color=cyan!30!white] (-.8, -.5) ellipse (.22 and .28) node [black] {1};
\shadedraw[lightgray] (-.25, -.8) rectangle (2.85, -.2)
node[right, black] at (-.25, -.5) {\heiti \,确定研究的目的};
}
\visible<3->{
\fill[color=cyan!30!white] (0, -1.5) ellipse (.22 and .28) node [black] {2};
\shadedraw[lightgray] (.8, -1.8) rectangle (4, -1.2)
node[right, black] at (.75, -1.5) {\heiti \,\,选择样品和变量};
}
\visible<4->{
\fill[color=cyan!30!white] (.25, -2.5) ellipse (.22 and .28) node [black] {3};
\shadedraw[lightgray] (1, -2.8) rectangle (5.15, -2.2)
node[right, black] at (1, -2.5) {\heiti 计算样品间的距离矩阵};
}
\visible<5->{
\fill[color=cyan!30!white] (.25, -3.5) ellipse (.22 and .28) node [black] {4};
\shadedraw[lightgray] (1, -3.8) rectangle (5.15, -3.2)
node[right, black] at (1, -3.5) {\heiti 分析样品间的距离矩阵};
}
\visible<6->{
\fill[color=cyan!30!white] (0, -4.5) ellipse (.22 and .28) node [black] {5};
\shadedraw[lightgray] (.75, -4.8) rectangle (4.95, -4.2)
node[right, black] at (.75, -4.5) {\heiti 计算距离矩阵的古典解};
}
\visible<7->{
\fill[color=cyan!30!white] (-.8, -5.5) ellipse (.22 and .28) node [black] {6};
\shadedraw[lightgray] (-.25, -5.8) rectangle (3.7, -5.2)
node[right, black] at (-.25, -5.5) {\heiti \,检验模型的拟合结果};
}
\end{tikzpicture}
\end{frame}