Open myshevchuk opened 1 year ago
Thank you for the report.
Maybe it is too late here, but what is the Details
pane? Is it our entry editor?
Current comments/state. Need to discuss this in our devcall.
biblatex source
tab, there is no sync to the customized entry setting. Thus, the behavior could be "random".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.
Maybe it is too late here, but what is the Details pane? Is it our entry editor?
Oops, yes I meant Entry Editor 🤦
- When adding a field in the biblatex source tab, there is no sync to the customized entry setting. Thus, the behavior could be "random".
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 @EntryTypes
vs @entrytypes
and FieldNames
vs fieldnames
or even fieldNAMES
- the user is absolutely free to decide.
- We decided to have JabRef defining the build-in BibTeX fields (including casing) - and that a user cannot change that.
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?
- required/optional fields grouping in the entry editor is a field we did not touch for a long time. We could resume working here.
The problem is with custom field groupings. There are required field
and optional fields
tabs, which are built-ins. And then there is an absolutely fantastic feature to create one's own custom tabs. Whereas the built-in tabs such as required/optional fields
do respect customized entry settings, the custom tabs disregard customized entry settings and always display built-in fields uppercase and custom fields lowercase. So if one creates a custom Entry Editor tab with built-in and custom fields in it, such as Author
and Newfield
, then the built-in Author
will always be displayed uppercase and newfield
will always be displayed lowercase, even though Newfield
is uppercase in the customized entry setting. This is shown in the third screenshot and currently cannot be changed by the user.
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.
- Adding new fields in BibTeX source should lead to an addition to the customization
That would probably be quite a bit of a task. How will you decide which entry's fields to use in customization?
- Changing a field case in BibTeX source should lead to a change in the customization (to refactor all other fields)
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.
- Changing casing for Standard fields should also be reflected (enabling overwrite of JabRef's custom style. Refs https://github.com/JabRef/blog.jabref.org/pull/47)
Yes!
- Fix configuration of custom tabs to show the field casing as configured in the entry type customization
Yes, please!
- Have preferences export/import respecting the configuration of custom entry types
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 b) make a bunch of explicit preferences options to decide how to format field names, entry types and so on
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 editor