Beamer 演示文稿中带有日期的演变栏

Beamer 演示文稿中带有日期的演变栏

我想在我的简历中画一个箭头,标出一些年份作为纪念。

例如,在这样的幻灯片中:

在此处输入图片描述

我会放置这个箭头:

幻灯片的最后一行和脚注之间。

在此处输入图片描述

随着演示的进行,日期和日期标记将会出现,要讨论的当前年份将以不透明的颜色显示(本例中为 2002 年和 2005 年),而过去的年份则变为半透明或较低的颜色(例如,2000 年和 2001 年)。

答案1

aobs使用(又名)库来做类似的事情相当简单overlay-beamer-styles。抱歉没有输入您的文本,因为我不太会说西班牙语。

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
 \tikzset{
    unhighlight on/.style={alt={#1{fill=gray!30!white,color=gray!30!white}{fill=red!80!black,color=red!80!black}}},
}
\begin{document}
\begin{frame}[t]
\frametitle{A time line}
\begin{tikzpicture}
\draw[line width=2mm,-latex,red!20] (-0.2,0) -- (9,0);
\foreach \X [evaluate=\X as \Y using int(\X-2000),count=\Z] in {2000,2001,2002,2005}
{\pgfmathtruncatemacro{\W}{\Z+1}
\draw[unhighlight on=<\W->] ({\Y-0.2},-0.5) -- ({\Y+0.2},-0.5) -- (\Y,-0.1) -- cycle;
\node[anchor=south,unhighlight on=<\W->,fill=white] at (\Y,0.2) {\X};}
\end{tikzpicture}
\begin{itemize}
\item Novemeber 2000: marmots start hibernating
\pause
\item Semptember 2001: \dots
\pause
\item July 2002: \dots
\pause
\item May 2005: marmots awake from hibernation
\end{itemize}
\end{frame}
\end{document}

在此处输入图片描述

对于附加请求:

\documentclass{beamer}
\setbeamercovered{transparent}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
 \tikzset{
    unhighlight on/.style={alt={#1{fill=gray!30!white,color=gray!30!white}{fill=red!80!black,color=red!80!black}}},
}
\begin{document}
\begin{frame}[t]
\frametitle{A time line}
\begin{tikzpicture}
\draw[line width=2mm,-latex,red!20] (-0.2,0) -- (9,0);
\foreach \X [evaluate=\X as \Y using int(\X-2000),count=\Z] in {2000,2001,2002,2005}
{\pgfmathtruncatemacro{\W}{\Z+1}
\ifnum\Z=4
\draw[fill=red!80!black,color=red!80!black] ({\Y-0.2},-0.5) -- ({\Y+0.2},-0.5) -- (\Y,-0.1) -- cycle;
\node[anchor=south,color=red!80!black] at (\Y,0.2) {\X};
\else
\draw[unhighlight on=<\W->] ({\Y-0.2},-0.5) -- ({\Y+0.2},-0.5) -- (\Y,-0.1) -- cycle;
\node[anchor=south,unhighlight on=<\W->,fill=white] at (\Y,0.2) {\X};
\fi}
\end{tikzpicture}
\begin{itemize}
\item<1> November 2000: marmots start hibernating
\item<2> August 2001: marmots eat
\item<2> Semptember 2001: marmots eat
\item<3> July 2002: marmots eat
\item<4> May 2005: marmots awake from hibernation
\item<4> November 2005: marmots start hibernating again
\end{itemize}
\end{frame}
\end{document}

在此处输入图片描述

最终编辑(我希望):至于您的第二个附加请求:这要容易得多(如果以前没有这样做过,我实际上会感到惊讶,但我承认我现在懒得去谷歌搜索)。

\documentclass{beamer}
\setbeamercovered{transparent}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
 \tikzset{
    highlight on/.style={alt={#1{fill=red!80!black,color=red!80!black}{fill=gray!30!white,color=gray!30!white}}},
}
\begin{document}
\begin{frame}[t]
\frametitle{A time line}
\begin{tikzpicture}
\draw[line width=2mm,-latex,red!20] (-0.2,0) -- (9,0);
\foreach \X [evaluate=\X as \Y using int(\X-2000),count=\Z] in {2000,2001,2002,2005}
{
\draw[highlight on=<\Z>] ({\Y-0.2},-0.5) -- ({\Y+0.2},-0.5) -- (\Y,-0.1) -- cycle;
\node[anchor=south,highlight on=<\Z>,fill=white] at (\Y,0.2) {\X};
}
\end{tikzpicture}
\begin{itemize}
\item<1> November 2000: marmots start hibernating
\item<2> August 2001: marmots eat
\item<2> Semptember 2001: marmots eat
\item<3> July 2002: marmots eat
\item<4> May 2005: marmots awake from hibernation
\item<4> November 2005: marmots start hibernating again
\end{itemize}
\end{frame}
\end{document}

在此处输入图片描述

相关内容