1

Edited (After @Torbjørn comment): I want to connect d and c together by parent a. How can I do that?

enter image description here

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

\begin{document}

\begin{tikzpicture}
\genealogytree[template=signpost]{

parent
{
    g[id=b]{b}

    parent
    {
        g[id=c]{c}

        parent
        {
            g{k}
        }
        parent
        {
            g[id=a]{a}
        }

    }
    parent
    {
        g[id=d]{d}
    }
}

}
\draw[green] (a)|-(d);
\end{tikzpicture}

\end{document}
6
  • 2
    If you do g[id=c]{c} and similar for d, you can draw a line from one to the other with \draw (c) -- (d);, but where does a fit in? Apr 4, 2020 at 20:47
  • a hand sketch would be helpful to show your desired output
    – js bibra
    Apr 5, 2020 at 0:33
  • Place of a is above of the b and c and right of k. as parent node should be.
    – user108724
    Apr 5, 2020 at 5:24
  • The \draw[green] (a.south)-|(d.north); was not helpful also.
    – user108724
    Apr 5, 2020 at 5:49
  • @C.F.G have alook now
    – js bibra
    Apr 5, 2020 at 7:20

1 Answer 1

3

This should suffice

enter image description here

MWE

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

\begin{tikzpicture}
  \genealogytree[template=signpost,
    highlight/.style={pivot,box={colback=yellow!20,no shadow,fuzzy halo}}
  ]{
        child{ g{k} p{a}
                child{g{c} g{d}
                        c{b}}}}


\end{document}

EDIT

AS desired with the parent configuration

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

    \begin{tikzpicture}
    \genealogytree[template=signpost,
    highlight/.style={pivot,box={colback=yellow!20,no shadow,fuzzy halo}}
    ]{
            parent{             g{b}        
                    parent{ g{c}  g{d}      p{k}   p{a}     }
            }
            }
    \end{tikzpicture}

\end{document}

enter image description here

EDIT2

For symmetry purpose add a phantom node MWE

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

    \begin{tikzpicture}
    \genealogytree[template=signpost,
    highlight/.style={pivot,box={colback=yellow!20,no shadow,fuzzy halo}}
    ]{
            parent{             c[phantom]{b}   g{bb}   
                    parent{ g{c}    g{d}      p{k}   p{a}   }
            }
            }
    \end{tikzpicture}

\end{document}

enter image description here

5
  • I don't want do this using child.
    – user108724
    Apr 5, 2020 at 7:21
  • pray tell why not
    – js bibra
    Apr 5, 2020 at 7:22
  • because I am writing tree in below to above and in this case parent is most useful and understandable for me.
    – user108724
    Apr 5, 2020 at 7:23
  • Thanks for your effort.
    – user108724
    Apr 5, 2020 at 7:24
  • Why parent version is not similar to child version?
    – user108724
    Apr 5, 2020 at 16:39

You must log in to answer this question.