WordPress for Reference Management

One of the more complicated aspects of scientific writing is reference management – an important limitation of online collaborative tools such as Google Docs. I have argued before that WordPress has the potential to become a great scientific writing tool. Wordpress can’t do reference management out of the box, and the available plugins are somewhat limited. But WordPress is a good platform to add reference management functions: it is not only extremely popular (meaning a lot of people have expertise and many tools are available), but also already knows a lot about links, and has a wonderful plugin architecture.

Reference database

The first question with reference management in WordPress is where to store the references. Should they not be stored at all and be directly imported from the source (journal website or bibliographic database such as PubMed)? This is what most of us are currently doing when writing blog posts, but this approach has obvious limitations on more ambitious writing projects. Or should references be inserted from an online reference manager such as CiteULike, Mendeley, Refworks or Endnote Web? This is how we use these reference managers with Microsoft Word and similar word processors.

Instead I prefer a third approach: store the references in the built-in Links Manager in WordPress. References are nothing more than specialized links after all. We loose functionality compared to reference manager databases, but we get some very interesting features for free, including automatic checking of broken links, automatic link synchronization with other WordPress installations, and all the other cool things for links that people have come up with. And this makes it much easier for authors to collaborate if they use different reference managers, as all required references are stored in a common database.

BibTeX Importer

There is currently no good solution to important references into the Links Manager, so I wrote a WordPress plugin to do just that. It took me two days, which says less about my skills, but more about the WordPress plugin architecture. Like all plugins hosted at WordPress.org, my BibTeX Importer plugin can be installed directly from within your WordPress installation in less than 5 minutes.

The plugin takes any BibTeX file (BibTeX is one of the more common file formats for references, all good reference managers can export into that format) and imports it into the WordPress Links Manager. The plugin can also import a BibTex file via URL (e.g. http://www.citeulike.org/bibtex/user/mfenner).

The plugin creates WordPress links where the link name is in the format first author – year – title. The original BibTeX entry is stored in the link notes. The plugin does some extra work, e.g. checks for duplicates before importing and picks the DOI if several URLs are available for the link. The plugin also checks the BibTex entry type (article, PhD thesis, book chapter, etc.) and automatically assigns a link category with that name. The next step would be a solution that automatically synchronizes your WordPress Links Manager with a reference manager.

Inserting references

Once the references are in the Links Manager, we can use them in the articles we write. Unfortunately WordPress doesn’t provide an easy way to do that. I personally like the WordPress TinyMCE editor, so I made some changes to the wonderful Link to Post plugin. The plugin provides a searchable interface to link to the posts, pages, categories and tags of your own WordPress blog. It took me half a day to add a link section, so now I can search for links and insert them into a post in a way not that different from how we use reference managers with Microsoft Word. The plugin also searches for co-authors, journal names and words in abstracts, as all this information is stored in the Link notes as BibTeX entry. I will make the updated Link to Post plugin available for download (I have contacted the plugin author), for the time being please contact me if you are interested.

Providing a bibliography

This is the last feature that I need for reference management with WordPress, and that should also be feasible to do. Ideally the bibliography should be created automatically from the links in the text, using the BibTeX info stored in the links database. In fact, this is something that a publisher could also do after manuscript submission, as the required information is all there. The bibliography should use the Citation Style Language, and COinS (a standard for publishing machine-readable reference information in HTML), and should check for duplicate references, broken links, etc.

Copyright © 2010 Martin Fenner. Distributed under the terms of the Creative Commons Attribution 4.0 License.