LaTeX技巧890:用LaTeX生成一个竖直的时间线 您所在的位置:网站首页 时间轴时间线怎么画 LaTeX技巧890:用LaTeX生成一个竖直的时间线

LaTeX技巧890:用LaTeX生成一个竖直的时间线

2024-07-14 07:55| 来源: 网络整理| 查看: 265

\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} \captionsetup{singlelinecheck=false, font=blue, labelfont=sc, labelsep=quad} \caption{Timeline}\vskip -1.5ex \begin{tabular}{@{\,}r {\raggedright\arraybackslash}p{5cm}} \toprule \addlinespace[1.5ex] 1947 & AT and T Bell Labs develop the idea of cellular phones\\ 1968 & Xerox Palo Alto Research Centre envisage the 'Dynabook\\ 1971 & Busicom 'Handy-LE' Calculator\\ 1973 & First mobile handset invented by Martin Cooper\\ 1978 & Parker Bros. Merlin Computer Toy\\ 1981 & Osborne 1 Portable Computer\\ 1982 & Grid Compass 1100 Clamshell Laptop\\ 1983 & TRS-80 Model 100 Portable PC\\ 1984 & Psion Organiser Handheld Computer\\ 1991 & Psion Series 3 Minicomputer\\ \end{tabular} \end{table} \end{document}

这是我最后敲定的一个latex模版,它样子还是非常漂亮的。它是基于table改造而成的,我又将它略微改造,加进了我们的《小操作系统实验指导书》里。效果图如下:

略微改过的TimeLine

首先把以下部分加入导言区

\usepackage[utf8]{inputenc} \usepackage[TS1,T1]{fontenc} \usepackage{array, booktabs} \usepackage{graphicx} \usepackage[x11names]{xcolor} \usepackage{colortbl} \usepackage{caption} \definecolor{baseD}{HTML}{7CAFC2} %baseD是一个很柔和的蓝色,你可以在相关github主页找到base16色的图样。 \newcommand{\foo}{\color{baseD}\makebox[0pt]{\textbullet}\hskip-0.5pt\vrule width 1pt\hspace{\labelsep}}

把这些加入导言区后(如果你正常安装了texlive-full的话一般是不会提示需要安装额外的sty文件),想在某个地方插入这个“大事记”表的话就直接插入如下代码即可

\begin{table} \centering %大事表居中显示 \renewcommand\arraystretch{1.4}\arrayrulecolor{baseD} \captionsetup{singlelinecheck=false, labelfont=sc, labelsep=quad} \caption{Timeline}\vskip -1.5ex %vskip是标题到下面的表格的距离 \begin{tabular}{@{\,}r {\raggedright\arraybackslash}p{5cm}} %5cm这个参数是指表的总的宽度,如果想做得大一点就把5cm调整放大一点。 \toprule \addlinespace[1.5ex] %这个是表格的行距 1947 & AT and T Bell Labs develop the idea of cellular phones\\ 1968 & Xerox Palo Alto Research Centre envisage the 'Dynabook\\ 1971 & Busicom 'Handy-LE' Calculator\\ %加入的格式为 年份 & 事件 \\(用来换行) \end{tabular} \end{table}

后来发现这样的表会带上 Table x.x Timeline的标签,我比较讨厌Table的标签,所以把\caption{Timeline}使用\caption*{Timeline}替换即可做到无表标号的效果。 选自:http://www.cnblogs.com/SivilTaram/p/4842588.html



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有