Removal of trailing spaces in v 5.0

I have noticed that JabRef 5.0 (as well as the daily build of 5.1) re-saves, and therefore reformats, all entries with trailing spaces within {}.

This looks like a reasonable and innocent change, but it actually makes one of our file corrupted: for some reason, some of my colleagues like to add '\ ’ after initials, so the files includes name entries like {Surname, A.\ B.\ }. Obviously, if one simply removes the trailing space there, the closing ‘}’ gets escaped and the parsing fails.

I am uncertain whether to report this as a bug, since having '\ ’ is probably not a standard/recommended thing to do - but on the other hand, JabRef should probably not corrupt files anyway?

By the way, what is the motivation behind this change in the first place, were the spaces causing any problems?

1 Like

Appending the backslash \ to each initial is inappropriate when people names are located in the author field.

For bib files working with BibTeX/BibLaTeX, people names should be Surname, A. B. or A. B. Surname, instead of {Surname, A.\ B.\ }. See Tame the BeaST (Section 11 ‘The author field’) for more details.

As for appending backslashes to periods following UPPERCASE letters, I think it is usually unnecessary for name initials, because LaTeX presumes that periods following UPPERCASE letters are part of abbreviations, which lead LaTeX to place word spacing, whereas periods following lowercase letters are presumed to mark ends of sentences, which lead LaTeX to place sentence spacing.

Sometimes extra information should be provided for LaTeX to handle spacing correctly:

  1. Surname et al.\ go. instead of merely Surname et al. go.
  2. A sentence ends with uppercase letter X\@. instead of merely A sentence ends with uppercase letter X.

Full examples: examples of `.\ ` and `\@.` - LaTeX4technics

2 Likes

Would you mind opening an issue for this at github @gaochenyi ?

And post the link to the github issue here?

I’d like to.

But OP’s use case, \ after initials in the author filed, is simply wrong. And I could not figure out a valid use case for this format behavior

Yes, I mean for this part of your post :smiley: Unless Jabref can already automatically detect these cases. As for solution: I am thinking of cleanup action or integrity check. Or both.