Jabref: Inconsistent { } / Protected Term Behavior

Created on 5 May 2016  ·  13Comments  ·  Source: JabRef/jabref

JabRef version 3.3 on OSX 10.11.4

Steps to reproduce:

  1. Create new BibTeX database. Add Article entry with "A Library Based on {ENDF/B-VII.0} Using the {CPXSD} Methodology" for author/title/journal/year. Generate bibkey.
  2. Cleanup with settings in screenshot below. Note that the title is preserved as it stands.
  3. Save database.
  4. Quit JabRef and re-open, open previous database. Notice that the title is now missing {}s around CPXSD but they are still present around ENDF/B-VII.0.
  5. Cleanup with the settings below. This will now cause CPXSD to go to Title Case (i.e., Cpxsd).

I would expect that the {}s be either universally preserved (preferred) or universally removed.

Please let me know if you would like to see my preferences; however, I cannot find anything that would provoke this behavior.

screen shot 2016-05-04 at 6 13 28 pm

cleanup-ops bug 🐛 documentation

Most helpful comment

:+1: for removing this preference option.

All 13 comments

Can a developer please weigh in on whether this is expected behavior?

I can't reproduce the problem with the latest developer build available under http://builds.jabref.org/master/. On save "A Library Based on {ENDF/B-VII.0} Using the {CPXSD} Methodology gets written to the bib file and is correctly read if I open the file again.
Could you please check the latest build and make sure that you don't have any save actions activated (under File -> Database properties).

(Your last step 5 is expected behavior.)

@tobiasdiez Thanks for taking a look at this! Indeed, when I save the file with {CPXSD} in the title using 3.4dev, and re-open, the {}s have disappeared. I do not have any save actions enabled.

See attached minimum database.

Looking at it with a text editor, I see {CPXSD} but when I load it in 3.4dev, I see CPXSD as shown below.

screen shot 2016-05-09 at 9 40 22 am

jabref.bib.zip

Very strange, I cannot reproduce on my machine either using the latest master build. Maybe an issue with the preferences?

Could you post your settings? Options -> Preferences -> Export preferences

Please see attached, as exported from 3.4dev.
jkulesza_settings.prefs.zip

Can confirm this is a preferences issue.

  1. Load your prefs
  2. Load your file
  3. Title shows the false version (but Bibtex source shows the correct one still)
  4. save it, and the thing from the title is saved on the disk

The issue is "Store the following fields with braces around capital letters: "title"" This is somehow broken. If you remove this setting, the title field will be loaded correctly.

Excellent, thanks for the quick diagnostics, can confirm that fixed it.

Should I leave this issue open to track the broken preference behavior?

I am kind of in favor of deleting this function as it performs too much magic and does not work correctly. It is also somewhat replaced with save actions, as they can handle the escaping with brakets as well. @JabRef/developers what do you think?

Advantages

  • parsing a bib file is getting simpler
  • on load, we just use the contents of the field
  • on save, we can add brakets around capital letters using save actions
  • less magic, more transparency
  • as we aim to move towards having a latex free version of each field, this can also help as well
  • I do not see any other use case for the feature

:+1: for removing this preference option.

@simonharrer Please note that there is a website FAQ entry on this that will need to be modified/removed.

http://www.jabref.org/faq/

Q: BibTeX converts uppercase characters to lowercase in my title field. I know this can be prevented by wrapping 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 -> 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. This setting automatically adds braces when saving the bib file, but you won’t see the braces within JabRef.

@jkulesza: Thanks for following up on this. Since the preference option is gone, we should also remove the FAQ entry.

Removed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobiasdiez picture tobiasdiez  ·  4Comments

simonharrer picture simonharrer  ·  3Comments

Braunch picture Braunch  ·  3Comments

Siedlerchr picture Siedlerchr  ·  4Comments

oscargus picture oscargus  ·  3Comments