-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent casing of custom field names #10590
Comments
Thank you for the report. Maybe it is too late here, but what is the Current comments/state. Need to discuss this in our devcall.
I think, I understood, what does not work, but I did not quite understand of the solution what you disre. I try to guess:
|
Hi, thanks a lot for your reply.
Oops, yes I meant Entry Editor 🤦
What I meant is no matter how you edit the file - even in an external editor - at the end of the day JabRef takes liberty to forcefully save it with field names lowercased. I'm personally fine with this style, I actually prefer it. Still I believe this behavior should be customizable. BibTeX is an open format, BibTeX engines are agnostic to casing and so should be a bibliography manger... With respect to the current issue, the BibTeX source could be JabRef's source of truth for UI casing, it should not necessarily be such, though. I somehow can imagine it would be quite painful to try to sync BibTeX source to the customized entry setting. Better the other way around - this is one possible solution to the current issue - sync the customized entry setting to the BibTeX file. That is the customized entry setting becoming the only and sole source of truth for entry formatting, such as casing of BibTeX
It is clear that JabRef needs a sane default of built-in fields, but the casing "case" is not so obvious. Why is it so important?
The problem is with custom field groupings. There are On one hand, this is the issue I'm reporting. On the other hand, it is just a symptom. It seems to me that the cause is the lack of a single source of truth for UI formatting. Somehow, the built-in tabs and custom tabs are handled separately, and so are the built-in and custom fields. I don't know the internals of JabRef nor do I have much experience with Java, but it seems logical to handle these things uniformly - with a single method or with the same function and in one place, either immediately after reading the data or immediately before presenting it to the user - you know that better than I do.
That would probably be quite a bit of a task. How will you decide which entry's fields to use in customization?
It is a potential solution, although not a very intuitive one. Intuitively, I'd look for an option in preferences to change how a program formats its data and not the other way around.
Yes!
Yes, please!
That would be awesome! If I may, I would suggest two possible solutions, either: a) make customized entry setting the single and only place to decide how an entry is formatted in the UI and how it is saved to file Consulting the BibTeX source to decide formatting wouldn't be the best option - the tail shouldn't be wagging the dog. |
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)
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 commentbiblatex source
tabNewfield
Other fields
tab thenewfield
field name is lowercased, as it is in the BibTeX file. In fact, lowercase has been enforced and saved into file!Author
orTitle
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 asRequired fields
orOptional fields
only partially respect JabRef preferencesPreferences > Entry types
and choose the type of your test BibTeX entry, e.g. "Book"Newfield
(uppercase) within that entry type, also make one of the existing built-in fields such asAuthor
lowercasexml
fileDetails pane
, observe that bothNewfield
andAuthor
are uppercase, although one would expectauthor
to become lowercasexml
file, observe thatauthor
is lowercase whileNewfield
is uppercasexml
file, observe that built-in field names are all lowercase, whileNewfield
is uppercase.Newfield
becomes lowercase when done so through preferences.xml
prefs and BibTeXbib
sources.In the
Details pane
, custom tabs do not respect anything, neither BibTeX source, nor preferences.Preferences > Entry Editor
and create a custom tab such asFields:author;newfield
author
always appears uppercase andnewfield
always appears lowercase.Summary
Currently, it is not possible to have a consistent casing across the Details pane and a BibTeX file:
bib
filesxml
preferences file - only custom fields can be saved uppercase injabref-entrytype
fields, though not incustomTabFields
fields.Appendix
The below screenshots should illustrate what is written above.
Preferences > Entry types
Required fields
tabCustom
Fields
tabbiblatex source
tabtest.bib
opened in another editorThe text was updated successfully, but these errors were encountered: