-
-
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
How to prevent Jabref add Comments to .bib files? #2944
Comments
Comments at the beginning should not have been destroyed. Refs #1471. Could you please provide an example bib file? Maybe directly as a pull request with a test case? See https://github.com/JabRef/jabref/blob/v4.0-beta/src/test/java/org/jabref/logic/exporter/BibtexDatabaseWriterTest.java#L284 for an example test. We had a very, very long internal discussion (especially in June 2016) about these issues. JabRef's comments do not prevent other toolings from working. Now that we (i) do not reformat existing entries and (ii) keep user comments, the "impact" should be as minimal as possible. We have "Save selected as plain bibtex..." and "New sublibrary based on AUX file". I know that this does not really help if one wants to version a whole database. I also had to get used to these two lines. They really help JabRef to provide an improved user experience. |
JabRef does this on purpose. It stores important metadata information, for example group information. Comments should always be placed at the end of file and they are ignored by the bibtex parser. |
Why don't moving all comment lines to the start OR the end? |
I think that users should have the option to avoid this behavior. Also, it is very annoying that JabRef modifies bib files just by opening them. Unless the user makes any change the files should not be modified. |
Just to add to this with another use-case: We use JabRef to manage thousands of single-entry bib files scattered over many filesystems. In our use case, version control is our top priority. So, we need to employ a script to clean up all extraneous metadata written by JabRef. It would be a boon to have a preference option that would allow a user to disable any comment. |
As I answered before, it is essential for JabRef to have this comments to work with it, as JabRef solely works on the file and stores all relevant information in it. https://stackoverflow.com/questions/6557467/can-git-ignore-a-specific-line |
Yes, that is what we do now. It is fine if the option switch cannot be implemented. Thank you for JabRef! |
@priyadarshan This is a highly demanded feature. In case you or someone of your time found time to dive into our safe logic, you are very welcome to do so! We currently have an option to export the bib without these headers, but this is not user friendly at all. |
@koppor Thank you for pointing out JabRef's "Save selected as plain BibTex" menu option. That is exactly what we need. Currently nobody on our team work in Java, but as I will keep an eye in case a Java programmer joins us. It would be nice if this effective way of dealing with the issue could be highlighted in the documentation. That would help all users dealing with a similar case like ours. Thank you again, and thank you to JabRef developers! |
Jabref adds Comments to the start and end of .bib files after edited them.
like these:
And I do not want this lines added.
Also, the original comments at the start of .bib files were replaced by
Encoding
part.I just only want to modify the terms.
How to deal with it?
The text was updated successfully, but these errors were encountered: