如何将我的配偶添加到我的家谱中?

如何将我的配偶添加到我的家谱中?

我已开始绘制家谱。如何将我的配偶添加到图表中?

我似乎无法使用union里面的节点parent

\documentclass[11pt]{book}
\usepackage[all]{genealogytree}
\gtrset{highlight/.style={pivot,box={colback=yellow!20,no shadow,fuzzy halo}}}

\begin{document}
\begin{tikzpicture}
\genealogytree[template=signpost]{
    parent{
        g[highlight,female]{Me}
        c[female]{Sister}
        parent {
            c[male]{Uncle}
            c[female]{Aunt}
            g[male]{Father}
            p[male]{F}
            p[female]{G}
        }           
        parent{
            g[female]{Mother}
            parent{
                g[male]{Grandfather}
                p[female]{J}
                p[female]{K}
            }

            p[female]{Grandmother}
            c[female]{Aunt}             
        }
    }
}           
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

在此处输入图片描述

\documentclass[11pt]{book}
\usepackage[all]{genealogytree}
\gtrset{highlight/.style={pivot,box={colback=yellow!20,no shadow,fuzzy halo}}}

\begin{document}
\begin{tikzpicture}
\genealogytree[template=signpost, 
                id suffix=@z
                ]
                {%
    parent{ g[highlight,female, id=Me]{Me} c[female]{Sister} 
        parent { c[male]{Uncle} c[female]{Aunt} g[male]{Father}
                    p[male]{F} p[female]{G}
        }           
        parent{ g[female]{Mother}c[female]{Aunt} 
                    p[female]{Grandmother}
            parent{ g[male]{Grandfather}
                   p[female]{J} p[female]{K}
            }               
        }
    }
}        
\genealogytree[id suffix=@b,
                set position=me@b at Me@z,
                ]
{
    child[id=DoeJones]{%
                        g[id=me,male,box={colback=red!30!white}]{Me}
                                        p[id=spouse, male, tikz={xshift=-5cm}]{Spouse}
                                        }
                        }
\end{tikzpicture}
\end{document}

编辑

为了满足水平连接边缘Mespouse添加

\draw [red, line width=2pt, dashed] (Me@z) to (spouse@b);

就在之前\end{tikzpicture}

并添加disconnect到“我和配偶”的选项中以删除默认边缘样式

在此处输入图片描述

平均能量损失

\documentclass[11pt]{book}
\usepackage[all]{genealogytree}
\gtrset{highlight/.style={pivot,box={colback=yellow!20,no shadow,fuzzy halo}}}
\usepackage{calc}
\begin{document}
\begin{tikzpicture}
\genealogytree[template=signpost, 
                id suffix=@z
                ]
                {%
    parent{ g[highlight,female, id=Me]{Me} c[female]{Sister} 
        parent { c[male]{Uncle} c[female]{Aunt} g[male]{Father}
                    p[male]{F} p[female]{G}
        }           
        parent{ g[female]{Mother}c[female]{Aunt} 
                    p[female]{Grandmother}
            parent{ g[male]{Grandfather}
                   p[female]{J} p[female]{K}
            }               
        }
    }
}        
\genealogytree[id suffix=@b,
                set position=me@b at Me@z,
                ]
{
    child[id=DoeJones]{
                        % g[id=Deir2012,female]{Deirdre\\\gtrsymBorn\,2012}
                        g[disconnect, id=me,male,box={colback=red!30!white}]{Me}
                                        p[disconnect, id=spouse, male, tikz={xshift=-5cm}]{Spouse}
                                        }
                        }
                        \draw [red, line width=2pt, dashed] (Me@z) to (spouse@b);

\end{tikzpicture}
\end{document}

相关内容