3

I am working with a co-author on a joint article. Our plan is simple: he writes one part of the paper and I write the other. We join our two parts and our two bib files, compile and are done.

The problem is that he and I may cite the same article/book but using different keys (I cite it from my bib file, he cites it from his bib file). When we compile we end up with many duplicated references in the bibliography.

Is there any way to address this that does not entail changing things manually?

3
  • 1
    LaTeX and BibTeX have no way of telling that two bib entries with different keys actually share the same author, title,year, etc fields. What's the upshot? Your co-author and you will (a) have to merge your respective bib files and, likely, apply some sorting and (b) manually go through the merged file and detect which entries have different keys but are duplicates in all other respects. (Software tools do exist to help with merging and sorting bib files.) For any near-duplicates, you'll also have to decide whose key to retain. How do you and your coauthor manage your bib files? – Mico Feb 7 '20 at 5:39
  • 1
    You have to merge the entries in the bibliography, but it is possible to keep the separate keys. See this question tex.stackexchange.com/q/37233/16895 – Guido Feb 7 '20 at 21:00
  • Mico. Thanks. I use emacs to manage my bibliography (AUCTeX to be precise). I am unsure about my coauthor. Guido. Thanks for this tip. It takes care of at least half of the problem. – SaMeji Feb 8 '20 at 21:44
1

With the help of the comments, and having done some more research, I can provide a partial answer (I am happy to update it as others comment on it). The main strategy to address this problem has two parts.

1) Identify the repeated entries and merge them.

There are a number of tools and scripts out there that can be used to identify duplicate entries in a .bib file. From all of them JabRef seems to be the best one.

2) Create an alias for the two keys that point to the same reference so that both coauthors can use their own key.

  • If you use Biblatex the solution is very simple: under the entry with the key of the entry you are keeping you add the field IDS with the alternate key (i.e., IDS = {secondKey}) (See the selected answer in this Stack Exchange thread for more info)
  • If you use plain BibTex, you need to define a new citation command (\acite) and a \bibalias[1] command that allows you to cite the same entry with two different keys (see here for how to define the new citation command and the alias)[2].

(Incidentally: if you want to share with your coauthor only the references cited in the paper (instead of your entire .bib file) use bibexport. This utility allows you to create a BibTeX file only with the entries that are cited in the document you are coauthoring).

[1]: Don't confuse \bibalias with natbib's \citealias. The latter allows you to cite a reference with a special designation (different from the designation automatically provided by natbib).

[2]: This strategy has been formalized in the bibalias package (available here) Among its drawbacks is that it only works for the \cite command. If anyone knows of a solution to adapt \citep and \citet that would be great.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.