JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.54k stars 2.47k forks source link

check integrity: title #419

Closed grimes2 closed 8 years ago

grimes2 commented 8 years ago

Check integrity complains always: large capitals are not masked using curly brackets {} Thats not correct: (for example) Title = {{C}urrent {C}hronicle},

simonharrer commented 8 years ago

Cannot reproduce with test case on class that does the check. Can you please double-check?

grimes2 commented 8 years ago

My system seems to be misconfigured. Every entry is affected.

Under "Required fields" I have now changed Current Chronice to {C}urrent {C}hronicle and Check integrity doesn't complain anymore. How can I transfer the brackets from "Bibtex source" to "Required fields"?

matthiasgeiger commented 8 years ago

Ahhh.. :wink:

The braces in the Source view are marking only the begin and the end of each field:

title  = { My Title With some Capital Letters }

If you want to escape capital letters you have to use additional curly braces:

title  = { {M}y {T}itle {W}ith some {C}apital {L}etters }

or:

title  = { {My Title With some Capital Letters} }
grimes2 commented 8 years ago

This is correct and I know this for many years, but my Source is Title = {{C}urrent {C}hronicle} but it complains "large capitals are not masked using curly brackets {}"

matthiasgeiger commented 8 years ago

Are you using the normal BibTeX or BibLaTeX mode?

grimes2 commented 8 years ago

BibTeX mode

simonharrer commented 8 years ago

Can you attach a .bib file which contains such invalid behavior? Can you also export your settings and attach them as well?

matthiasgeiger commented 8 years ago

I think I'm able to reproduce this... sorry for closing this issue to early.

After loading the curly braces in the source are not visible in the UI - changing the title by adding curly braces works and is correctly displayed - after changing the source directly the braces are not visible any more...

grimes2 commented 8 years ago

Yes grimes2_bib.txt grimes2_settings_xml.txt

Sometimes I edit the bibtex source in Entry editor. Thats not quite a good idea.

simonharrer commented 8 years ago

When I open your bib file, it displays correctly. And also no issues are found with my preferences configuration.

Editing in the bibtex source in the entry editor should be no problem. Works with my preferences with no problems.

Probably an issue with the preferences. But this requires more study (and time ...)

grimes2 commented 8 years ago

I've resetted my preferences with java -jar JabRef-3.0.jar -d all. Now everything is o.k. Thanks for your affords.

grimes2 commented 8 years ago

I can now reproduce this issue:

The curly brackets are removed around the capital letters of the field title in all entries. This is maybe, because the field title is by default a field with braces around, so the additional input of "title" in the "Store the following fields with braces around capital letters"-line is causing this trouble.

grimes2 commented 8 years ago

I found this in the FAQ of Jabref:

Q: BibTeX converts uppercase characters to lowercase in my title field. I know this can be prevented by w rapping uppercase letters in braces, e.g. "{T}he life cycle of {A}tlantic salmon", but this is too much work. Can JabRef help? A: JabRef has a setting that will automatically wrap all capital letters for certain fields in { } - this will make sure they are preserved in the LaTeX output. Under Options -> Preferences -> General -> File -> “Store the following fields with braces around capital letters”, make sure the title field is included. To do this for several fields, write e.g. “title;abstract” (without the quotes). This setting automatically adds braces when saving the bib file, but you won't see the braces within JabRef. (Source: http://jabref.sourceforge.net/faq.php)

So it is by design, that JabRef don't show the braces in the title field, but in the BibTeX-code. But then the check integrity message "large capitals are not masked using curly brackets {}" for the title field doesn't make any sense.

lc9275 commented 8 years ago

I have related issues with curly brackets (using a recent dev jabref version). To reproduce: create a new database, and do doi to bibtex from 10.1175/jamc-d-14-0299. Then:

Another doi example: 10.5194/amt-4-1383-2011

I have 100s of warnings from the integrity check on this, so I would be grateful for a solution! Thanks in advance.

oscargus commented 8 years ago

I think this is somehow related to the preference setting "Store the following fields with braces around capital letters". It seems like the curly braces are removed from the table view and the entry editor if this is set for a particular field, but not otherwise. It would make sense to always remove them from the table, but never from the entry editor, independent of the setting.

I'm not a big fan of the title integrity check since it is fundamentally wrong. All these things are determined by the .bst-file and it is OK to write titles in title case, one should just not expect it to stay like that. Also, the correct way is to enclose the complete word in curly brackets, not just the capital letters.

tobiasdiez commented 8 years ago

To support the last point of @oscargus, here a small quote from the biblatex manual:

In bib files designed with traditional BibTeX in mind, it has been fairly common to only wrap single letters in braces to prevent case-changing: title = {An Introduction to {L}a{T}e{X}} The problem with this convention is that the braces will suppress the kerning on both sides of the enclosed letter. It is preferable to wrap the entire word in braces.

stefan-kolb commented 8 years ago

@simonharrer Didn't you remove this auto initialization logic? So we can close this now?

simonharrer commented 8 years ago

Yes, but I think we need to update the FAQ so that save actions should be used. @mlep could you help out here?

stefan-kolb commented 8 years ago

Can we please document this and close the issue in the near future? I'm not really into this so I'd prefer if some of the participants can fix this documentation issue.

mlep commented 8 years ago

Previous Q&A removed by @matthiasgeiger . I have just added a Q&A about save actions . This should also be documented in an help file. I have just created a specific issue for this.

tobiasdiez commented 8 years ago

So I think we can close this.