答案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}