How to create a timeline with LaTeX?

前端 未结 8 1502
感动是毒
感动是毒 2020-12-12 09:52

In history-books you often have timeline, where events and periods are marked on a line in the correct relative distance to each other. How is it possible to create somethin

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 10:23

    There is timeline.sty floating around.

    The syntax is simpler than using tikz:

    %%% In LaTeX:
    %%% \begin{timeline}{length}(start,stop)
    %%%   .
    %%%   .
    %%%   .
    %%% \end{timeline}
    %%%
    %%% in plain TeX
    %%% \timeline{length}(start,stop)
    %%%   .
    %%%   .
    %%%   .
    %%% \endtimeline
    %%% in between the two, we may have:
    %%% \item{date}{description}
    %%% \item[sortkey]{date}{description}
    %%% \optrule
    %%%
    %%% the options to timeline are:
    %%%      length The amount of vertical space that the timeline should
    %%%                use.
    %%%      (start,stop) indicate the range of the timeline. All dates or
    %%%                sortkeys should lie in the range [start,stop]
    %%%
    %%% \item without the sort key expects date to be a number (such as a
    %%%      year).
    %%% \item with the sort key expects the sort key to be a number; date
    %%%      can be anything. This can be used for log scale time lines
    %%%      or dates that include months or days.
    %%% putting \optrule inside of the timeline environment will cause a
    %%%      vertical rule to be drawn down the center of the timeline.
    

    I've used python's datetime.data.toordinal to convert dates to 'sort keys' in the context of the package.

提交回复
热议问题