Search code examples
latextimeline

Add a "snake" on a timeline in LaTeX


I am working on a timeline with LaTeX and I would like to add a "snake/sawtooth" line during the long periods where nothing happens. In other words, I would like to know how to make the vertical line look different + add such a space between the 1979 and the 1997 date. Thanks for your help!

\documentclass[a4paper, twoside, 11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}
\usepackage{fourier, heuristica}
\usepackage{array, booktabs}
\usepackage{graphicx}
\usepackage[x11names]{xcolor}
\usepackage{colortbl}
\usepackage{caption}
\DeclareCaptionFont{blue}{\color{LightSteelBlue3}}

\newcommand{\foo}{\color{LightSteelBlue3}\makebox[0pt]{\textbullet}\hskip-0.5pt\vrule width 1pt\hspace{\labelsep}}

\begin{document}

\begin{table}
\renewcommand\arraystretch{1.4}\arrayrulecolor{LightSteelBlue3}
\begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}
\toprule
\addlinespace[1.5ex]
1979 & Référendum sur la dévolution de l'Écosse \newline (Oui: 51,6\%, Non: 48,4\%)\\
1997 & Référendum sur la dévolution de l'Écosse \newline (Oui: 74.3\%, Non: 25.7\%)\\
1998 & \textit{Scotland Act}\\
1999 & Création du parlement écossais à Holyrood\\
2007 & Élection du \textit{Scottish National Party} minoritaire\\
2011 & Élection du \textit{Scottish National Party} majoritaire\\
2012 & Accord d'Édimbourg\\
2013 & \textit{Scottish Referendum Act}\\
2014 & Référendum sur la sécession de l'Écosse \newline (Oui: 44,6\%, Non: 55,4\%)\\
\end{tabular}
\end{table}

\end{document} 

enter image description here


Solution

  • Not the most beautiful solution, but I hope it gives you good ideas:

    \documentclass[a4paper, twoside, 11pt]{report}
    \usepackage[utf8]{inputenc}
    \usepackage[TS1,T1]{fontenc}
    \usepackage{fourier, heuristica}
    \usepackage{array, booktabs}
    \usepackage{graphicx}
    \usepackage[x11names]{xcolor}
    \usepackage{colortbl}
    \usepackage{caption}
    \DeclareCaptionFont{blue}{\color{LightSteelBlue3}}
    
    \newcommand{\foo}{\color{LightSteelBlue3}\makebox[0pt]{\textbullet}\hskip-0.5pt\vrule width 1pt\hspace{\labelsep}}
    
    \usepackage{MnSymbol} %%%%%%%%%%
    
    \begin{document}
    
    \begin{table}
    \renewcommand\arraystretch{1.4}\arrayrulecolor{LightSteelBlue3}
    \begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}
    \toprule
    \addlinespace[1.5ex]
    1979 & Référendum sur la dévolution de l'Écosse \newline (Oui: 51,6\%, Non: 48,4\%)\\
    \multicolumn{1}{c}{}& \hskip -24pt \scalebox{5}{\textcolor{LightSteelBlue3}{$\downrsquigarrow$}} \\ %%%%%%%%%%%%
    1997 & Référendum sur la dévolution de l'Écosse \newline (Oui: 74.3\%, Non: 25.7\%)\\
    1998 & \textit{Scotland Act}\\
    1999 & Création du parlement écossais à Holyrood\\
    2007 & Élection du \textit{Scottish National Party} minoritaire\\
    2011 & Élection du \textit{Scottish National Party} majoritaire\\
    2012 & Accord d'Édimbourg\\
    2013 & \textit{Scottish Referendum Act}\\
    2014 & Référendum sur la sécession de l'Écosse \newline (Oui: 44,6\%, Non: 55,4\%)\\
    \end{tabular}
    \end{table}
    
    
    \end{document}
    

    enter image description here


    UPDATE

    Making just a blank space between two rows:

    %%...
    \begin{table}
    \renewcommand\arraystretch{1.4}\arrayrulecolor{LightSteelBlue3}
    \begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}
    \toprule
    \addlinespace[1.5ex]
    1979 & Référendum sur la dévolution de l'Écosse \newline (Oui: 51,6\%, Non: 48,4\%)\\ [30p pt]
    1997 & Référendum sur la dévolution de l'Écosse \newline (Oui: 74.3\%, Non: 25.7\%)\\
    1998 & \textit{Scotland Act}\\
    %%...
    \end{table}
    %%...