# Reports normal / italic and bold within a paragraph

**URL:** <https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106>\
**Category:** Development\
**Created:** [March 13, 2024, 1:55pm UTC](https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106 "2024-03-13T13:55:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugene](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/eugene/32/1911_2.png) [@eugene](https://gramps.discourse.group/u/eugene)\
**Post date:** [March 13, 2024, 1:55pm UTC](https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106/1 "2024-03-13T13:55:33Z")

</div>

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

Hello all,  
I’m trying to adapt the detailed descendants report to my needs.  
Within the children’s list I would like to have part of the text Italic (the witnesses at a baptism), part bold. (the name of the partners).  
Is this possible?

Thank you very much,  
Eugene

---

<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:** [March 13, 2024, 3:30pm UTC](https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106/2 "2024-03-13T15:30:40Z")

</div>

There are several (3) Detailed Descendant reports in the Text Reports menu. Which one are you using?

- [Detailed Descendant Book](https://gramps-project.org/wiki/index.php/Addon:Descendant_and_Detailed_Descendant_Book_Reports)
- [Detailed Descendant Report](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Reports_-_part_6#Detailed_Descendant_Report)
- [Detailed Descendant Report With All Images](https://gramps-project.org/wiki/index.php/Addon:Detailed_Descendant_Report_With_All_Images)

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

The general answer is: “yes, just about anything is ‘possible’. But it would require a bit of hacking to do that extra text styling.”

---

<div class="post-metadata">

**Author:** ![eugene](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/eugene/32/1911_2.png) [@eugene](https://gramps.discourse.group/u/eugene)\
**Post date:** [March 13, 2024, 5:31pm UTC](https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106/3 "2024-03-13T17:31:08Z")

</div>

It’s the standard detailed descendant report.

Maybe a better question is:  
Is there a standard way in Gramps to do this?  
Is there an example somewhere?

---

<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:** [March 13, 2024, 5:57pm UTC](https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106/4 "2024-03-13T17:57:07Z")

</div>

> [@eugene](#):
>
> Is there a standard way in Gramps to do this?

No. There is no method inside the interface. This requires hacking the source code for the report.

> [@eugene](#):
>
> Is there an example somewhere?

No. But there are [references for writing a report](https://gramps-project.org/wiki/index.php/Report-writing_tutorial#Document_interface). And you are essential suggesting a re-write of the report.

This is a built-in report. Which makes is a bit less accessible for hacking.

On my Fedora Linux, the file is at  
`/usr/lib/python3.11/site-packages/gramps/plugins/textreport/``detdescendantreport.py`

On GitHub, it is at :  
[`https://github.com/gramps-project/gramps/blob/master/gramps/plugins/textreport/``detdescendantreport.py`](https://github.com/gramps-project/gramps/blob/master/gramps/plugins/textreport/detdescendantreport.py)

The next step is to find where the data is printed in the report. Then to try insert the text styling for the witnesses and spouse.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 13, 2024, 6:19pm UTC](https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106/5 "2024-03-13T18:19:45Z")

</div>

> [@eugene](#):
>
> Is there a standard way in Gramps to do this?  
> Is there an example somewhere?

Have a look in the [TextDoc](https://gramps-project.org/docs/gen/gen_plug.html#gramps.gen.plug.docgen.textdoc.TextDoc) documentation. There are methods like `start_bold` and `start_underline` that you can use. I can’t see an equivalent for italics though.

You can also define you own [ParagraphStyle](https://gramps-project.org/docs/gen/gen_plug.html#gramps.gen.plug.docgen.paragraphstyle.ParagraphStyle) containing a [FontStyle](https://gramps-project.org/docs/gen/gen_plug.html#gramps.gen.plug.docgen.fontstyle.FontStyle).

If you want to make these styles user definable options then things can a bit more complex.

The best examples can be found in the code.

---

<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:** [March 13, 2024, 6:23pm UTC](https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106/6 "2024-03-13T18:23:04Z")

</div>

I [posted an example about modifying this particular report](https://gramps.discourse.group/t/commonly-seen-genealogical-reports-that-are-not-supported/3367?) to make the defaults more like the the standard for the “_National Genealogical Society Quarterly_”

The modification was about including their ancestry “breadcrumb” notation. (Never got that functional.)

> [@Commonly seen Genealogical Reports that are not supported](https://gramps.discourse.group/t/commonly-seen-genealogical-reports-that-are-not-supported/3367/5):
>
> **David⁴ Jᴏɴᴇs.** (Charlie³ Jᴏɴᴇs, Alice², Bob¹ Sᴍɪᴛʜ)

But it included some styling: boldface, superscript and small caps.

---

<div class="post-metadata">

**Author:** ![eugene](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/eugene/32/1911_2.png) [@eugene](https://gramps.discourse.group/u/eugene)\
**Post date:** [March 13, 2024, 8:16pm UTC](https://gramps.discourse.group/t/reports-normal-italic-and-bold-within-a-paragraph/5106/7 "2024-03-13T20:16:00Z")

</div>

Thank you very much Nick!  
It was this documentattion that I needed.  
Strange there is no “start\_italic” though.

In printing the spouses names “bold”, I have the problem that the narrator returns complete sentences. I will have to see how I can make only the names bold.
