Plugin that links references in PDFs to items in your library
Hi everyone,
I’ve been working on a small plugin called Reference Linker.
When you open a paper in Zotero, it scans the References section and highlights papers that are already saved in your library. You can then click the highlighted reference to open its PDF or jump to the Zotero item.
I'm not sure whether a similar plugin already exist. But, I thought this might be useful to someone other than me.
It currently supports:
Numbered and author–year reference styles
DOI and arXiv ID matching
Exact and fuzzy title matching
Multi-column reference pages
The highlights are only added to the Reader interface, so the PDF itself and your Zotero annotations are not modified.
It’s still an early version, and PDF text extraction can be inconsistent depending on the publisher or citation layout. I’ve tested it with several IEEE, AAAI, and ICML-style papers, but I’d appreciate feedback on PDFs or reference styles that do not work correctly.
GitHub: https://github.com/ottersem/zotero-reference-linker
Thanks for reading!
I’ve been working on a small plugin called Reference Linker.
When you open a paper in Zotero, it scans the References section and highlights papers that are already saved in your library. You can then click the highlighted reference to open its PDF or jump to the Zotero item.
I'm not sure whether a similar plugin already exist. But, I thought this might be useful to someone other than me.
It currently supports:
Numbered and author–year reference styles
DOI and arXiv ID matching
Exact and fuzzy title matching
Multi-column reference pages
The highlights are only added to the Reader interface, so the PDF itself and your Zotero annotations are not modified.
It’s still an early version, and PDF text extraction can be inconsistent depending on the publisher or citation layout. I’ve tested it with several IEEE, AAAI, and ICML-style papers, but I’d appreciate feedback on PDFs or reference styles that do not work correctly.
GitHub: https://github.com/ottersem/zotero-reference-linker
Thanks for reading!
Upgrade Storage
But the plugin nicely addresses a very common need - to directly open a referenced item's PDF (that your already have) immediately in the reader.
The first time you click on the taskbar Ref button it seems to display '0 linked', but soon after it shows a number like '17 linked'. It would make sense to show a 'working' message rather than '0', while it is doing the checking. And make the number of links permanently visible (both 0 before the Ref button has been pressed, and then the final number).
One thing I noticed is that the buttons in the PDF's reference list do not persist when you navigate back to the main library view and then return to the PDF in the reader. Is it possible to make them persist ? (it appears that they do persist when switching to a different PDF in the reader and then coming back).
"Link" has several existing meanings in Zotero. Firstly, to "linked" PDFs (as opposed to the default "stored" PDFs). Also there is Zotero's Related tab, where one can add links to items already in the one's library. It would be good to avoid any ambiguity in the documentation.
Your plugin does something rather similar to Related links, just in a different and somewhat more efficient way. It would make sense to integrate with Related. Have you considered having your plugin provide the option to add Related links to referenced items already in one's library (so that they would be visible under Related in the main library pane for example) ? For any single item or for all such items in the paper. For example by adding a "Relate" overlay button next to the "PDF" overlay button in the PDF's reference list (but it would display "Related" if the reference is already in the Related list).
The Zotero Reference plugin has somewhat similar functionality in listing in its tab all the items in a paper's reference list (drawn from online repositories or parsed from the PDF text), and then highlighting those that it finds in the library (with a red symbol). It also has some Related linking functionality. There is an option in its Settings to automatically add Related links to all a paper's references that are already in the library. If that option is not used, there is also a right-click option to link a selected *single* referenced item already in the library to the current item.
https://github.com/MuiseDestiny/zotero-reference
It would be great if your plugin had the individual Relate/Related link button option I mentioned, but particularly the option to link all library items in the current paper's reference list to that current item in one, single operation (which the Reference plugin does not).
Thanks for your detailed feedback! There are a lot of good suggestions here.
I'll work on the UI improvements this weekend. In particular, I agree that showing "0 linked" while the plugin is still checking is confusing. A loading indicator or similar would make more sense.
Regarding the overlay buttons disappearing after returning to the library, that definitely sounds like a bug. I'll look into it.
I also appreciate your thoughts about the naming "Link" and the integration with Zotero's Related items. I hadn't considered some of those use cases before, but they are interesting idea. I'll consider adding it in the very soon.