Reports normal / italic and bold within a paragraph

image

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

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

image

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

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?

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

No. But there are references for writing a report. 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

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.

Have a look in the 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 containing a 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.

1 Like

I posted an example about modifying this particular report 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.)

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

1 Like

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.