4

Is there a way to change the growth direction in child elements? If I am using a lot of nodes the content will disappear in the right margins. A solution would be if the partner’s name would be left hanging instead of right, so the tree could be balanced around the center.

My Code:

\documentclass[
  paper = 155mm:220mm,
   BCOR = 3mm,
  DIV = calc,
  11pt,
]
{scrbook}
\usepackage[all]{genealogytree}

\usepackage{rotating}


\newcommand{\ctilde}{\raisebox{0.5ex}{\texttildelow}}


\begin{document}


    % \begin{sidewaysfigure}
      \begin{genealogypicture}[
        % see https://tex.stackexchange.com/q/619151/108384
        processing = database,
        database format = full,
        place text = {\,(}{)},
        % place text={(}{)},
        event text={\footnotesize}{\,}{}{},
        date format = dd.mm.yyyy,
        % list separators hang,
        level size = 15mm,
        % level distance = 10mm,
        node size from = 20mm to 30mm, % or just an integer
        box clear, % resetting box style
        box = {
            blanker,
            top = 1mm,
            bottom = 1mm,
            fit basedim = 6pt,
            halign = flush center,
            valign = top,
            % drop fuzzy shadow,
            fontupper = \sffamily,
            % before upper = {\parskip 0.15\tcbfitdim plus 0pt minus 0pt},
            natural height,
        },
        edges = {
            rounded = 1mm,
            % swing = 4mm,
            % anchoring = center, % center|periphery (default)
            foreground = { color = black!90, line width = .3mm },
            % background = { color = black!30, line width = 4mm},
        }
        ]
