Closed jennhu closed 4 years ago
Unfortunately not currently, no.
I think it would be fairly easy to add a switch to ignore entries with duplicate keys regardless of whether or not --file
or *
for the bibliography setting is used. I think we would just have to filter out those duplicates right after compiling the bibliography object around here.
@inukshuk It seems that multiple bibs with the same key get added into the bibliography database with different keys. Is that intended? If so, would a duplicate require matching all fields of an entry other than the key?
@book{ruby,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2008},
publisher = {O'Reilly Media}
}
@book{ruby,
title = {Smalltalk Best Practice Patterns},
author = {Kent Beck},
year = {1996},
publisher = {Prentice Hall}
Ends up being as follows. Note the key rubz
@book{ruby,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2008},
publisher = {O'Reilly Media}
}
@book{rubz,
title = {Smalltalk Best Practice Patterns},
author = {Beck, Kent},
year = {1996},
publisher = {Prentice Hall}
}
I just realized that we already support detecting duplicates (by content of each field in bibtex-ruby
). See here for more
It would be easy to call uniq!
on the bibliography object.
As for disambiguating the keys, yes, it seems we also implemented this in bibtex-ruby
: this code is called when an entry is added to a bibliography object and the key may get changed here. The way this looks there is no easy way to turn this off. We'd have to add an option to bibtex-ruby
to chose between disambiguate, overwrite, skip. Then we could pass that option down from jekyll-scholar with the other bibtex options.
@inukshuk can this be closed?
Yes!
Is there a way to use multiple bibliography files that may contain duplicate entries, without rendering the duplicates? e.g.
but not rendering the entries in
pubs2.bib
that are also present inpubs1.bib
(e.g. by matching the key or matching all fields).Thanks!