The Living Thing / Notebooks :

Zotero

Usefulness: 🔧 🔧 🔧
Novelty: 💡 💡
Uncertainty: 🤪
Incompleteness: 🚧

My weapon of choice for citation amangement.

Zotero! Full-service reference management. It starts with browser plugin which will import the metadata and PDF of the article you are browsing, then creates a big interactive searchable database of these things. From there one can export to various other formats, such a BibTeX, or render bibliographies directly based on plugins for your word processor. But don’t listen to me blather. Read the manual. Or the other manual. Or some other person’s manual.

Zotero has an API with which you can query, read and write bibliographic entries in your database, making it easy to scrip automatic updates and such.

It has an active community around it, and I don’t feel that I am locking my data away with an untrusted party if I rely upon it. (Of course, you can always try to migrate data around from anything to anything else by exporting to BibTeX or similar, but if you have URLs in there, or consort with foreigners who dare to have diacritics in their names, this leads to trouble). I can use the API to make changes that I couldn’t make manually, without worrying about that parsing nonsense. Moreover some other apps, such as Mendeley, already use the Zotero API, so you know that it’s not going to be a community of one playing with it.

Zotero for tablet/e-reader

To be evaluated, the currently active clients seem to be

I prefer no client at all. I use the Zotero plugin zotfile to synchronise a folder full of attachments to my tablet. It’s not perfect, but it’s easy and robust.

Installing Zotero

Easy with windows and mac; there are standard installers. A little more tedious with linux. retorquere’s repo of deb installers is a simple way for Ubuntu. There are none of the snap-app packages one would expect for ubunutu. However, there is a cross-platform flatpak zotero, which is good, with the usual caveats about flatpak.

flatpak install flathub org.zotero.Zotero
flatpak override --user --filesystem=/PATH/TO/ZOTEROFOLDER \
    org.zotero.Zotero

Zotero Hacks

Zotero blog integration

tl;dr. There are many over-engineered solutions to get zotero citations in a blog. I use pandoc markdown with Better BibTeX. Anyway, if you want a more fragile but fancier solution, there are other options below.

Via BetterBibTeX

Better BibTeX, a.k.a BBT, makes all the BibTeX stuff in Zotero smoother, and since BibTeX also integrates with markdown via pandoc, this is a double win.

The biggest trick is that BBT makes sensible, user-accessible citation keys for your references, and if you use these consistently to refer to your sources, life will go well for you.

The citation keys are generated magically by a format string. (Of course, there is no guarantee your colleagues will agree on a sensible standard for citation keys, but that problem is perennial.)

My citation key format strings for BibTeX is

[Auth:fold:nopunctordash][title:fold:nopunctordash:skipwords:select,1,1][year]

which I think is approximately the same as the much shorter

[zotero:clean]

That may be the same as as this other shortish one

​[auth][veryshorttitle1_1][year]

I am not sure if the latter two options handle diacritial marks correctly; I should check. Additionally, I do not trust [zotero:clean] because occasionally its meaning changes and it ruins everything.

So, say I want to cite the classic

Ingrid Daubechies (1988) Orthonormal bases of compactly supported wavelets. Communications on Pure and Applied Mathematics, 41(7), 909–996. DOI.

In broad terms, these all generate citation key DaubechiesOrthonormal1988 to refer to that article. I could then refer to that citation in LaTeX as \cite{DaubechiesOrthonormal1988}, in markdown as @DaubechiesOrthonormal1988 and so on.

BibTeX will also generate the necessary biblography databases (e.g. .bib file) for my software too and even keep that file updated as I add more articles to zotero.

I am fond of the following BibLaTeX export exclusions to keep the files small.

file,abstract,note,keywords,lccn

BBT has a Cite-as-you-write feature for integration with generic editors, including a GUI popup. I do not use this. It also has HTTP-pull export support, meaning that accessing an up-to-date bib file is a matter of an HTTP request that looks like http://127.0.0.1:23119/better-bibtex/collection?/1/citation_management.biblatex to pull all the records in the citation_management collection and this works from my local copy of Zotero, so it’s fast and reliable compared to the cloud Zotero server API which depends upon my internet connection etc.

Pro tip: the pull export works better if for me if I set the advanced preference extensions.zotero.translators.better-bibtex.sorted to be true so that the reference sorting is consistent.

citr provides an interactive citation finder for RStudio that works with BetterBibTeX.

install.packages("citr")

Via CSL

CSL is a citation rendering mini-language used by modern journals and software to express house style. And you can use it too.

Screencap of Zotero
Screencap of Zotero

This is a slightly weird way to get plain-text citations out; CSL is a system for instructing your citation software how to render citations in your word processor; but it can be forced to pump out normal text. It is robust ad simple. There is a CSL editor online so this is easy-ish. One catch is that you might, like me, wish to get your BibTeX citation keys out to refer to them. But Bibtex keys are not accessible to CSL, so this doesn’t quite work.

CSL has a citation-label variable, but it doesn’t correspond to the bibtex keys generated by BBT, which is unsatisfactory.

Via the Atom citation picker

For Atom+Zotero+Markdown, you could try zotero citation, which adds a citation picker to the atom editor. References look like

[\(Heyns, 2014\)](#@heyns2014)
[\(Heyns, 2014\)]([email protected],heyns2015)

They are rendered in the output by an in-built pandoc filter, which is installed separately. One locates the output bibliography in the document in either pandoc-YAML or plaintext format at

[#bibliography]: #

I don’t bother; BetterBibTeX works fine for my needs and across many editors.

Dynamic bibliography generation in situ

Erik Hetzner’s zotxt can avoid the need to create bibfiles, rendering bibliographies directly by querying the zotero app, rather than rendering an intermediate file. Since rendering an intermediate file is scriptable, this does not appeal to me.