child{
    g{
        name={NodeName},
        birth={1970}{Place},
        death={1970}{Place},
    }
    p{
        name={NodeName},
        birth={1970}{Place},
        death={1970}{Place},
        death={1970}{Place},
    }
    child{
        g{
            name={NodeName},
            birth={1970}{Place},
            death={1970}{Place},
        }
        p{
            name={NodeName},
            birth={1970}{Place},
            death={1970}{Place},
            death={1970}{Place},
        }
        child{
            g{
                name={NodeName},
                birth={1970}{Place},
                death={1970}{Place},
            }
            p{
                name={NodeName},
                death={1970}{Place},
            }
            child{
                g{
                    name={NodeName},
                    birth={1970}{Place},
                }
                p{
                    name={NodeName},
                    birth={1970}{Place},
                    death={1970}{Place},
                }
                child{
                    g{
                        name={NodeName},
                        birth={1970}{Place},
                        death={1970}{Place},
                    }
                    p{
                        name={NodeName},
                        birth={1970}{Place},
                        marriage={1761}{}
                        death={1970}{Place},
                    }
                    child{
                        g{
                            name={NodeName},
                            birth={1970}{Place},
                            death={1970}{Place},
                        }
                        p{
                            name={NodeName},
                            birth={1970}{Place},
                            death={1970}{Place},
                            death={1970}{Place},
                        }
                        child{
                            g{
                                name={NodeName},
                                birth={1970}{Place},
                                death={1970}{Place},
                            }
                            p{
                                name={NodeName},
                                birth={1970}{Place},
                                death={1970}{Place},
                                death={1970}{Place},
                            }
                            child{
                                g{
                                    name={NodeName},
                                    birth={1970}{Place},
                                    death={1970}{Place},
                                }
                                p{
                                    name={NodeName},
                                    birth={1970}{Place},
                                    death={1970}{Place},
                                    death={1970}{Place},
                                }
                                child{
                                    g{
                                        name={NodeName},
                                        birth={1970}{Place},
                                        death={1970}{Place},
                                    }
                                    p{
                                        name={NodeName},
                                        birth={1970}{Place},
                                        death={1970}{Place},
                                        death={1970}{Place},
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
    \end{genealogypicture}
% \end{sidewaysfigure}

\end{document}

enter image description here

1 Answer 1

5
+50

Changing the order of appearance of the g-node works.

a

New NodeName4 and NodeName8 are now on the left side.

z

Before

x

\documentclass[
paper = 155mm:220mm,
BCOR = 3mm,
DIV = calc,
11pt,
]
{scrbook}
\usepackage[all]{genealogytree}

\usepackage{rotating}   

\newcommand{\ctilde}{\raisebox{0.5ex}{\texttildelow}}   

\begin{document}        
    
    % \begin{sidewaysfigure}
    \begin{genealogypicture}[% new <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        % see https://tex.stackexchange.com/q/619151/108384
         processing = database,
        database format = full,
        place text = {\,(}{)},
        % place text={(}{)},
        event text={\footnotesize}{\,}{}{},
        date format = dd.mm.yyyy,
        % list separators hang,
        level size = 15mm,
        % level distance = 10mm,
        node size from = 20mm to 30mm, % or just an integer
        box clear, % resetting box style
        box = {
            blanker,
            top = 1mm,
            bottom = 1mm,
            fit basedim = 6pt,
            halign = flush center,
            valign = top,
            % drop fuzzy shadow,
            fontupper = \sffamily,
            % before upper = {\parskip 0.15\tcbfitdim plus 0pt minus 0pt},
            natural height,
        },
        edges = {
            rounded = 1mm,
            % swing = 4mm,
            % anchoring = center, % center|periphery (default)
            foreground = { color = black!90, line width = .3mm },
            % background = { color = black!30, line width = 4mm},
        }
        ]
        child{
            g{
                name={NodeName1},
                birth={1970}{Place},
                death={1970}{Place},
            }
            p{
                name={NodeName2},
                birth={1972}{Place},
                death={1972}{Place},            
            }
            child{
                p{
                    name={NodeName4},
                    birth={1973}{Place},
                    death={1973}{Place},
                }
                g{
                    name={NodeName3},
                    birth={1974}{Place},
                    death={1974}{Place},
                }
                child{
                    g{
                        name={NodeName5},
                        birth={1975}{Place},
                        death={1975}{Place},
                    }
                    p{
                        name={NodeName6},
                        birth={1976}{Place},
                        death={1976}{Place},
                    }
                    child{
                        p{
                            name={NodeName8},
                            birth={1977}{Place},
                        }
                        g{
                            name={NodeName7},
                            birth={1978}{Place},
                            death={1978}{Place},
                        }
                        child{
                            g{
                                name={NodeName9},
                                birth={1979}{Place},
                                death={1979}{Place},
                            }
                            p{
                            name={NodeName10},
                            birth={1980}{Place},
                            marriage={1985}{Place},
                            death={1990}{Place},
                            }
                            child{
                                p{
                                    name={NodeName12},
                                    birth={1981}{Place},
                                    death={1981}{Place},
                                }
                                g{
                                    name={NodeName11},
                                    birth={1982}{Place},
                                    death={1982}{Place},                    
                                }
                                child{
                                    g{
                                        name={NodeName13},
                                        birth={1983}{Place},
                                        death={1983}{Place},
                                    }
                                    p{
                                        name={NodeName14},
                                        birth={1994}{Place},
                                        death={1994}{Place},        
                                    }
                                    child{
                                        g{
                                            name={NodeName15},
                                            birth={1995}{Place},
                                            death={1995}{Place},
                                        }
                                        p{
                                            name={NodeName16},
                                            birth={1996}{Place},
                                            death={1996}{Place},            
                                        }
                                        child{
                                            g{
                                                name={NodeName17},
                                                birth={1997}{Place},
                                                death={1997}{Place},
                                            }
                                            p{
                                                name={NodeName18},
                                                birth={1999}{Place},
                                                death={1999}{Place},
                                                    }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    \end{genealogypicture}

    \begin{genealogypicture}[
    % see https://tex.stackexchange.com/q/619151/108384
    processing = database,
    database format = full,
    place text = {\,(}{)},
    % place text={(}{)},
    event text={\footnotesize}{\,}{}{},
    date format = dd.mm.yyyy,
    % list separators hang,
    level size = 15mm,
    % level distance = 10mm,
    node size from = 20mm to 30mm, % or just an integer
    box clear, % resetting box style
    box = {
        blanker,
        top = 1mm,
        bottom = 1mm,
        fit basedim = 6pt,
        halign = flush center,
        valign = top,
        % drop fuzzy shadow,
        fontupper = \sffamily,
        % before upper = {\parskip 0.15\tcbfitdim plus 0pt minus 0pt},
        natural height,
    },
    edges = {
        rounded = 1mm,
        % swing = 4mm,
        % anchoring = center, % center|periphery (default)
        foreground = { color = black!90, line width = .3mm },
        % background = { color = black!30, line width = 4mm},
    }
    ]
    child{
        g{
            name={NodeName1},
            birth={1970}{Place},
            death={1970}{Place},
        }
        p{
            name={NodeName2},
            birth={1972}{Place},
            death={1972}{Place},            
        }
        child{
            g{
                name={NodeName3},
                birth={1973}{Place},
                death={1973}{Place},
            }
            p{
                name={NodeName4},
                birth={1974}{Place},
                death={1974}{Place},
            }
            child{
                g{
                    name={NodeName5},
                    birth={1975}{Place},
                    death={1975}{Place},
                }
                p{
                    name={NodeName6},
                    birth={1976}{Place},
                    death={1976}{Place},
                }
                child{
                    g{
                        name={NodeName7},
                        birth={1977}{Place},
                    }
                    p{
                        name={NodeName8},
                        birth={1978}{Place},
                        death={1978}{Place},
                    }
                    child{
                        g{
                            name={NodeName9},
                            birth={1979}{Place},
                            death={1979}{Place},
                        }
                        p{
                            name={NodeName10},
                        birth={1980}{Place},
                        marriage={1985}{Place},
                        death={1990}{Place},
                        }
                        child{
                            g{
                                name={NodeName11},
                                birth={1981}{Place},
                                death={1981}{Place},
                            }
                            p{
                                name={NodeName12},
                                birth={1982}{Place},
                                death={1982}{Place},                    
                            }
                            child{
                                g{
                                    name={NodeName13},
                                    birth={1983}{Place},
                                    death={1983}{Place},
                                }
                                p{
                                    name={NodeName14},
                                    birth={1994}{Place},
                                    death={1994}{Place},        
                                }
                                child{
                                    g{
                                        name={NodeName15},
                                        birth={1995}{Place},
                                        death={1995}{Place},
                                    }
                                    p{
                                        name={NodeName16},
                                        birth={1996}{Place},
                                        death={1996}{Place},            
                                    }
                                    child{
                                        g{
                                            name={NodeName17},
                                            birth={1997}{Place},
                                            death={1997}{Place},
                                        }
                                        p{
                                            name={NodeName18},
                                            birth={1999}{Place},
                                            death={1999}{Place},
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
\end{genealogypicture}
    % \end{sidewaysfigure}
    
\end{document}
4
  • After all the great work you've done it would be a shame for you to have a 0 score. Therefore you have my positive vote.
    – Sebastiano
    Feb 17, 2022 at 21:17
  • 1
    @Sebastiano Always appreciated.:) Feb 17, 2022 at 21:20
  • So simple. OMG. Thanks
    – Kalaschnik
    Feb 18, 2022 at 15:56
  • @Kalaschnik Small is beautiful. Thank you for your feedback. Feb 18, 2022 at 15:57

You must log in to answer this question.

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