我需要在论文中包含更长的时间线,使用 chronology 包我几乎得到了想要的结果,但更长的时间线没有显示任何表示年份的垂直虚线(例如 -250、0、250...),看起来很糟糕。我尝试使用 tikz 重建类似的时间线,但显然没有足够的技能来获得更好的结果。我想,chronology 包本身没有解决这个问题的方法,但也许有人知道如何解决这个问题或以某种方式重新创建这样的时间线?非常感谢您的帮助,这里是 MWE:
% arara: pdflatex
\documentclass[fontsize=10pt,
]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[xindy]{imakeidx}
\usepackage{float}
\usepackage{lscape}
\usepackage{chronology}
\begin{document}
\begin{chronology}[250]{-500}{1675}{\textwidth}[100ex]
\eventpoint{-399}{Person 1 (\dag -399)}[black][25][25]
\eventpoint{-322}{Person 2 (\dag -348) and Person 3 (\dag -322)}[black][25][25]
\eventpoint{-232}{Person 4 (\dag -261) and Person 5 (\dag -232)}[black][25][25]
\eventpoint{-43}{Person 6 (\dag -43)}[black][25][25]
\eventpoint{65}{Person 7 (\dag 65)}[black][25][25]
\eventpoint{950}{Person 8 (\dag 950)}[black][25][25]
\eventpoint{1037}{Person 9 (\dag 1037)}[black][25][25]
\eventpoint{1198}{Person 10 (\dag 1198)}[black][25][25]
\eventpoint{1274}{Person 11 (\dag 1274) and Person 12 (\dag 1280)}[black][25][25]
\end{chronology}
\end{document}
答案1
这是一个chronos
版本。它目前依赖于内部命令,但如果我能想出一个可行的主意,我将不得不为此提供一个公共版本,也许还可以提供一些使旋转更容易的东西。
\documentclass[fontsize=10pt,american,
]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage{chronos}
\usetikzlibrary{arrows.meta}
\begin{document}
\noindent
\begin{chronos}
[
no colour rotation,
colour scheme=default,
date format={!q!Y},
year format={!q!Y},
frame=false,
every text tags+={font=\normalfont\footnotesize},
event/tag+={rotate around={45:([yshift=3pt]\csname chronos@digwyddiad@tikzname\endcsname)},tag anchor=west},
every event above,
text tag yshift'=3pt,
timeline={%
minor years=false,
timeline mark eras=false,
year zero,
year at era switch,
timeline era margin'=0pt,
step major years=250,
timeline years=below,
timeline font=\normalfont\footnotesize,
timeline line+={shorten >=5pt,shorten <=\timelineht,{Bar[width=3pt]}-{Latex[length=5pt]}},
timeline arrow,
dates={-500}:1675,
width'=.9\textwidth,
},
]
\chronosevent{%
date={-399},
text content={Person 1 (\dag -399)},
name=p1,
}
\chronosevent{%
date={-322},
text content={Person 2 (\dag -348) and Person 3 (\dag -322)},
name=p23,
}
\chronosevent{%
date={-232},
text content={Person 4 (\dag -261) and Person 5 (\dag -232)},
name=p45,
}
\chronosevent{%
date={-43},
text content={Person 6 (\dag -43)},
name=p6,
}
\chronosevent{%
date={65},
text content={Person 7 (\dag 65)},
name=p7,
}
\chronosevent{%
date={950},
text content={Person 8 (\dag 950)},
name=p8,
}
\chronosevent{%
date={1037},
text content={Person 9 (\dag 1037)},
name=p9,
}
\chronosevent{%
date={1198},
text content={Person 10 (\dag 1198)},
name=p10,
}
\chronosevent{%
date={1274},
text content={Person 11 (\dag 1274) and Person 12 (\dag 1280)},
name=p1112,
}
\end{chronos}
\end{document}