5

I would like to plot an arrow with some years to remark in my resume presentation.

For example, in a slide like this:

enter image description here

I would place this arrow:

between the last line and the footnote of the slide.

enter image description here

The dates and date marks will appear as the presentation advances with the current years to talk about are in opaque color (2002 and 2005 in this example), and the past years change to be semitransparent or in a lower color (e.g., 2000 and 2001).

1 Answer 1

7

It is rather straightforward to do something along these lines with the aobs (aka overlay-beamer-styles) library. And sorry for not typing in your text, I am not good at Spanish.

\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}

enter image description here

As for the additional request:

\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}

enter image description here

FINAL EDIT(I hope): As for your second additional request: that's much easier (and I would actually be surprised if this has not previously been done, but I admit I am now too lazy to google).

\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}

enter image description here

6
  • I would like something similar to the solution you have just posted. I will have more than one item entry for the same plot of the evolution bar. For example, in the example slide of the question, there is one item related to 2002 and two items to the year 2005. The idea is to set opaque the color of the years that are currently exposed in the presentation and leave the rest in the grey color of your solution. Jun 28, 2018 at 18:54
  • I would like only to ask for one change to the second solution: start the slide with all the marks and years in grey and remark only the year of witch the current item is related. Jun 28, 2018 at 19:52
  • @user1993416 I have made yet another edit. Notice that by the rules of this site I am not supposed to do that. If you have a different question, ask a new question. The answers are not just for you, but for everyone, and people get confused when they see three different answers by one user on the same question. So I'd kindly ask you to make further additional requests in form of new questions.
    – user121799
    Jun 28, 2018 at 20:00
  • 1
    You are right. I will be more concise on the goals to achieve. Jun 28, 2018 at 20:39
  • Can you tell me what part of the code indicate the position of the triangles and the years along the arrow? I would like to add the year 2008 and 2015 too. Jun 28, 2018 at 20:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .