![更改评论和死亡的顺序,家谱树](https://linux22.com/image/472620/%E6%9B%B4%E6%94%B9%E8%AF%84%E8%AE%BA%E5%92%8C%E6%AD%BB%E4%BA%A1%E7%9A%84%E9%A1%BA%E5%BA%8F%EF%BC%8C%E5%AE%B6%E8%B0%B1%E6%A0%91.png)
答案1
我不是专家genealogytree
,但基于官方文档,您可以使用\gtrDeclareDatabaseFormat
它来创建新的数据库格式。下面是一个名为 的格式myAwesomeFormat
:
\documentclass{standalone}
\usepackage{genealogytree}
\gtrDeclareDatabaseFormat{myAwesomeFormat}{%
}{
\gtrPrintName
\begin{gtrinfolist}
\gtrifcommentdefined{\gtrlistseparator\gtrPrintComment}{}%
\end{gtrinfolist}
\begin{gtreventlist}
\gtrifdatedefined{birth}{\gtrlistseparator\gtrPrintEvent{birth}}{}
\gtrifdatedefined{baptism}{\gtrlistseparator\gtrPrintEvent{baptism}}{}
\gtrifdatedefined{death}{\gtrlistseparator\gtrPrintEvent{death}}{
\gtrifdatedefined{burial}{\gtrlistseparator\gtrPrintEvent{burial}}{}
}
\end{gtreventlist}
\begin{gtrinfolist}
\gtrifprofessiondefined{\gtrlistseparator\gtrPrintProfession}{}
\end{gtrinfolist}
\gtrifdatedefined{marriage}{\tcbline\begin{gtreventlist}
\gtrlistseparator\gtrPrintEvent{marriage}\end{gtreventlist}}{}
}
\begin{document}
\begin{genealogypicture}[
processing = database,
database format = myAwesomeFormat,
node size = 4cm,
level size = 3.2cm,
list separators hang,
place text={\newline}{},
box={
fit basedim = 9pt,
boxsep = 2pt,
segmentation style = solid,
halign = left,
before upper = \parskip1pt,
\gtrDBsex
}
]
sandclock{
child{
g{
male,
name={Charles \surn{Smith}},
birth={1722}{London},
baptism={1722}{London},
comment={Copper smith, soldier. Invented the square wheel},
death={1764}{}{London}
}
}
child{
g{
female,
name={Jane \surn{Smith}},
birth={1724}{Southampton},
baptism={1724}{Southampton},
comment={Possibly a time traveler},
death={2023}{}{Manchester}
}
}
}
\end{genealogypicture}
\end{document}