Removing URLs from Zotero bibtex exports
Contents
When you export bibtex from zotero, it includes the URLs in the bibtex records. Some LaTeX bibliography styles include this information, and sometimes this is not what you want, for example because the URLs take up unnecessary space and are hard to wrap.
It’s quite easy to get zotero to export bibtex without the URLs.
- Go to Preferences | Advanced and click on the “Show Data Directory” button.
- Edit translators/BibTeX.js with your favourite text editor.
- In function doExport(), at around line 2040 in Zotero 3.0.7, change the “for (var field in fieldMap)” loop by adding a single line of code like this:
for(var field in fieldMap) { # only add the following line: if (field == "url") continue; if(item[fieldMap[field]]) { writeField(field, item[fieldMap[field]]); } }
If your changes don’t seem to take, make sure that your text editor did not make a backup of the old BibTeX.js (vim does this, with an ~ appended), as Zotero could possible pick up the backed up version instead of your edited version.
Let me know in the comments if this helped!
Update on 2013-02-17: Added tip concerning editor backups of BibTeX.js (I ran into this problem myself).