Skip to main content

Referencing Strikes Back

· 4 min read
Riiight, it’s my favorite topic again!

First, I’d like to complain for a while about the referencing managers. Remember I told you about how I used the Mendeley Reference Manager for the assignment in the induction module? Remember? Now forget.

What happened to Mendeley?

Well, to answer the question in the title, nothing. But I thought it could be a convenient tool to keep track of the reading lists, granted it has folders, tags, a built-in reader, and note-taking abilities.

And it’s all good—as long as you are permanently attached to your computer. But since it’s been 2024 for a while, I thought I could use my iPad for reading. And guess what? I was wrong. Mendeley does not have a mobile app. Well, they used to have one since 2013, but decided to sunset it in 2021. I’m not excited enough about Mendeley to use their desktop-first web interface from a tablet.

Here comes Zotero

After grieving for a couple of seconds, I discovered yet another commonly used reference manager, Zotero. It’s been around for almost two decades and recently had a major update, so it also looks nice. And it has a mobile app.

It also comes with a browser extension (not as sleek as Mendeley’s, but functional) and — importantly — MS Word integration. And all that for free (and it’s open source if you care).

However, if you’re a heavy Zotero user, you might want to consider buying a storage subscription for your library since the default free tier only gives you 300 MB. Alternatively, you can link your own preferred storage via WebDAV protocol (which almost tempted me to implement a WebDAV interface for Cloudflare’s R2 storage using Workers).

Citations and references

Y’all remember me posting this?

Therefore, while the majority of tools support the Harvard referencing style, it’s still not a 100 % match.

Thankfully, there are tools (and even an XML markup language) for fine-tuning the stylized output, but they are too much for me, currently.

However, if for some reason you’re reading my blog right now (no idea why you’d do anything this random), here’s one such tool: Link. Good luck though.

Yeah, I gave up.

Since it’s quite simple to insert citations and references using the Zotero Word plugin, manually editing them each time I update a document only makes little sense.

So, naturally, I decided to take the most efficient and simple approach and create the citation style ruleset myself. Now, I’m ready to share my wisdom.

How to create a CSL style?
  1. Go to the Citation Style Editor.
  2. Find a style that you think is close enough, so that with some minor changes you can adapt it for your use case.
  3. Realize that you have no slightest idea how the ruleset works.
  4. Realize that you have no slightest idea about the structure of your citation style either.
  5. Give up.

We good?

After several fruitless attempts at tweaking Harvard styles (and staying up until 3 AM), I decided it might make more sense to implement one from scratch.

First, I tried to decode the logic of the referencing style I needed. While the general structure was mostly consistent across the samples in the official guide, I struggle to find any explanation why in some cases the title of a paper is plain with full stop Title., in some other cases it’s italicized Title., and in others it’s somehow ‘Title’, (with a comma, yes).

So, I created a table to visualize the styles. While this didn’t exactly help me understand the rules, it did at least show what components I needed for each type of reference.

Armed with that outline, I returned to the editor. When I first tried editing existing styles, it felt like deciphering a washing machine’s control panel. But breaking it into smaller steps based on my table made the process at least somewhat straightforward.

Of course, there are still mysteries (like why terms can’t be used directly in name substitutions), but I managed to implement everything I currently need.

Naturally, I don’t expect my ruleset to be perfect, but I can update it as I go. Right now, it works well enough.

If you’re curious, I’ve published the result on my GitHub (BTW I’m open to pull requests).

Anyway, that’s it for today!