1

I have a long ref1.bib file, and my coauthor has ref2.bib. Some entries appear in both files, but with different keys. I merged the two bib files into ref3.bib, which I included in our shared RevTex project using BibTex.

Can I somehow cite these entries using either of the two names, instead of manually modifying each \cite{} occurrence in the text? Of course, I would like to avoid duplicated entries in the Bibliography.

This is an old question which has been answered, e.g., here, here and here. However, the only working solutions which have been proposed rely on the use of BibLaTeX, which is unfortunately incompatible with RevTex.

  • 2
    Even if you can fix one key as alias of another, is just simpler, faster and safer use some tools as JabRef to find the duplicate, choose which reference is worse (probably they are the same publication, but not identical), remove it, and in the text search and replace the wrong key with the right one. The easy part is to find that "foo" and "bah" keys point to the same publication. The hard part is to choose "bah". Change every \cite{foo} by \cite{bah} is the insignificant part, as this can be done automatically in seconds with any editor. – Fran Jan 27 '23 at 11:37
  • @Fran I guess you're right that it's a relatively quick fix if needed only once, but this problem is extremely common among researchers -- it occurs virtually every time you want to write a paper with someone else, and merge one's bibliographies. In fact, solutions have been included long ago in packages like bibalias or biblatex. – sonarventu Jan 27 '23 at 12:14
  • I know, but at the end of day, one reference should be used and the others ignored, and this cannot be a machine decision, except maybe for exact duplicates, where the election is irrelevant, but often this is not the case. Suppose that you receive, said, four versions of the same publication: one made manually from a printed version, other imported from DOI, another from Google Scholar, and one more from PudMed. Four bibkeys but also four versions. What automatism could tell which of these references is the best? (if there are one, maybe the four will need some fix). – Fran Jan 27 '23 at 13:36
  • @Fran my idea was to modify the .bib file only, manually locate the duplicates, choose which one is the best and give it several names (aliases). This way each author can cite them in the main text with the name they're used to. This is exactly how the field IDS works in BibLaTeX. – sonarventu Jan 28 '23 at 11:06
  • That is the point, the IDS or any method of aliases will not save you of having to locate duplicates, determine yourself which one should be used and then mark the others as duplicates. JabRef detect non-exact duplicates automatically and also can show where (in which latex files and lines) each duplicated is cited, so IMHO it is by far better just change the key in text and then remove the now unused references to maintain a short database of unique references instead of a tangle of linked duplicates. – Fran Jan 28 '23 at 21:22
  • BTW, I would ask to researches to assign keys consistently, for example only by surname+year (e.g., Smith2022). This way the cite will be always the same, and biblatex will warn you of duplicated references, but only one will be printed. – Fran Jan 28 '23 at 21:46

0 Answers0