TransWikia.com

Genealogytree - Move Nodes closer together

TeX - LaTeX Asked by Sir Teddy the First on July 23, 2021

Hi,
please consider the following example:

documentclass[border=5pt,tikz]{standalone}
usepackage{tikz}
usepackage{genealogytree}

gtrset{%
    processing=tikznode,
    family edges={foreground={black}, background={white}},
    level size=4mm,
}

begin{document}
    begin{tikzpicture}
        genealogytree[id suffix=@a]
        {
            child{
                g[phantom]{}
                child{
                    p[id=c1]{Btextsubscript{1}}
                    g{Atextsubscript{1}}
                    c{Ctextsubscript{1}}
                }
                child{
                    g{Atextsubscript{2}}
                    p[phantom]{}
                    c{Ctextsubscript{1}}
                }
                c{textbf{Uncle A}} %   <----
            }   
        }
        genealogytree[id suffix=@b, set position=c1@b at c1@a]{
            child{
                g[phantom]{}
                c{textbf{Uncle B}} %   <----
                child{
                    p[phantom]{}
                    g{Btextsubscript{2}}
                    c{Ctextsubscript{1}}
                }
                child{
                    g[id=c1]{Btextsubscript{1}}
                    p{Atextsubscript{1}}
                    c{Ctextsubscript{1}}
                }
            }
        }   
    end{tikzpicture}
end{document}

enter image description here

I’m trying to move the two outer nodes (Uncle A & B) closer to the middle. I have found many ways to space them further apart, but none the other way around.
What do I have to do to make it work?

Thanks In Advance

One Answer

I just found the solution myself.

I changed the respective lines to c[tikz={xshift=-2cm}]{textbf{Uncle A}} and it worked.

Answered by Sir Teddy the First on July 23, 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