答案1
您可以通过调整几棵树的相对位置(例如用adjust position
)并链接家族(例如用add parent
)来表示复杂的树。
一旦关系写好,您就可以调整边的位置(例如使用edges down by
或pivot shift
)。
\documentclass{standalone}
\usepackage{genealogytree}
\begin{document}
\begin{tikzpicture}
\genealogytree{
child{
g{Grand Father 1}
p[id=grandmother2]{Grand Mother 1}
c[id=son1]{Son 1}
c[id=son2]{Son 2}
}
}
\genealogytree[
adjust position=grandfather2 right of grandmother2 distance 1.6cm,
add parent=son1 to fam_daughter1,
add parent=son2 to fam_daughter2
]{
child{
g[id=grandfather2]{Grand Father 2}
p{Grand Mother 2}
child[id=fam_daughter1, edges down by= 1 of 6, pivot shift=-2.6cm]{
g{Daughter 1}
c{Children 1}
}
child[id=fam_daughter2, edges up by= 1 of 6, pivot shift=-2.6cm]{
g{Daughter 2}
c{Children 2}
}
}
}
\end{tikzpicture}
\end{document}