Skip to content
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

Editor field is lost when reading and writing with separate_names = TRUE #47

Open
mikemc opened this issue Mar 5, 2021 · 0 comments
Open

Comments

@mikemc
Copy link

mikemc commented Mar 5, 2021

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}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant