# \[New Addon\] Expanded Ancestor Tree: Smart routing, siblings, and cousins

**URL:** <https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891>\
**Category:** Third-party Addons\
**Tags:** third-party-addon, familytreeview, development\
**Created:** [August 25, 2026, 1:27pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891 "2026-08-25T13:27:54Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![bszabi05](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bszabi05/32/9561_2.png) [@bszabi05](https://gramps.discourse.group/u/bszabi05)\
**Post date:** [August 25, 2026, 1:27pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/1 "2026-08-25T13:27:54Z")

</div>

Hello everyone,

I recently ran into a limitation while generating my family trees in Gramps. I really needed a way to display siblings and cousins alongside direct ancestors, but more importantly, I wanted to see them in a very specific format and layout that just wasn’t possible with the built-in reports.

To get the exact look, structure, and readability I envisioned, I decided to modify the default Ancestor Tree report. This personal project eventually grew into a fully standalone plugin: the **Expanded Ancestor Tree**.

Here is how I tailored the format to solve my layout issues:

- **Siblings & Cousins Included:** The tree now dynamically includes not just direct ancestors, but their siblings, spouses, cousins, and collateral descendants through recursive family branches.

- **Smart Connection Routing:** Standard intersecting lines made complex trees unreadable for me, so I completely rewrote the routing system. It now uses a custom “circuit-board” style layout where collateral lines are clearly offset from the main trunk.

- **Bridged Intersections:** To keep the specific format clean, whenever a collateral line has to cross the main ancestral line, it draws a small semi-circular “bridge” (jump). No more confusing overlapping lines!

- **Color-Coded Families:** Added a display option to draw each family’s connecting lines with a distinct color to make branches instantly recognizable.

- **Modernized UI:** I flattened the design by removing heavy drop shadows and implemented bold typography for names so they stand out clearly from dates and places.

- **Auto-Compression:** The layout engine automatically compresses the tree vertically, removing the huge blank gaps when ancestors are unknown.

**Screenshots:**

 ![Screenshot 2026-08-25 184905](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/3/311a6752cbf2ddd02fd3dfde91d117abe7e71f5b.png)

**Download & Testing:**  
You can download the `ExpandedAncestorTree.zip` from my GitHub repository here:  
[[Release v1.0.0 - First Public Release · bszabi05/gramps-expanded-ancestor-tree · GitHub](http://github.com/bszabi05/gramps-expanded-ancestor-tree/releases/tag/v1.0.0)]

Just extract the zip into your Gramps user plugins folder and restart Gramps. It will appear under **Reports → Graphical Reports → Expanded Ancestor Tree**.

Since I built this to solve my own specific formatting needs, I would love to hear what the community thinks! I would really appreciate it if some of you could test it out with your own complex databases and give me some feedback.

Cheers,  
Szabi (kotrabdev)

---

<div class="post-metadata">

**Author:** ![hartenthaler](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/hartenthaler/32/3404_2.png) [@hartenthaler](https://gramps.discourse.group/u/hartenthaler)\
**Post date:** [August 25, 2026, 2:39pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/2 "2026-08-25T14:39:50Z")

</div>

Can you add a screenshot of the diagram, please?

For me, cousins are children of Aunts and Uncles, not children of siblings.

---

<div class="post-metadata">

**Author:** ![bszabi05](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bszabi05/32/9561_2.png) [@bszabi05](https://gramps.discourse.group/u/bszabi05)\
**Post date:** [August 25, 2026, 3:36pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/3 "2026-08-25T15:36:50Z")

</div>

Thank you so much for pointing this out! You are absolutely right.

English is not my native language, and I fell into a translation trap. I will immediately updatethe plugin and the GitHub repository to correct this terminology.

As requested, here is a screenshot of the diagram showing how the layout handles collateral lines:

 ![test_ExpandedAncestorTree](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/a/acb63e3ac1089ddd544f05f68b81501cebc22845.png)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [August 25, 2026, 4:00pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/4 "2026-08-25T16:00:48Z")

</div>

Nice first contribution! Thanks for sharing!!!

> [@hartenthaler](#):
>
> Can you add a screenshot of the diagram, please?
> 
> For me, cousins are children of Aunts and Uncles, not children of siblings.

In the attached test with the [example.gramps](https://gramps-project.org/wiki/index.php/Example.gramps) tree, the home person was selected and the `include` options were all enabled. The SVG chart page was scaled to fit the tree.

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/f/f560b80a0cd1aee0b87d50899399b2675f5daace.png)

The Center Person (focal person) for the test Report is in position Index 6. (The Indexing appears to number based by the position of the Index Number in the row (with each row columns left-to-right) top-to-bottom.) The Report could use an option to mark the Center Person somehow.

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/8/863179b2b24e0777046a501daa50a5a2eea97db6.png)

I think the PDF problem (where the Index 1 was hidden in the margins) is related to the PDF plugin rather than the Report.  
[sample.pdf](https://gramps.discourse.group/uploads/short-url/1dM40tiA27hIoWJvVnC8IurzIOU.pdf) (21.4 KB)

In the Report output, I see the Siblings, Parents, Piblings (parent siblings), and grandparents of the center person.

I do not see: Spouses, Children, Pibling spouses or niblings (nieces and nephews), 1st Cousins (nor their spouses or children), great-piblings.

Here’s his 2-way fan chart:

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/a/a2c96d6b7eaed504cece2ea85ecd05b0fc37e168.png)

And his FamilyTreeView (addon Graphs view mode):

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/1/17d0bc14b6b256904198cab19ef934f2d8377385.png)

Since there is not enough Ancestral breadth for the Home Person to exercise this report, re-tested with Grand-daughter (Яковлев, Esther Faye, index 2) as the center person:

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/e/eb301558de65d362670f3af8bad009bbd83606c6.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/2/2af2dd03dbc9a37cb5f0f15041d5f4ec2c8f7c98.png)

---

<div class="post-metadata">

**Author:** ![bszabi05](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bszabi05/32/9561_2.png) [@bszabi05](https://gramps.discourse.group/u/bszabi05)\
**Post date:** [August 25, 2026, 4:14pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/5 "2026-08-25T16:14:39Z")

</div>

Thank you very much for the detailed testing and feedback!  
You are right, displaying the spouse of the center person is not yet implemented, which is why they dont show up.  
Center Person Highlighting is a great suggestion, I will make also a note for it with the previus.

---

<div class="post-metadata">

**Author:** ![hamkg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/hamkg/32/5784_2.png) [@hamkg](https://gramps.discourse.group/u/hamkg)\
**Post date:** [August 25, 2026, 4:15pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/6 "2026-08-25T16:15:57Z")

</div>

Really nice addition, thanks a lot! 👏

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [August 27, 2026, 12:47pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/7 "2026-08-27T12:47:22Z")

</div>

A post was split to a new topic: [Simplify the testing of related people targeting](https://gramps.discourse.group/t/simplify-the-testing-of-related-people-targeting/9894)

---

<div class="post-metadata">

**Author:** ![bszabi05](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bszabi05/32/9561_2.png) [@bszabi05](https://gramps.discourse.group/u/bszabi05)\
**Post date:** [August 27, 2026, 10:35am UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/8 "2026-08-27T10:35:00Z")

</div>

# **Expanded Ancestor Tree v1.0.2**

_Hello everyone!_

If you have ever stared at a standard family tree report in Gramps and felt frustrated by how disconnected or overwhelmingly cluttered it becomes when trying to map out a whole family network, I have great news for you. Today, I am thrilled to officially announce the release of **Expanded Ancestor Tree v1.0.2**!

This is a heavily enhanced, performance-tuned fork of the built-in Ancestor Tree report, completely re-engineered from the ground up to let you visualize collateral family lines smoothly without losing your sanity—or your screen space.

### _Why We Needed This?_

We have all been there. You build a deep genealogical database, but when you want to showcase your ancestors alongside their siblings, spouses, and cousins, traditional reports either leave them out entirely or turn into an absolute spaghetti monster of overlapping lines.

Standard routing algorithms intersect lines blindly, heavy drop shadows muddy up the typography, and missing ancestor gaps create massive, ugly holes in your layout. I set out to solve these exact pain points. I wanted a tree that looks modern, respects your screen, handles deep relationships gracefully, and most importantly, tells the _full_ story of a family—not just a lonely vertical line of direct ancestors.

### _What makes my plugin Special?_

- **Siblings, Nephews, Nieces & Cousins in Harmony:** It seamlessly displays not only your direct ancestors but also their siblings, spouses, nieces, nephews, and cousins (collateral relatives), so you can actually trace entire family clusters.
- **Smart Circuit-Board Routing:** Say goodbye to chaotic intersections. The plugin uses a custom routing system that neatly offsets collateral family lines from the main ancestral trunk.
- **Bridged Intersections:** When a collateral line does cross the main path, the engine automatically draws a small, clean semi-circular “bridge” (jump), making complex multi-branch trees instantly readable.
- **Vibrant Family Color-Coding:** Turn on the optional setting to generate distinct connection lines for each separate family group, making family groupings pop visually.
- **Clean, Modern “Flat” Design:** Heavy, outdated drop shadows have been stripped away for a crisp modern look, and personal names are dynamically rendered in bold so they instantly stand out from dates and locations.
- **Aggressive Auto-Compression:** The layout engine automatically compresses vertical space to eliminate the massive, annoying gaps typically left behind by unknown ancestors.

### _How to Install & Test It_

Getting this onto your Gramps instance takes just a few seconds using the [Addon Manager](https://gramps-project.org/wiki/index.php/Gramps_Glossary#addon):

1. Open Gramps and go to **Edit** → **Addon&nbsp;Manager**.

2. Switch over to the **Projects** tab.

3. Add and select the following project name and URL:

```python
Project name: Szabi
https://raw.githubusercontent.com/bszabi05/gramps-expanded-ancestor-tree/addon-manager/gramps60

```

Also compatible with the Gramps 5.2 and 6.1 **Addon&nbsp;Manager** versions. Substitute your version number at the end of the URL.

1. Click **Refresh**.

2. Search for **Expanded Ancestor Tree** under the Reports category and click **Install**.

3. Restart Gramps, head over to **Reports → Graphical Reports → Ancestor Tree Expanded** , and generate your new family masterpiece!

_ **Pro Tip for the Best Quality:** _ When generating your report, I highly recommend saving the output in **SVG** format. Since it is a scalable vector graphic, you can zoom in infinitely on massive, complex trees without any of the text or lines losing their crispness and readability!

Give it a spin with your own trees, test out the new collateral filters, and let me know how it performs for you. Happy branching!

 ![screen](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/8/87972433ee2bfa5c2c570ec9f2a1352eec7df633.png)  
 ![screen2](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/8/8cb4313a27e98ca08c3ab02d433cba407c5f42d5.png)

[sample.pdf](https://gramps.discourse.group/uploads/short-url/oDgiga7kSCW6Wj7uqhqJeNXXTJ3.pdf) (54.2 KB)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [August 27, 2026, 12:44pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/9 "2026-08-27T12:44:31Z")

</div>

This Report really helps to illustrate the branches adjacent to the direct ancestors and descendants.

Thank you for sharing!!

---

<div class="post-metadata">

**Author:** ![PeterPower](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/peterpower/32/2591_2.png) [@PeterPower](https://gramps.discourse.group/u/PeterPower)\
**Post date:** [August 28, 2026, 8:42am UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/10 "2026-08-28T08:42:51Z")

</div>

Testing failed. W11, Gramps 6.0.8. A4 horizontal, 3 generations, 3 desc. generations, empty pages with, Add private

Report

```python
114042: ERROR: _reportdialog.py: line 800: Failed to run report.
Traceback (most recent call last):
File “C:\Program Files\GrampsAIO64-6.0.8\gramps\gui\plug\report_reportdialog.py”, line 759, in report
my_report.write_report()
~~~~~~~~~~~~~~~~~~~~~~ ^^
File “C:\Users\pekka\AppData\Roaming\gramps\gramps60\plugins\ExpandedAncestorTree\ExpandedAncestorTree.py”, line 922, in write_report
self.canvas.paginate(colsperpage, one_page)
~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\GrampsAIO64-6.0.8\gramps\plugins\lib\libtreebase.py”, line 566, in paginate
self.__paginate(colsperpage)
~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^
File “C:\Program Files\GrampsAIO64-6.0.8\gramps\plugins\lib\libtreebase.py”, line 544, in __paginate
page_y_top = self.__paginate_y_pages(colsperpage, x_page_offsets)
File “C:\Program Files\GrampsAIO64-6.0.8\gramps\plugins\lib\libtreebase.py”, line 419, in __paginate_y_pages
x_page_offsets[x_page],
~~~~~~~~~~~~~~ ^^^^^^^^
KeyError: -1

```

---

<div class="post-metadata">

**Author:** ![bszabi05](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bszabi05/32/9561_2.png) [@bszabi05](https://gramps.discourse.group/u/bszabi05)\
**Post date:** [August 28, 2026, 11:41am UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/11 "2026-08-28T11:41:23Z")

</div>

​This will be fixed in the next patch! Thanks again for your help in catching this edge case.

---

<div class="post-metadata">

**Author:** ![bszabi05](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bszabi05/32/9561_2.png) [@bszabi05](https://gramps.discourse.group/u/bszabi05)\
**Post date:** [August 30, 2026, 5:39pm UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/12 "2026-08-30T17:39:50Z")

</div>

I have just released a patch, this fixes the PDF generation problems. Let me know if works correctly now

---

<div class="post-metadata">

**Author:** ![PeterPower](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/peterpower/32/2591_2.png) [@PeterPower](https://gramps.discourse.group/u/PeterPower)\
**Post date:** [September 2, 2026, 7:18am UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/13 "2026-09-02T07:18:53Z")

</div>

Version 1-0.3 seems to have fixed pagination error. I now continue with testing very multiple features of your plugin. 🪏

---

<div class="post-metadata">

**Author:** ![adriandavey](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@adriandavey](https://gramps.discourse.group/u/adriandavey)\
**Post date:** [September 7, 2026, 7:37am UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/14 "2026-09-07T07:37:00Z")

</div>

I have some comments and queries regarding the “Ancestor tree expanded” graphical report [chart].

This is a very welcome development, with much promise.

Note though the somewhat unhelpful difference between the name of the plugin in the “Reports \> Graphical reports” dropdown [as “Ancestor Tree Expanded”] and the name of the ID of the plugin as “ExpandedAncestorTree”. The latter, not the former, is used within the Gramps report\_options.xml, where most users probably don’t need to go, but anyone trying to maximise the utility of a workflow from Gramps via SVG will.

Like the standard built-in “Ancestor Tree” report, your implementation includes the option of a substitution list [to enable on-the-fly shortening of text objects for clarity], and renders text objects as standard text in the output SVG, which then enables global &/or selective modification of the font, font-instances, point-sizes, colours, positions etc in the chart production workflow. And with a custom Gramps style sheet for the report type, you can set up various objects with arbitrarily different formatting [e.g. names in different colour from events, to enable a heavier font instance for one than the other], for easy separation within the SVG, into different layers for different treatment [because you can select from the raw generated SVG by various combinations of stroke and/or fill, or by object type]

Unfortunately, none of the Gramps “Graph” report types [ditto the LaTeX ones] allow this, because all text objects are rendered as glyphs, making it completely impractical to undertake post-generation adjustment of formatting, other than to ADD objects.

The ability to manipulate all objects in SVG output is extremely important in a workflow designed to maximise the impact of Gramps graphical reports, optimise colour contrast, line weights, selective fills and text readability, and then distribute them in PDF, with or without internal bookmarks.

As currently implemented, the default chart orientation has the earliest generation at the right, and the latest generation at the left. This is exactly the same as the built-in Ancestor Tree.

But one thing I have learned in distributing charts to family is that they get confused if the orientation of earliest-to-latest generation flow is different between different charts.

All of the Gramps descendant chart types have an earliest-to-latest flow of left-to-right [the opposite to the Ancestor trees].

Likewise, the “Family Tree” graphical report type [uniquely, until arrival of the “Ancestor Tree Expanded”] offers an adjustable combination of both ancestor AND descendant generations, but it is nevertheless oriented with earliest-to-latest generations left-to-right. Unfortunately, it is currently quite constrained in its output options, and does not implement a replacement list, nor allow any of the standard Gramps substitution values, which significantly reduces its potential.

The “Dynamic Web Report” gives the user complete control over the orientation [“shape”] of the SVG chart that is available in that report type, and also allows for various different emphases on ancestors or descendants or a combination.

My big question for you is whether it is feasible to offer the user the option of chart default orientation earliest-to-latest from left-to-right, as well as the current latest-to-earliest from left-to-right [essentially a mirror image of the present, but with the text rendered in right-reading orientation].

It is possible to mirror flip the current output SVG horizontally in an editor, and then flip the text objects back to a readable orientation [by scaling -100% around each object’s individual centroid], but most if not all text objects then need to have their left-alignment adjusted manually with respect to their box, and it is extremely labour-intensive to do so for anything other than a relatively small and uncomplicated chart, i.e. it is theoretically feasible but mostly impractical.

On several occasions, admittedly with a fairly large and complicated family [16 children of the centre person], I got the error message “Tree truncated. The generated tree reached the 400 people safety limit and has been truncated. Please reduce the number of generations or disable some options to see all branches”.

But with settings of scale to fit page width only, at A0 portrait, and only the value 1 for ancestors [zero is not allowed], and only 3 for descendants, and with both “include descendants of the centre person” and “include cousins” selected, you still end up with five generations across the chart [including the centre person & their partner]. Likewise, 1a with 2d gives a total of four generations, and 1a with 1d gives a total of three generations across, even though no ancestors of the centre person are shown. [That 1A with 1D version of the chart, as generated, is a virtual page of about A4 landscape width, and (from the 16 children), the equivalent of 16 sheets of landscape A4 from top to bottom.

It might help if the label on the ancestor value field on the “Tree options” tab said that “Generations” includes the centre person? Or perhaps it might be more intuitive if the value zero was allowed, i.e. to mean that the chart will include the centre person but no ancestors? It might be clearer still if the label on the “Generations” field was “Ancestor Generations”?

I am still mystified as to why one more descendent generation gets shown than the value specified in the “Descendant Generations” field of the “Tree options” tab.

If I switch off the “include descendants of the centre person” and “include cousins” options, and set the chart to 3a and 1d [where, again, zero is not allowed], I get a total of four generations across the chart—the centre person and two generations of their ancestors, plus, somewhat perversely, one generation of descendants [i.e. the sixteen children]. Even if I increase the ancestor value to, say, 6a with 1d [which does not break the 400 limit], what i get still contains a column of descendants, so I remain unclear as to what the “include descendants …” switch is intended to do.

For charts where the “Show index” is selected, there needs to be ~ 5px more space between the baseline of the index number [i.e. y -5px for the index number] and the box, so there is a wider gap.

I will continue to test this …

I should have added that I have been testing v1.0.4

---

<div class="post-metadata">

**Author:** ![Woody](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/woody/32/3406_2.png) [@Woody](https://gramps.discourse.group/u/Woody)\
**Post date:** [September 27, 2026, 8:25am UTC](https://gramps.discourse.group/t/new-addon-expanded-ancestor-tree-smart-routing-siblings-and-cousins/9891/15 "2026-09-27T08:25:06Z")

</div>

I’m looking for a graphical report that displays the godparents (and one generation – the godparents’ parents) of the main character. I’m also looking for an option to display the witnesses of a wedding couple (and one generation – the witnesses’ parents).

Would it be possible to implement such a selectable/deselectable function in your report?

I’m using version 1.0.4 with Windows 11.
