TransWikia.com

Using package genealogytree, how do I make invisible a particular line connecting two nodes?

TeX - LaTeX Asked by Kevin Coates on June 19, 2021

Using the genealogytree package, I am combining trees that span several generations. One of the trees has no-one in the first generation, so I’ve used a g[phantom] to keep the positioning correct. This makes Gen1 (in the MWE below) invisible, but the connecting line between the invisible Gen 1 and the visible Gen2 is also visible.
How can I remove / make invisible the line above Gen2M?
How can I remove / make invisible the line above Gen2M?

MWE:

documentclass{minimal}
usepackage[all]{genealogytree}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{trees}

begin{document}
begin{tikzpicture}
gtrset{processing=tcbox*}

genealogytree
{
child
    {
    g[phantom*]{Gen1}
        child
        {
        g[male]         {Gen2M}
        p[female]       {Gen2F}
        }
    }   
}

end{tikzpicture}
end{document}

One Answer

You need to use the following syntax to disconnect the line/ edge

g[disconnect,phantom*]{Gen1}

enter image description here

MWE

documentclass{minimal}
usepackage[all]{genealogytree}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{trees}

begin{document}
begin{tikzpicture}
gtrset{processing=tcbox*}

genealogytree
{
child
    {
    g[disconnect,phantom*]{Gen1}
        child
        {
        g[male]         {Gen2M}
        p[female]       {Gen2F}
        }
    }   
}

end{tikzpicture}
end{document}

Correct answer by js bibra on June 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP