When dealing with a very large tree using genealogytree
, I would like to isolate some parts; not just highlight, but isolate, meaning excluding everything else. The tree is already coded so I would prefer avoiding splitting it in two trees.
For example, below, is it possible to keep only the minimum leading from Grandpa Doe to Charles and siblings? So that:
becomes:
Preserved nodes could be indicated by family id or node id, for example. This can be cumbersome, but is much easier than commenting or deleting the extra lines of code. There might be a simple way of doing it, and that's what I am asking for here.
Another possibility, which would probably require a package enhancement, would be to detect who to keep in-between two nodes. From two node ids, it would join them with the shortest path, and add every missing parent (and, possibly siblings).
I have found the options options for family
and edges for family
but that is not a very sound approach to excludes nodes by setting a tiny size or a white color.
Code for first tree:
\documentclass[tikz]{standalone}
\usepackage[all]{genealogytree}
\usepackage{times}
\usepackage{mtpro2}
\begin{document}
\begin{tikzpicture}
\genealogytree[template=signpost,
%options for family={Smith}{box={width=2cm,colback=white}},
%edges for family={Smith}{none},
]
{
parent[id=SmithDoe]{
g[id=Arth2008,male]{Arthur\\\gtrsymBorn\,2008}
c[id=Bert2010,female]{Berta\\\gtrsymBorn\,2010}
c[id=Char2014,male]{Charles\\\gtrsymBorn\,2014}
parent[id=Smith]{
g[id=John1980,male]{John Smith\\\gtrsymBorn\,1980}
p[id=GpSm1949,male]{Grandpa Smith\\\gtrsymBorn\,1949}
p[id=GmSm1952,female]{Grandma Smith\\\gtrsymBorn\,1952}
}
parent[id=Doe]{
g[id=Jane1982,female]{Jane Doe\\\gtrsymBorn\,1982}
c[id=Harr1987,male]{Uncle Harry\\\gtrsymBorn\,1987}
p[id=GpDo1955,male]{Grandpa Doe\\\gtrsymBorn\,1955}
p[id=GmDo1956,female]{Grandma Doe\\\gtrsymBorn\,1956}
}
}
}
\end{tikzpicture}
\end{document}