Is it possible to highlight the main first name?

GrampsAIO64-5.1.3-2, Windows 10

Many of my anchestors have more than one first name, and annoyingly many of them did not use the first of their given names as their main name – myself included (David Johannes, going by Johannes since before I was born, no clue why my parents did that). I also have many first names who occur many times in the family, e.g. Heinrich naming his son Heinrich Erich, but he goes by Erich.

When I was born, the actually used first name (“Rufname” in German) was underlined in all documents. I also record this in the appropriate field whenever somebody did not use their first given name. I would really like Gramps to also underline one of the given names, whenever a Rufname is saved. That would make it so much easier to pick the right person out of the person lists. Is there any way to do this, with an add-on maybe? Alternatively, how hard might this be to implement? I mainly need it in the name column of the persons view.

Just so you understand, what you are describing is what Gramps has as the Call name. Although the field will accept any name, if the name in the field is not found in the Given name field it will display as Red.

You can create a Display name option on the Display tab in Preferences. Although having the Call name underlined in the list of Given names would be a great option it does not currently exist, and I have no idea how hard that would be.

You can create a Display name option where in addition to the Given name you can add either "Call" or (Call) to the display name. If there is no Call name, the quotes or parenthesis will not display.

There is also the Common name option when creating the display name. If the Call field is filled, that name will be used, or the Nick name or lastly the first of the Given names

There may be a way to add the Call name to the list of column options in the People and Group People views. I’ll experiment.

1 Like

Hello Johannes,

In the person view, it is possible to add a bit of formatting. Dates with errors are shown in bold, and when a person doesn’t have a birth date, the christening date will be shown, in italic.

In both cases, the whole field is shown as bold or italic, not just a part of a field. And since you’re a developer, I suggest that you take a look at the source code, and see how it’s done. And it may be as simple as putting markup codes around the call name.

Thanks for your responses! I took some time yesterday and actually had a look into the source code of Gramps. As a Java and PHP developer I have to say, this is not easy to read and understand at all. Part of it is Python, but also a general lack of comments.

I’m still motivated to create a small AddOn for this, if it can be done. If somebody could point me at a class or file where actual formatting is done, that would be helpful. Mostly, “format” in function names seems to just concern which part of a name to print. :slight_smile:

Your suggestion reads like this would be best suited to bring a modification of the Display Name Editor options. Since its formats cascades through to various Views & Reports.

That already has an option to apply a ‘style’ to change case or compress to initials.

This is just formatting the Given Name with respect to the Call Name value.

The default is that the 1st word of the Given Name is the Call Name if the Call Name is null. So you want the styling to underline the 1st word … unless the Call Name exists & then THAT should be underlined.

I don’t know what is output if you create a Name Format with a Call Name but which does not include a Given Name. (Worth an experiment)

[Hmmm… need to experiment to determine if Call accepts 2-word value when the Given only has 2 words. (Since it was always “Peggy Sue” and neither Peggy nor Sue, even before she got married.) ]

Well, the pointing is easy, but there is a chance that you don’t need it, because there already is an option to include the ‘roepnaam’ in the name display settings. I’m using the Dutch term here, because that was the easiest for me, and I assume that you understand enough to read my screenshot:

If you want, you can also look at the code, on GitHub:

What you can see here is a call to the name displayer class, which reads the settings, and while I’m typing this, I see that @emyoulation already beat me w.r.t. pointing you to the editor.

When you look further down in the PeopleModel, you can also see that for the dates that I mentioned earlier, the code simply adds HTML markup.

My early guess is that the preferences are not enough, because they can only add the Rufname to the format, and not replace its occurance in the string that holds all given names. But that’s easy to test.

Thanks for looking into this. The way Gramps currently shows Call Names is inadequate in the Views.

I have a personal interest in seeing what you develop. My mother was a namesake of her mother and was Called by her middle name after deciding to become Ruthless. Bureaucratically, she was forced to sign “R.Marguerite”. That she shows up in all Gramps displays as “Ruth Marguerite” is … off-putting. I always wished there was a way to use Small style when there was a Call Name. (Since the browser convention for using underling for styling hyperlinks has become ‘a standard’.) So her full name could show as “Ruth Marguerite (née Thompson) McCullough”

@emyoulation would you accept bold instead? I’m with you about the underlines, and I’ve noticed that bold works way better in reports. OTOH, if we can, we could also allow for the user to use the <big> or <small> tags in the name display editor, if they are processed right. That would be up to the user then.

Your mother’s mother’s situation reminds me of the fact that my first name was inspired by a well known archivist who often went by the name H. Enno van Gelder. He died one month before I was born, and my parents heard his name on the radio. The rest is history …

Anyway, I think that highlighting is easy, because we already have similar code in reports too. It’s just a matter of splitting the given name(s) string into words, and then joining them again, while adding the proper mark-up to the one that matches the Call Name.

More flexibility is always nice.

<big> and <bold> are nice.

But (like <underline>), they are emphasizing rather than de-emphasizing. Since the Call Name and Surname would be of equal importance, you’d want to consider them in combination.

I’m not enamoured with the common practice on genealogy of making the surname <UPPER> either. (Although the small-caps text-decoration would be more livable since it decays into plain text with a more natural result.) It seems to have lead to those darn slash (/) encased surnames on import in various databases. But, bad outcome notwithstanding, supporting standards is necessary.

I understand, and I hope that @Ammaletu can figure something out that works. I’ll be happy to test, because I have a few cases like an ancestor of my ex GF named Johan Peter, who was a son of Johan Philip, and used the names Pieter Filippus in The Netherlands.

It doesn’t help much for my own ancestors though, because for them, I have call names that are not identical to any given name. A man baptized as Johannes was often called Jan or Johan, and I now have to use the nickname for that, even though it was not really a nickname.

Slashes are a normal part of the standard, and should be detected. They were the standard way for data entry in PAF at the time, so that you could enter a name like William /Gates/ III in one field.

1 Like

Gramps Web underlines the call name and I vaguely remember there are some reports that do it, too. Indeed would be great to have it im the UI as well.

1 Like

Thanks for all the useful hints towards the source code! It will take a couple of days before I’ll have time for it, but it is on my list. Some birthdays first and a quick holiday. :slight_smile:

Noticed that your profile says that you are using the 5.1.3 version.

That was released 2 years ago. You can look at the 5.1.4 and 5.1.5 summaries for issue that might affect you. Recommend that you download the 5.1.5 version.

And since you are in software development, you might want to use GitHub and experiment with the 5.2 alpha version. Paul ( @prculley ) would probably appreciate another Windows guy to verify test results.

I think I installed Gramps two years ago, then forgot about it and started actually using it last year. So yes, so far I didn’t do an update cause I would really hate if something breaks. But I’ll give it a try. :slight_smile:

I’m sure you already would but… make a backup first.

You might even want to try the PortableApps fork of Gramps 5.1.5 on a USB flashdrive and restore the backup there. (You’ll have to install the add-ons again on the flashdrive.) Examine that on another computer and make sure all your research & media files ported with the backup.

It is nice to have a copy that fits in your pocket.

Was reading a bug report (12391: where one of the secondary issues discussed was about the Call Name underlining disappearing in certain output conditions.

The thread (updated in March 2022) is unclear if that text styling problem was resolved (or resolved in SPECIFIC output formats) with the PR.

However, this might provide an avenue where you can explore Call Name underlining. The example reports might be used as templates for how to add the feature elsewhere.