0

I am trying to join two genealogy trees, but they are overlapping.

\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}

tree

I tried to mirror some nodes as suggested in solution https://tex.stackexchange.com/a/466112/24717 but I had no success. Can you please help me? Thank you

1 Answer 1

2

A way to do it is to move Richetto and Matilde to the outmost right, because the auto-placement algorithm used will print them overlapping, as you show.

If you don't want this for a reason, you need to "overwrite" this algo; your link mentions using xshift etc.

result

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .