Beamer Latex 中的现代时间线

Beamer Latex 中的现代时间线

我刚刚看到了一件令人惊奇的事情,它是由

\usepackage{moderntimeline}

但这仅适用于 moderncv 文档。我现在正在尝试构建一个 beamer latex,其中我确实需要一个时间轴,并且我希望使用这个包。我的标题如下:

\documentclass{beamer}
\usepackage[german]{babel}
\usepackage[latin1]{inputenc}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{amssymb}

\usepackage{beamerthemesplit}
\usetheme{PaloAlto}

\usepackage{tikz}
\usetikzlibrary{decorations}
\usepackage{textcomp} 
\usetikzlibrary{snakes}

\begin{document} ... \end{document}

我会非常乐意得到任何帮助。要了解我所寻找的内容,请参阅

在 moderncv 中设置日期时间轴

谢谢!祝好,maad

答案1

您将需要加载moderntimelineifthen包,在序言中添加一些来自的定义并进行一些进一步的调整;类似于以下示例所示的操作(允许在中moderncv使用\tlcventry、、和):\tllabelcventry\tldatecventry\tldatelabelcventrybeamer

\documentclass{beamer}
\usepackage[german]{babel}
\usepackage[latin1]{inputenc}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{decorations}
\usepackage{textcomp} 
\usetikzlibrary{snakes}
\usepackage{ifthen}
\usepackage[firstyear=1999,lastyear=2012]{moderntimeline}

\usepackage{beamerthemesplit}
\usetheme{PaloAlto}

\makeatletter
% change these colors according to your needs
\colorlet{color0}{blue}
\colorlet{color1}{olive}

\newcommand*{\hintfont}{}
\newcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}}
\newcommand*{\listitemsymbol}{a~}
\newcommand*{\cventry}[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\bfseries\raggedright #3}%
    \ifthenelse{\equal{#4}{}}{}{, \raggedright{\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{,  \raggedright#5}%
    \ifthenelse{\equal{#6}{}}{}{, \raggedright#6}%
    .\strut%
    \ifx&#7&%
      \else{\newline{}\begin{minipage}[t]{\linewidth}\small\raggedright#7\end{minipage}}\fi}}
\newcommand*{\cvitem}[3][.25em]{%
  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
      \raggedleft\hintstyle{#2} & {#3}%
  \end{tabular}%
  \par\addvspace{#1}}
\tlmaxdates{2001}{2012}
\newlength{\quotewidth}
\newlength{\hintscolumnwidth}
\setlength{\hintscolumnwidth}{0.175\textwidth}
\newlength{\separatorcolumnwidth}
\setlength{\separatorcolumnwidth}{0.025\textwidth}
\newlength{\maincolumnwidth}
\newlength{\doubleitemmaincolumnwidth}
\newlength{\listitemsymbolwidth}
\settowidth{\listitemsymbolwidth}{\listitemsymbol}
\newlength{\listitemmaincolumnwidth}
\newlength{\listdoubleitemmaincolumnwidth}

\setlength{\maincolumnwidth}{\dimexpr0.9\linewidth-\separatorcolumnwidth-\hintscolumnwidth\relax}
\makeatother


\begin{document}

\begin{frame}
\tlcventry{1999}{2002}{WYSIWYG User}{Unnamed Company}
{Somewhere}{}{Tried hard to typeset documents}

\tllabelcventry[magenta,below]{2002}{2003}{Jul.--Nov. 2002}
{Scribus Student}{GNU School}
{The Internet}{}{Tried Scribus for a short while}

\tldatecventry[brown]{2011}{Trusted TeX.SX user}{}{TeX.SX}
{The Internet}{}{Achived 20k reputation on TeX.SX}

\tldatelabelcventry[blue!70!black]{2008}{Christmas 2008}{Happy TeXer}{}{Home}
{Townville}{}{Received Don Knuth's \emph{3:16} as a gift.}
\end{frame}

\end{document}

在此处输入图片描述

相关内容