TransWikia.com

Genealogytree: "black" edges are not black

TeX - LaTeX Asked by Astianthus Viminalis on May 20, 2021

When using genealogytree I can change the color of the edges between nodes by passing a color name to foreground as in the following:

gtrset{level size=8mm,node size=20mm}
gtrset{edges={foreground=red,no background}}
begin{genealogypicture}
  parent{
    g{Child}
    p{Parent}
    p{Parent}
  }
end{genealogypicture}

red edges

However, when specifying black edges, the resulting color is not black but a dark green (same as the default color). This is easily seen with thicker edges:

gtrset{level size=8mm,node size=20mm}
gtrset{edges={foreground={line width=2mm,black},no background}}
begin{genealogypicture}
  parent{
    g{Child}
    p{Parent}
    p{Parent}
  }
end{genealogypicture}

not black edges

Why is this and how can I make the edges actually black?

2 Answers

I have seen the manual but the colors are mostly either red or purple or green. You can use definecolor{black}{rgb}{0,0,0} to have black color.

documentclass[12pt]{article}
usepackage{genealogytree}

definecolor{black}{rgb}{0,0,0}
begin{document}
gtrset{level size=8mm,node size=20mm}
gtrset{edges={foreground={line width=2mm,black},no background}}
begin{genealogypicture}
  parent{
    g{Child}
    p{Parent}
    p{Parent}
  }
end{genealogypicture}
end{document}

enter image description here

Correct answer by Sebastiano on May 20, 2021

Not sure why you did not get black --the code worked correctly as below -- maybe some other line in your code -- the full document code has not been uploaded

enter image description here

documentclass[12pt]{article}
usepackage{genealogytree}

begin{document}

gtrset{level size=8mm,node size=20mm}
gtrset{edges={foreground={line width=2mm,black},no background}}
begin{genealogypicture}
    parent{
        g{Child}
        p{Parent}
        p{Parent}
    }
end{genealogypicture}
end{document}

Without the gtrset included in the code I get-- the default settings--

enter image description here

documentclass[12pt]{article}
usepackage{genealogytree}

begin{document}
begin{genealogypicture}
    parent{
        g{Child}
        p{Parent}
        p{Parent}
    }
end{genealogypicture}
end{document}

Also, another way to make black blue whatever--

enter image description here

documentclass[12pt]{article}
usepackage{genealogytree}

begin{document}
newcommand{mylist}{
    level distance=1cm,
    level 0/.style={node box={colback=red!50}},
    edges={no background,foreground={line width=2mm,black!70!green!70}},
}
newcommand{mylistt}{
    level distance=1cm,
    level 1/.style={node box={colback=red!50}},
    edges={no background,foreground={line width=2pt,yellow!50!red!80!black,Circle-Latex}},
}
begin{tikzpicture}
genealogytree[keysfrom=mylist
]{
    parent{
    g{Child}
    p{Parent}
    p{Parent}
}
}
end{tikzpicture}

begin{tikzpicture}

genealogytree[keysfrom=mylistt
]{
    parent{
        g{Child}
        p{Parent}
        p{Parent}
    }
}
end{tikzpicture}
end{document}

Answered by js bibra on May 20, 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