重叠的家谱

重叠的家谱

我正在尝试合并两棵家谱树,但它们有重叠。

\documentclass{article}
\usepackage[paperwidth=500mm,paperheight=500mm]{geometry}
\usepackage[all]{genealogytree}
\begin{document}
    \begin{tikzpicture}
        \genealogytree[template=signpost, id suffix=@main_tree]
        {
            child
            {
                g[male]{Arnaldo Moletti}
                p[female]{Santa Moletti}
                child
                {
                    g[male]{Luca Moletti}
                    c[female]{Santa Moletti}
                    c[female]{Rina Moletti}
                }
                child
                {
                    g[male]{Richetto Moletti}
                    p[female, id=matilde_oltre]{Matilde Oltre}
                    child
                    {
                        g[male]{Arnaldo Moletti}                        
                    }
                    child
                    {
                        g[female]{Lucrezia Moletti}                     
                    }
                }
                child
                {
                    g[female]{Lucia Moletti}
                    c[female]{Carla Rovo}
                }
                c[male]{Felicetto Moletti}
            }
            
        }
        \genealogytree[template=signpost, id suffix=@matilde_oltre_tree, set position=matilde_oltre@matilde_oltre_tree at matilde_oltre@main_tree]
        {
            child
            {
                g[male]{Felice Oltre}
                p[female]{Lucia Fore}
                child
                {
                    g[female, id=matilde_oltre]{Matilde Oltre}
                }
                child
                {
                    g[female]{Modesta Oltre}
                }
            }
        }
    \end{tikzpicture}
\end{document}

树

我尝试按照解决方案中的建议镜像一些节点https://tex.stackexchange.com/a/466112/24717但我没有成功。你能帮我吗?谢谢

答案1

一种方法是将 Richetto 和 Matilde 移到最右边,因为所使用的自动放置算法会将它们重叠打印,正如您所展示的。

如果您出于某种原因不想要这个,您需要“覆盖”这个算法;您的链接提到使用 xshift 等。

结果

\documentclass{article}
\usepackage[paperwidth=500mm,paperheight=500mm]{geometry}
\usepackage[all]{genealogytree}
\begin{document}
    \begin{tikzpicture}
        \genealogytree[template=signpost, id suffix=@main_tree]
        {
            child
            {
                g[male]{Arnaldo Moletti}
                p[female]{Santa Moletti}
                child
                {
                    g[male]{Luca Moletti}
                    c[female]{Santa Moletti}
                    c[female]{Rina Moletti}
                }
                child
                {
                    g[female]{Lucia Moletti}
                    c[female]{Carla Rovo}
                }
                c[male]{Felicetto Moletti}
                child% <<< move these children to the outmost right
                {
                    g[male]{Richetto Moletti}
                    p[female, id=matilde_oltre]{Matilde Oltre}
                    child
                    {
                        g[male]{Arnaldo Moletti}                        
                    }
                    child
                    {
                        g[female]{Lucrezia Moletti}                     
                    }
                }

            }
            
        }
        
        \genealogytree[template=signpost, id suffix=@matilde_oltre_tree, set position=matilde_oltre@matilde_oltre_tree at matilde_oltre@main_tree]
        {
            child
            {
                g[male]{Felice Oltre}
                p[female]{Lucia Fore}
                child
                {
                    g[female, id=matilde_oltre]{Matilde Oltre}
                }
                child
                {
                    g[female]{Modesta Oltre}
                }
            }
        }
    \end{tikzpicture}

\end{document}

相关内容