jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Inconsistent casing of custom field names

Open myshevchuk opened this issue 8 months ago • 2 comments

JabRef version

5.11 (latest release)

Operating system

macOS

Details on version and operating system

MacOS 13.6 (22G120)

Checked with the latest development build (copy version output from About dialog)

  • [X] I made a backup of my libraries before testing the latest development version.
  • [X] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

Casing of custom field names is inconsistent in several different ways as described below. I believe these inconsistencies may have been introduced with #9993, at least partly.

In the Details pane, casing does not respect the bibtex file in contrary to what is declared in this comment

  1. Create a new custom field in the biblatex source tab
  2. Make the field name upper case, e.g. Newfield
  3. Save, close and reopen file
  4. Observe that in the Other fields tab the newfield field name is lowercased, as it is in the BibTeX file. In fact, lowercase has been enforced and saved into file!
  5. Observe that built-in BibTeX fields such as Author or Title are always uppercase in the UI and always lowercase in the BibTeX file.

Now, there is a way to make custom fields appear uppercase, but

In the Details pane, built-in tabs such as Required fields or Optional fields only partially respect JabRef preferences

  1. Go to Preferences > Entry types and choose the type of your test BibTeX entry, e.g. "Book"
  2. Create a custom field Newfield (uppercase) within that entry type, also make one of the existing built-in fields such as Author lowercase
  3. Export preferences into an xml file
  4. Quit and start JabRef anew
  5. In the Details pane, observe that both Newfield and Author are uppercase, although one would expect author to become lowercase
  6. In the xml file, observe that author is lowercase while Newfield is uppercase
  7. In the xml file, observe that built-in field names are all lowercase, while Newfield is uppercase. Newfield becomes lowercase when done so through preferences.
  8. JabRef enforces the built-in field names to appear always uppercase in the UI and always lowercase in files, both xml prefs and BibTeX bib sources.

In the Details pane, custom tabs do not respect anything, neither BibTeX source, nor preferences.

  1. Go to Preferences > Entry Editor and create a custom tab such as Fields:author;newfield
  2. Observe that no matter what, author always appears uppercase and newfield always appears lowercase.

Summary

Currently, it is not possible to have a consistent casing across the Details pane and a BibTeX file:

  1. Built-in field names are always lowercase
  2. Custom field names can be made both, but not in custom tabs
  3. Lowercase is enforced in bib files
  4. Lowercase is almost exclusively enforced in xml preferences file - only custom fields can be saved uppercase in jabref-entrytype fields, though not in customTabFields fields.

Appendix

The below screenshots should illustrate what is written above.

Preferences > Entry types

Screenshot 2023-10-27 at 15 15 59

Required fields tab

Screenshot 2023-10-27 at 14 53 20

Custom Fields tab

Screenshot 2023-10-27 at 14 59 10

biblatex source tab

Screenshot 2023-10-27 at 14 59 54

test.bib opened in another editor

Screenshot 2023-10-27 at 15 00 40

myshevchuk avatar Oct 27 '23 13:10 myshevchuk