TransWikia.com

How to automatically deduplicate the citation keys in bib file?

TeX - LaTeX Asked by farhill on January 11, 2021

I found there are hundreds of cases of duplicated citation keys in one of my bib file. It seems generated by Mendeley but I’d rather believe it was me who made such mistake (I didnt remember I ever copied another bib file into this one, though). Anyway, now my problem is how to assign different citation keys to the enties sharing the same key (they are different articles). Doing this manually would be a bit time-consuming though could be fun if I try to make it ;). Is there some way by which this job can be done in one stroke? or I need to compose a Python script for this task?

One Answer

Found the solution. You need to install the BBT plug-in on Zotero first. Then, a. Import the bib file into Zotero. b. Select all. Right click and select Better Bib TeX – Pin Bib TeX key. The BBT will automatically regenerate ALL citation keys - the previous ones will all be discarded. c. Export to a new bib file. The regenerated keys are pretty long, for example, "accessDrivingSaferGreenera". But it is ok for me. At least I dont need to set the duplicated keys one by one...

Answered by farhill on January 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP