1

I have been trying to draw a Genealogy tree for my family. I developed an initial tree by using parent families for my Grandkid (my son's son). Then I added myself and wife as parents to my two sons. I then added my parents. At this point the code looks like this

\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}
%\section{First Test}
\begin{tikzpicture}
   \genealogytree [template=signpost] {
      parent{
         g[ male]{GRANDSON}   
         p[female]{MY DAUGHTER IN LAW}
         parent{
                    g[male]{SON 1}
                    c[ male]{SON 2}
                   parent{
                          g[male]{ME}
                          c[male]{MY BROTHER}
                          p[ male]{MY FATHER}
                          p[female]{MY MOTHER}
                           }
                 p[female]{MY WIFE}
                  }
              } 
           }
\end{tikzpicture}
\end{document}

This compiles ok. The tree looks like enter image description here

Now I want to add my Brother's family. I use the child family with a single g-node for my brother.

The code is as below:

\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}
%\section{First Test}
\begin{tikzpicture}
   \genealogytree [template=signpost] {
      parent{
         g[ male]{GRANDSON}   
         p[female]{MY DAUGHTER IN LAW}
         parent{
                    g[male]{SON 1}
                    c[ male]{SON 2}
                   parent{
                          g[male]{ME}
                          child{
                          g[male]{MY BROTHER}
                                  }
                          p[ male]{MY FATHER}
                          p[female]{MY MOTHER}
                           }
                 p[female]{MY WIFE}
                  }
              } 
           }
\end{tikzpicture}
\end{document}

It does not compile now. The error message point out the last curly closing bracket[}]. Could someone help please? Thanks in advance.

1
  • Welcome to TeX.SE!
    – Mensch
    Aug 1, 2023 at 6:35

1 Answer 1

2

The Descendant Diagram approach allow what you want, for more information visit the documentation Documentation

\documentclass{standalone}
\usepackage[all]{genealogytree}

\begin{document}

\begin{tikzpicture}
\genealogytree[template=signpost]
    {
        % Familiy formed by my father and mother
        child[id=famA]{
            g[id=na1, male]{My father}
            p[id=na2, female]{My mother}

            % Familiy formed by me and my wife
            child[id=famB]{
                g[id=na3, male]{Me}
                p[id=nb1, female]{My wife}

                % Familiy formed by son 1 and his wife
                child[id=famD]{
                    g[id=nb2, male]{Son 1}   
                    p[id=nd1, female]{My daughter in law}
                    c[id=nd2, male]{Grandson}
                }
                c[id=nb3, male]{Son 2}
            }
            
            % Familiy formed my brother
            child[id=famC]{
                g[id=na4, male]{My Brother}
                p[id=nc1, female]{My BW}
                c[id=nc2, male]{B Son 1}
                c[id=nc3, male]{B Son 2}
            }
        }
    }
\end{tikzpicture}

\end{document}

Example

You must log in to answer this question.

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