You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found an edge-case that causes an issue with writing valid .bib files with df2bib. Specifically, I had a .bib entry that had 2 DOI values, like the following:
@Article{test2022,
doi = {DOI_PLACEHOLDER},
doi = {DOI_PLACEHOLDER2}
}
parsing this with bib2df, and then rewriting it with df2bib, then results in something like:
@Article{test2022,
doi = {DOI_PLACEHOLDER},
doi.1 = {DOI_PLACEHOLDER2}
}
However, '.' is not a valid character for a variable name for .bib files (I think; at least had issues knitting a .rmd).
I suspect this would be an easy fix, where you could substitute '.' in variable names with '_' or something?
Cheers
The text was updated successfully, but these errors were encountered:
On second though, I'm not sure this is really a bug. You shouldn't have duplicate fields in entries to start with, so the fact that something is breaking here may actually be a good thing as it alerts you to it.
You should be getting this warning:
Some BibTeX entries may have been dropped.
The result could be malformed.
Review the .bib file and make sure every single entry starts
with a '@'
Hi, thanks for the great package.
I have found an edge-case that causes an issue with writing valid .bib files with df2bib. Specifically, I had a .bib entry that had 2 DOI values, like the following:
@Article{test2022,
doi = {DOI_PLACEHOLDER},
doi = {DOI_PLACEHOLDER2}
}
parsing this with bib2df, and then rewriting it with df2bib, then results in something like:
@Article{test2022,
doi = {DOI_PLACEHOLDER},
doi.1 = {DOI_PLACEHOLDER2}
}
However, '.' is not a valid character for a variable name for .bib files (I think; at least had issues knitting a .rmd).
I suspect this would be an easy fix, where you could substitute '.' in variable names with '_' or something?
Cheers
The text was updated successfully, but these errors were encountered: