bib2df
bib2df copied to clipboard
Editor field is lost when reading and writing with `separate_names = TRUE`
My example bibtex file has an entry of an edited volume, for which there is an editor field but not an author field.
@book{DeBruijn2011,
address = {Hoboken, NJ, USA},
booktitle = {Handb. Mol. Microb. Ecol. II Metagenomics Differ. Habitats},
doi = {10.1002/9781118010549},
editor = {de Bruijn, Frans J.},
file = {:home/michael/articles/Unknown - 2011 - Handbook of Molecular Microbial Ecology II.pdf:pdf},
isbn = {9781118010549},
month = {sep},
publisher = {John Wiley {\&} Sons, Inc.},
title = {{Handbook of Molecular Microbial Ecology II}},
url = {http://doi.wiley.com/10.1002/9781118010549},
year = {2011}
}
When I read and write the bibtex file with separate_names
, the editor field is dropped, and an author field with "," is added. But it works ok without separate_names. If I run
tb <- bib2df::bib2df("/tmp/library.bib", separate_names = TRUE)
bib2df::df2bib(tb, "/tmp/library-1.bib")
tb <- bib2df::bib2df("/tmp/library.bib", separate_names = FALSE)
bib2df::df2bib(tb, "/tmp/library-2.bib")
Then in library-1.bib
I get
@Book{DeBruijn2011,
Address = {Hoboken, NJ, USA},
Author = {,},
Booktitle = {Handb. Mol. Microb. Ecol. II Metagenomics Differ. Habitats},
Month = {sep},
Publisher = {John Wiley {\&} Sons, Inc.},
Title = {{Handbook of Molecular Microbial Ecology II}},
Year = {2011},
Doi = {10.1002/9781118010549},
File = {:home/michael/articles/Unknown - 2011 - Handbook of Molecular Microbial Ecology II.pdf:pdf},
Url = {http://doi.wiley.com/10.1002/9781118010549},
Isbn = {9781118010549}
}
and in library-2.bib,
@Book{DeBruijn2011,
Address = {Hoboken, NJ, USA},
Booktitle = {Handb. Mol. Microb. Ecol. II Metagenomics Differ. Habitats},
Editor = {de Bruijn, Frans J.},
Month = {sep},
Publisher = {John Wiley {\&} Sons, Inc.},
Title = {{Handbook of Molecular Microbial Ecology II}},
Year = {2011},
Doi = {10.1002/9781118010549},
File = {:home/michael/articles/Unknown - 2011 - Handbook of Molecular Microbial Ecology II.pdf:pdf},
Url = {http://doi.wiley.com/10.1002/9781118010549},
Isbn = {9781118010549}
}