Forgot password?
 Create new account
View 1547|Reply 4

有没有能做历史时间轴的tikz插件。

[Copy link]

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

abababa Posted at 2020-1-5 20:18:10 |Read mode
如题。例如公元10年,20年……各年份发生的一些大事记,要做成像数轴一样的时间轴,然后点击年份,可以弹出像对话框一样的东西,里面详细记述了这年发生的事。有的还有某个月份发生的事。
我想达到的是这样的:
  1. \things{
  2.     \yearandmonth{-221}{}{秦将王贲灭齐,秦统一六国}
  3.     \yearandmonth{10}{2}{王莽开始先后实行对盐、铁、酒专卖、政府铸钱等的收税}
  4. }
Copy the Code
然后可以自动生成那个时间轴,并且当长度超过页面时,能自动换行。

701

Threads

110K

Posts

910K

Credits

Credits
94167
QQ

Show all posts

kuing Posted at 2020-1-10 15:04:44
cnblogs.com/SivilTaram/p/4842588.html 这样的?

在 tex.stackexchange.com 里搜 timeline 可以找到很多相关的帖子……

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2020-1-10 20:58:06
回复 2# kuing

谢谢,这个看过的,但是太长的话,好像不能自动换页。

701

Threads

110K

Posts

910K

Credits

Credits
94167
QQ

Show all posts

kuing Posted at 2020-1-10 21:05:10

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2020-1-12 19:58:40
回复 4# kuing

谢谢,最后用了longtable,以及另一个网上提供的自定义命令来做了这个。
  1. \newcommand\ytl[2]{
  2.         \parbox[b]{8em}{
  3.                 \hfill{\color{cyan}\bfseries\sffamily\scriptsize #1}~$\cdots\cdots$~
  4.         }
  5.         \makebox[0pt][c]{$\bullet$}\vrule\quad
  6.         \parbox[c]{15.5cm}{
  7.                 \vspace{7pt}\color{red!40!black!80}\raggedright\sffamily\scriptsize #2\\[7pt]
  8.         }
  9.         \\[-7pt]
  10. }
Copy the Code
然后
  1. \begin{longtable}{r}
  2. \captionsetup{labelformat=empty}
  3. \caption{中国历史纪年表}\\
  4. \ytl{-221}{秦统一中国}
  5. \ytl{-202}{西汉建立}
  6. \ytl{8}{新朝}
  7. \ytl{25}{东汉建立}
  8. \end{longtable}
Copy the Code
这样就能自动换页了。

手机版Mobile version|Leisure Math Forum

2025-4-20 22:00 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list