譜系樹:最小的沙鐘範例

譜系樹:最小的沙鐘範例

我在使用套件 Genealogytree 和文件文件時遇到問題在 CTAN 上發現看起來很複雜。

有人能給我一個沙鐘圖的最小例子嗎(兩個兄弟姐妹共享兩個父母,每個人都有一個孩子)?

答案1

\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}

\section{A rendition of the desired result}
minimal example of a sand clock graph \\two siblings \textbf{sonA, daughterB} \\sharing two parents \textbf{father, mother} \\and each having a child \textbf{sonA1, daughterA2, daughterB1, daughterB2}
\section{Things to keep in mind}
sandclock must have a \textbf{child} node\\there can be a \textbf{mix} of child and parent nodes\\every node with prefix \textbf{g, p} will render in the same row\\ every node with prefix \textbf{g,c} will render in the same row\\you have to finish the tree in \textbf{one sitting} else lose track of the flow\\

    \begin{genealogypicture}
            [template=formal graph]
            sandclock{ 
            child{
                g[male]{father}                 p[female]{mother}           
                child{
                    g[male]{sonA}
                    c[male]{sonA1}              c[female]{daughterA2}
                        }
                child{
                    g[female]{daughterB}
                    c[female]{daughterB1}   c[female]{daghterB2}
                        }
                    }
            parent{
            g[male]{grandfather}    
                        }
            parent{
            g[female]{grandmother}
                        }
        }
    \end{genealogypicture}




\end{document}

在此輸入影像描述

相關內容