diff --git a/_posts/2020-08-20-bibtex-file-changes-over-time.md b/_posts/2020-08-20-bibtex-file-changes-over-time.md new file mode 100644 index 0000000..bcea356 --- /dev/null +++ b/_posts/2020-08-20-bibtex-file-changes-over-time.md @@ -0,0 +1,248 @@ +--- +title: BibTeX file changes over time +id: bibtex-file-changes-over-time +author: "[Oliver Kopp](https://github.com/koppor/)" +--- + +JabRef changed the writing of a BibTeX file over time. +This blog article aims presenting the different BibTeX contents for different JabRef versions. +The semantics of the content was never changed, but the "layout" in the file. +That lead to huge complaints over the time. +Especially, when a group used different JabRef versions. + +The JabRef team decided in 2015 that this side effect is not acceptable and that only the parts of the bibliopgraphy touch by JabRef should be rewritten. +This was implemented in JabRef 3.1, released on 2015-12-24. + +The discussions on a "useful" serialization of BibTeX entries continues. +This blog post lists the evolution of JabRef's chosen serialzation over time. +The aim is to i) make the changes over time transparent and ii) to support discussions on a "useful" serialization format. + +The example used can be found in [bibtex-file-changes-over-time-demo.bib](../bib/bibtex-file-changes-over-time-demo.bib). + +We illustrate the different serialiaztions using the following artificial entry: + +```bibtex +@PhdThesis{6, + Title = {Title is required}, + Author = {Field, Required}, + Abstract = {Abstract is optional. + It is a multiline field}, + AbsolutelyCustom = {AbsolutelyCustom is a custom field} +} +``` + +The BibTeX entry type "Phd Thesis" consits of required and optional fields. +Additionally, fields not defined by BibTeX can be added. +We call these fields "custom fields". + +Please note that there is not really a "BibTeX standard". +Each BibTeX bibliography style file (`.bst`) defines the fields it displays in the bibliography on its own. +As a consequence, in some papers the `url` field is shown, in some it is not, even though it is defined in the `.bib` file. + +## History + +### JabRef 2.0 to JabRef 2.9.2 + +- Types are in upper case letters: `@ARTICLE` +- Keys in lower case letters: `author` +- First the required fields, then the optional fields (each group sorted alphabetically) +- No alignment key/value separators (`=`) +- Multiline-content of a field start with a tab. + Multiline-content reformatted as paragraphs have to be separated by an empty line (similar to LaTeX and Markdown). + +```bibtex +@PHDTHESIS{5, + title = {Title is required}, + absolutelycustom = {AbsolutelyCustom is a custom field}, + abstract = {Abstract is optional. It is a multiline field}, +} + +@ARTICLE{smith1980, + author = {John Smith}, + title = {How I Weave Baskets Underwater}, + journal = {Journal of Underwater Basket Weaving and Nonsensical Latin Placeholder + Texts}, + year = {1980}, + abstract = {Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit + in voluptate velit esse cillum dolore eu fugiat nulla pariatur. + Excepteur sint occaecat cupidatat non proident, sunt in culpa qui + officia deserunt mollit anim id est laborum.}, +} +``` + +### JabRef 2.10 + +- Types in camel case: `@InProceedings` +- Keys in camel case: `Year`, `Url` - optionally in lower case +- (optional) Alignment of key/value separators (`=`) +- Separation of required and optional field with an empty line +- First the `title` of a paper, then other required fields, then the optional fields +- Multiline-content of a field starts with a tab +- Newlines are kept in the field content (and are not interpreted as LaTeX or Markdown does) +- Leading spaces are trimmed + +See also + +```bibtex +@PhdThesis{6, + Title = {Title is required}, + + Absolutelycustom = {AbsolutelyCustom is a custom field}, + Abstract = {Abstract is optional. + It is a multiline field} +} + +@Article{smith1980, + Title = {How I Weave Baskets Underwater}, + Author = {John Smith}, + Journal = {Journal of Underwater Basket Weaving and Nonsensical + Latin Placeholder Texts}, + Year = {1980}, + + Abstract = {Lorem ipsum dolor sit amet, consectetur adipiscing + elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis + nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore + eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia + deserunt mollit anim id est laborum.} +} +``` + +The header included an advertisement on "JabRef": + +```latex +% This file was created with JabRef 2.10. +% Encoding: Cp1252 +``` + +### JabRef 2.11 + +This version was released on 2015-11-16 and introduced configuration options for saving the fields: + +![JabRef 2.11 Field Saving Options](../img/jabref-2.11-saving-options.png) + +Field groups are not separated by an empty line any more: + +```bibtex +@PhdThesis{6, + Title = {Title is required}, + Absolutelycustom = {AbsolutelyCustom is a custom field}, + Abstract = {Abstract is optional. + It is a multiline field} +} +``` + +### JabRef 3.0 + +No more advertisement in the header any more: JabRef shows the "Encoding" information only: + +```latex +% Encoding: UTF-8 +``` + +The content of multiline fields is not indented any more. +When reading a pre-3.0 file, leading spaces are shown as is. + +![JabRef 3.0 abstract editing](../img/jabref-3.0-abstract-multiline.png) + +This is the result of a long internal discussion. +The main reason was that JabRef cannot properly distinguish whether the indent of a file is intend or whether the indent originated from a pre-3.0 file. +Implementing heuristics (e.g., all lines are starting with the same amount of space characters) was neglected, +because such code needs to be maintained and the team wants to focus to improve maintainability of JabRef: +Fix bugs and implement new features in a maintainable way. + +### JabRef 3.1 + +JabRef 3.1 was released on 2015-12-24. +Up to JabRef 3.0, the whole bibliography file was rewritten, which led to huge discussions by users. +This version wrote the entries as they were, in case the user did not change any content. +In the case of a change, JabRef's own style was used. +Nevertheless, the sort order of the file could lead to a rewrite of the file, so users had to ensure proper configuration + +![JabRef 3.1 save sort order options](../img/jabref-3.1-save-sort-order-options.png) + +To ease collaboration with others, JabRef introduced storing the save order config locally in a BibTeX database: + +![JabRef 3.1 Local Save Order Options](../img/jabref-3.1-local-save-sort-order-options.png) + +JabRef changed the alignment of `=` signs. +They are are now directly followed after the key. +The values are still aligned (all `{` of one entry are put above each other) + +Keys are written lowercase again, required fields before optional ones. +Alphabetically, even `title` is sorted in alphabetically. + +```bibtex +@PhdThesis{1, + author = {a}, + title = {t}, + school = {s}, + year = {2015}, + abstract = {a}, + directory = {d} +} +``` + +### JabRef 3.3 to 3.5 + +JabRef 3.3 was released at 2016-04-17. +The equal sign at keys is aligned with the content again: + +```bibtex +@PhdThesis{1, + author = {a}, + title = {t}, + year = {2015}, + abstract = {a}, + directory = {d}, + school = {s}, +} +``` + +As default, there is no file sorting any more. +This means, in a non-configured JabRef, the order of the entries in the file does not change when saving the file ("Save entries in their original order"). + +One can still configure the sort ordering of a specific database. + +### JabRef 3.6 to 5.0 + +JabRef 3.6 was released on 2016-08-26. +In this version, comments are now preserved. +For instance, `% Comment` is kept in the `.bib` file: + +```bibtex +% Comment + +@Article{smith1980, + author = {John Smith}, + title = {How I Weave Baskets Underwater}, + journal = {Journal of Underwater Basket Weaving and Nonsensical + Latin Placeholder Texts}, + year = 1980, + abstract = {Lorem ipsum dolor sit amet, consectetur adipiscing + elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis + nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore + eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia + deserunt mollit anim id est laborum.}, +} +``` + +The functionality was introduced in [#391](https://github.com/JabRef/jabref/pull/391). + +## Links + +- Discussion on the seralization format: +- Discussion on blank lines: +- Discussion on storing the serialization settings within the BibTeX file: +- PR on sorting entries on save: +- Issue on wrapping fields: diff --git a/bib/bibtex-file-changes-over-time-demo.bib b/bib/bibtex-file-changes-over-time-demo.bib new file mode 100644 index 0000000..d4b4555 --- /dev/null +++ b/bib/bibtex-file-changes-over-time-demo.bib @@ -0,0 +1,181 @@ +% This file was created with JabRef 2.9.2. +% Encoding: UTF-8 + +@PHDTHESIS{1, + author = {a}, + title = {t}, + school = {s}, + year = {2015}, + abstract = {a}, + directory = {d} +} + +@PHDTHESIS{2, + author = {a}, + title = {t}, + school = {s}, + year = {2015}, + abstract = {a}, + directory = {d} +} + +@PHDTHESIS{3, + author = {a}, + title = {t}, + school = {s}, + year = {2015}, + abstract = {a}, + directory = {d} +} + +@ARTICLE{BBalakrisnan2009PatterningPDMSusingacombinationofwetanddryetchingJournalofMicromechanicsandMicroengineering, + author = {B Balakrisnan and S Patil and E Smela}, + title = {Patterning PDMS using a combination of wet and dry etching}, + journal = {Journal of Micromechanics and Microengineering}, + year = {2009}, + volume = {19}, + pages = {047002}, + number = {4}, + abstract = {PDMS films of 10 μm thickness can be patterned within 30 min by combining + dry etching to achieve substantially vertical sidewalls with wet + etching to achieve high etch rates and to protect the underlying + substrate from attack. Dry etching alone would have taken 5 h, and + wet etching alone would produce severe undercutting. In addition, + using either technique alone produces undesirable surface morphologies. + The mask used during etching is critical to a successful patterning + outcome. E-beam evaporated Al was found to work well, adhering strongly + to oxygen-plasma-treated PDMS and holding up well during both dry + and wet etching. To prevent wrinkling of the PDMS, a fast deposition + rate should be used.}, + file = {BBalakrisnan2009PatterningPDMSusingacombinationofwetanddryetchingJournalofMicromechanicsandMicroengineering.pdf:JabRef\\BBalakrisnan2009PatterningPDMSusingacombinationofwetanddryetchingJournalofMicromechanicsandMicroengineering.pdf:PDF}, + timestamp = {09.06.17.13.03}, + url = {http://stacks.iop.org/0960-1317/19/i=4/a=047002} +} + +@PHDTHESIS{5, + author = {Field, Required}, + title = {Title is required}, + absolutelycustom = {AbsolutelyCustom is a custom field}, + abstract = {Abstract is optional. It is a multiline field} +} + +@PHDTHESIS{6, + author = {Field, Required}, + title = {Title is required}, + absolutelycustom = {AbsolutelyCustom is a custom field}, + abstract = {Abstract is optional. It is a multiline field} +} + +@PHDTHESIS{7, + author = {Field, Required}, + title = {Title is required}, + absolutelycustom = {AbsolutelyCustom is a custom field}, + abstract = {Abstract is optional. It is a multiline field. Each line started with + a tab character.} +} + +@INPROCEEDINGS{tag1, + author = {Lastname, Firstname}, + title = {this is the titel}, + year = {2015}, + month = jun, + abstract = {The Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog.}, + journal = {Journal on Journaling} +} + +@INPROCEEDINGS{tag2, + author = {Lastname, Firstname}, + title = {this is the titel}, + year = {2015}, + month = jun, + abstract = {The Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog. The + Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps + Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog.}, + journal = {Journal on Journaling} +} + +@INPROCEEDINGS{MMM10, + author = {Malathi, S and Maheswari, S Uma and Meena, C}, + title = {Fingerprint pore extraction based on Marker controlled Watershed + Segmentation}, + booktitle = {Computer and Automation Engineering (ICCAE), 2010 The 2nd International + Conference on}, + year = {2010}, + volume = {3}, + pages = {337--340}, + organization = {IEEE}, + file = {:Pores\\Malathi Maheswari Meena 2010 - Fingerprint pore extraction based on Marker controlled Watershed Segmentation.pdf:PDF}, + url = {http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5451426} +} + +@ARTICLE{smith1980, + author = {John Smith}, + title = {How I Weave Baskets Underwater}, + journal = {Journal of Underwater Basket Weaving and Nonsensical Latin Placeholder + Texts}, + year = {1980}, + abstract = {Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in + voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum.} +} + +@ARTICLE{Xu2020a, + author = {Xu, Jun and Sun, Mouyuan and Xue, Yongquan}, + title = {AGNs are not that cool: revisiting the intrinsic AGN far-infrared + spectral energy distribution}, + year = {2020}, + archiveprefix = {arXiv}, + eprint = {2003.10078}, + groups = {Covid subgroup}, + primaryclass = {astro-ph.GA} +} + +@COLLECTION{Hsu1993, + booktitle = {Special issue on workflow and extented transaction systems}, + editor = {M. Hsu}, + publisher = {IEEE Computer Society}, + year = {1993}, + month = {6}, + number = {2}, + series = {Bulletin of TC on Data Engineering}, + volume = {16} +} + +@PHDTHESIS{4, + a = {a}, + d = {d}, + s = {s}, + t = {t}, + y = {2015} +} + +@comment{jabref-entrytype: Collection: req[booktitle;editor;publisher;year] opt[abstract;month;number;series;volume]} + diff --git a/img/jabref-2.11-saving-options.png b/img/jabref-2.11-saving-options.png new file mode 100644 index 0000000..c34fa48 Binary files /dev/null and b/img/jabref-2.11-saving-options.png differ diff --git a/img/jabref-3.0-abstract-multiline.png b/img/jabref-3.0-abstract-multiline.png new file mode 100644 index 0000000..12fd587 Binary files /dev/null and b/img/jabref-3.0-abstract-multiline.png differ diff --git a/img/jabref-3.1-local-save-sort-order-options.png b/img/jabref-3.1-local-save-sort-order-options.png new file mode 100644 index 0000000..165ac21 Binary files /dev/null and b/img/jabref-3.1-local-save-sort-order-options.png differ diff --git a/img/jabref-3.1-save-sort-order-options.png b/img/jabref-3.1-save-sort-order-options.png new file mode 100644 index 0000000..102659a Binary files /dev/null and b/img/jabref-3.1-save-sort-order-options.png differ