![使用动画智能图表时保留脚注](https://linux22.com/image/423339/%E4%BD%BF%E7%94%A8%E5%8A%A8%E7%94%BB%E6%99%BA%E8%83%BD%E5%9B%BE%E8%A1%A8%E6%97%B6%E4%BF%9D%E7%95%99%E8%84%9A%E6%B3%A8.png)
在我的 Beamer 演示文稿中,我有一个框架,其中我使用了动画智能图表,如下所示:
\begin{frame}{Title}
\smartdiagramset{description title text width=1.5cm,
description text width=11cm,description width=12cm, descriptive items y sep=55pt}
\smartdiagramanimated[descriptive diagram]{
{Step 1,{Defining Step 1}},
{Step 2,{Defining Step 2}},
{Step 3,{Defining Step 3}},
{Step 4,{Defining Step 4}}}
\end{frame}
问题是,我的页脚在动画播放过程中消失了,然后在动画播放完最后一步后,最后一张幻灯片会重复显示页脚。我的问题是如何让页脚在动画播放过程中出现并避免最后一张幻灯片重复显示?
答案1
问题基本上与tikzpicture 中的 \pause 中断了脚注线:不应\pause
在 tikzpicture 中使用,否则会发生不好的事情。
解决方案稍微复杂一些,因为暂停深深隐藏在智能图代码中:
\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{smartdiagram}
\makeatletter
\RenewDocumentCommand{\smartdiagramanimated}{r[] m}{%
\StrCut{#1}{:}\diagramtype\option
\IfNoValueTF{#1}{% true-no value 1
\PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
{Example: \protect\smartdiagram[flow diagram]}}
{%false-no value 1
\IfStrEq{\diagramtype}{}{%
\PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
{Example: \protect\smartdiagram[flow diagram]}
}{}
\IfStrEq{\diagramtype}{descriptive diagram}{% true-descriptive diagram
\begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
\foreach \subitem [count=\xii] in \smitem{%
\pgfmathtruncatemacro\subitemvisible{\xi}
\ifnumequal{\xii}{1}{% true
\visible<+->{\node[description title,drop shadow, smvisible on=<\subitemvisible->]
(module-title\xi) at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};}
}{}
\ifnumequal{\xii}{2}{% true
\visible<+->{\node[description,drop shadow,smvisible on=<\subitemvisible->]
(module\xi)at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};}
}{}
}%
}%
\end{tikzpicture}
}{}% end-descriptive diagram
}% end-no value 1
}% end-command
\makeatother
\begin{document}
\begin{frame}{Title}
\smartdiagramanimated[descriptive diagram]{
{Step 1,{Defining Step 1}},
{Step 2,{Defining Step 2}},
{Step 3,{Defining Step 3}},
{Step 4,{Defining Step 4}}}
\end{frame}
\end{document}
另一种方法可能是修补tikzpicture
(使用风险自负,不知道这可能会导致什么其他问题):
\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{smartdiagram}
\AtEndEnvironment{tikzpicture}{\onslide<1->}
\begin{document}
\begin{frame}{Title}
\smartdiagramanimated[descriptive diagram]{
{Step 1,{Defining Step 1}},
{Step 2,{Defining Step 2}},
{Step 3,{Defining Step 3}},
{Step 4,{Defining Step 4}}}
}
\end{frame}
\end{document}