2

I need to add the parents in a "child" tree. In the following example I need to add the parents of the "F" node and a second wife/husband (union) of the "F" node.

\documentclass[english]{article}
\usepackage[all]{genealogytree}
\begin{document}
\begin{genealogypicture}[template=signpost]
 child{
  g{A}
  p{B}
  child{
   g{C}
   p{D}
   child{
    g{E}
    p{F}
    child{
     g{G}
     p{H}
     c{I}
    }
   }
  }
 }
\end{genealogypicture}
\end{document}

enter image description here

user257878
  • 21
  • 1

1 Answers1

2

By using two separate trees converging at F by using the syntax

set position=c1@b at c1@a

where c1@a is the position of F in the first(green) tree

and c1@b is the position of F in the second(blue) tree

enter image description here

\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}
\begin{tikzpicture}
    \gtrset{template=formal graph,
    }
    \genealogytree[box={colback=green!25},id suffix=@a]
    {
        child{
            g{A}
            p{B}
            child{
                g{C}
                p{D}
                child{
                    g{E}
                    p[id=c1,tikz={xshift=10mm}]{F}
                    child{
                        g{G}
                        p{H}
                        c{I}
                    }
                }
            }
        }}
    \genealogytree[box={colback=blue!25}, id suffix=@b, set position=c1@b at c1@a ]
    {
                child{g{Y}p{Z}
                    child{g[id=c1,]{F}
                     union{p{wife2}
                     }
                }
            }
        }

\end{tikzpicture} \end{document}

js bibra
  • 21,280