创建时间线图

创建时间线图

我是一名 LaTeX 新手用户,正在尝试创建类似如下的表格:

输出

我需要水平线和垂直线相交的圆圈,但不知道该怎么做。你能给我建议一下吗?

谢谢。这是我的代码

\documentclass{beamer}
\usetheme{Berlin}
\usecolortheme{beaver}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{itemize item}[circle]
\setbeamertemplate{enumerate item}[circle]

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number]
\usepackage{multicol}

\begin{document}
\begin{frame}{Literature}
\label{specific literature}
\begin{tabular}{ r r | c l } 
    Eren et al., (2019) &  & & \\ 
    \cline{2-2}
    & & &  \\
    Berrill et al., (2018) & & & \\ 
    & & & \\
    Lee et al., (2014) & & & Empirical Studies \\ 
    & & & \\
    Ayyagari and Kosová (2010) & & & \\ 
    & & & \\
    De Backer and Sleuwaegen (2003)& & & \\ 
    & & & \\ 
    & & &  \\
    Markusen and Venables (1999) & & & \\ 
    & & & \\
    Rodrìguez-Clare (1996)  & & & Theoretical Studies  \\ 
    & & & \\
    Grossman (1984) & & & \small    \hyperlink{literature}{\beamerskipbutton{Literature}} \\ 
\end{tabular}
\end{frame}
\end{document}

答案1

我用 ti 制作了与图片相同的布局当然是 Z。

输出

\documentclass{beamer}
\usetheme{Berlin}
\usecolortheme{beaver}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{itemize item}[circle]
\setbeamertemplate{enumerate item}[circle]

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number]
\usepackage{multicol}
\usepackage{tikz}

\begin{document}
\begin{frame}{Literature}
\begin{tikzpicture}[scale=0.5,every node/.style={outer sep=5pt}]
    %Notation: {year, the title of the event}
    %NOTE! Everyting is zero-based
    \def\ourInfo{{
        {"2016","Sometext here and there"},
        {"2017","long sometext here and there \\ sometext here and there sometext here and there"},
        {"2018","Another timline event that is in black"},
        {"2019","The last timline event that is also in black"},
    }}
    \pgfmathsetmacro{\length}{3}% Zero based.

    % Loop through the array containing all events.
    \foreach \i in {0, ..., \length}{
        \pgfmathsetmacro{\year}{\ourInfo[\i][0]}% Get the left cell (year)
        \pgfmathsetmacro{\eventName}{\ourInfo[\i][1]}% Get the right cell (event name)
        \draw[thick,red] (0,-2*\i-2)--(0,-2*\i);% Draw vertical line
        \ifnum \i=1 % Should be in red text
          \draw(0,-2*\i-1) node[red, right, align = left]{\eventName};% Display the event name
          \draw(0,-2*\i-1) node[red, left] {\year};
        \else % Should be in black text
           \draw(0,-2*\i-1) node[right, black]{\eventName};% Display the event name
           \draw(0,-2*\i-1) node[left] {\year};% Display the year
        \fi
    }
    % Draw the bullet with the dash
    \foreach \i in {0, ..., \length}{
        \filldraw[draw = white, fill = red,thick] (0,-2*\i-1) circle (5pt);
        \draw[thick,red] (-12pt,-2*\i-1)--(0,-2*\i-1);
    }
\end{tikzpicture}
\end{frame}
\end{document}

相关内容