Help sought on understanding Name format display options

I use a surname-first Display Name format. As alternative names, I want to add the Title to the names of those who have a title, e.g. Sir or Dr… If I add this to the Name format, so e.g. “Surname, Title Given”, the comma after Surname is missing for anyone without a Title, which is most people in my database.

Today I posted something on the bug tracker about this that has now been closed so I cannot comment further.The response to the issue posting was “With the Name Display set to “Surname, Title Given” the comma gets linked to the Title field. If the Title field exists, include the comma. If not, do not include the comma. Then it adds the Given name field information.” I follow this as it describes the behaviour I am observing, but I don’t understand why the comma gets linked to the Title field not the Surname and is not included if there is no title.

If this is the standard behaviour what other ways can I achieve what I am after which is to allow the use of and show titles in alternative names yet still have a “Surname, Given” display for those who don’t have a title?

Gramp 5.1.5, Fedora/openSUSE

TIA
Tony

Welcome

Gramps allows you to set up how you want names displayed and allows users able to create custom options in addition to the standard options.

The option selected in Preferences becomes both the default Display and Sort option. As you describe, the default option set in Preferences does not meet the needs for all names.

In a person’s record editor, the basics of the Preferred name are displayed. The advanced option can be accessed by the Name Editor icon found just after the Suffix field or through the person’s Names tab.

In addition to expanded surname options, two options on the General tab are options to override the name display and/or the sort option for that record.

In your scenario, individuals with Titles can have their display to have that option.

I have a similar situation with records with a Title. My default Name Display option is “Title Given "Nickname" Surname, Suffix”. This works well except for those names with a Title which while displaying as desired, the sort gets messed up. For these records I override the sort to “Given Surname, Suffix

Looking at the code, I noticed a comment that says if the formatting string starts with an exclamation point, then all punctuation is used verbatim. This solves the issue with Title, but then the parentheses always appear even when there is no nickname.

1 Like

I don’t know if this is possible, but maybe instead of a comma you could use a single low quotation mark (Unicode 201A) which looks like a comma. Then I imagine the code would not strip it out.

That’s great information. Thank you!

Note that the example person shown in the Name Editor has been requested as an addition to yhe example.gramps file. This would allow verification that name formatting behavior is as predicted in the format editor and for use in trsting reports.

https://gramps-project.org/bugs/view.php?id=12203

Thank you George. This ‘work-around’ of using U+201A appears to work on both the on-screen display and in the reports that I have tried so far. I entered it by typing it up in a word processor, where I could enter the special character, then copying and pasting it into the editor as I don’t know how to add special characters in the editor.
I’m still unclear what the logic is for the coding that removes the comma if there is no title. If the logic is not sound, there shouldn’t be a need for a work-around. If it is sound then maybe the work-around could be added to the documentation somewhere.

Me too. When I use the format “Surname, Given” the comma always appears, even for people who have no Given name (or no Surname, or neither). So I don’t understand why “Surname, Title Given” doesn’t work the same way.

I’m glad the workaround worked!