家谱树沙钟

家谱树沙钟

我正在使用家谱树软件制作沙漏结构(见下面的图片和代码)。有没有办法添加姑姑或叔叔的家人?第二张图片是我想要得到的。

沙钟与受试物=g0

\genealogytree[template=signpost]
 {sandclock
  {parent{c[female]{sister in law}
       p[male]{father in law}p[female]{mother in law}  
       g[female]{wife} 
    } 
    parent[id=fam0]
    { g[id=g0,male]{g0} 
       parent{p[female]{grandmother}
              p[male]{grandfather}c[male]{uncle}
              g[id=p0,female]{mother} 
              } 
       parent{p[male]{grandfather} 
              p[female]{grandmother}
              g[male]{father} c[female]{aunt}
             } 
       c[id=c2,male]{brother} c[female]{sister}
     } 
      child[id=famp1]{p[male]{son in law}
                      c[female]{granddaughter}
                      g[id=p1,female]{daughter}
                      }   
      child{p[female]{daughter in law}
            g[id=gp1,male]{son}
            c[male]{grandson}
            } 
  }
 }

期望结果

答案1

在此处输入图片描述

aunt上面已经创建了代表A——aunt husband这是通过打开一棵新树并aunt在相同的坐标处创建一个节点来完成的——可以将其视为一个phantom aunt方便调用的haunt——现在我们可以连接到这个phantom节点并在侧面创建任何家谱aunt——我只创建了代表姑姑丈夫的 A 节点——我认为你将能够进一步繁衍

幽灵阿姨的代码

\genealogytree[set position=phantomaunt at aunt]{
      child{
            g[male,id=phantomaunt]{aunt}
            p{A}
      }}

在此处输入图片描述

数学家协会

添加了一些美化

\documentclass{article}
\usepackage[all]{genealogytree}
\usepackage[ngerman]{babel}
\usepackage{hyperref}
\usepackage{pdflscape}
\begin{document}
\thispagestyle{empty}

\begin{tikzpicture}
\genealogytree[template=signpost]{
 sandclock{
    parent{
          c[female]{sister in law}%
          p[male]{father in law}
          p[female]{mother in law}  
          g[female]{wife}} 
          parent[id=fam0]{
                          g[id=g0,male]{g0} 
                    parent{
                          p[female]{grandmother}
                          p[male]{grandfather}
                          c[male]{uncle}
                          g[id=p0,female]{mother}} 
          parent{
                p[male]{grandfather} 
                 p[female]{grandmother}
                 g[male]{father} 
                 c[female, id=aunt]{aunt}} 
                 c[id=c2,male]{brother} 
                 c[female]{sister}} 
          child[id=famp1]{%
                 p[male]{son in law}
                 c[female]{granddaughter}
                 g[id=p1,female]{daughter}}   
          child{
                p[female]{daughter in law}
                g[id=gp1,male]{son}
                c[male]{grandson}}}}
\genealogytree[set position=phantomaunt at aunt, options for family={auntA}
                                                {extra edges prepend={phantomaunt}{A}{
                                                foreground={red!25!yellow,line width=5pt}}}]{
  child[id=auntA, family box={colback=green!50}]{
        g[male,id=phantomaunt]{aunt}
        p[male, id=A]{A}
  }}
\end{tikzpicture}
\end{document}

相关内容