New plugin: Citations (with Zotero)

Well, I don’t use Zotero or Word so my workflow may be a bit different (and probably somewhat idiosyncratic). I manage my references in BibDesk, which creates and maintains a bib file. But as far as I know, the very same can be achieved by a Zotero library with betterbibdesk.

I do use the Pandoc-style markdown citations (simply [@citekey]) because I write my final drafts in latex. When I have a first draft ready that I wrote in Obsidian, then I export it to latex via pandoc. This way, all my Pandoc-style markdown citations end up as properly formatted latex citations, which then I can compile with my latex compiler. (Or, if I have to send the piece to some colleague who doesn’t use latex, I can export it to Word, etc., with the same result.)

So my setup may require this specific workflow. But I just set up the citations plugin to generate literature notes with the file name of @citekey; this way, first of all, it is easy to tell if something is a literature note, and second, it allows me to enter lit note links as if they were citations, with an extra pair of [ ] added.

For your problem, I’m not sure I understand. If you have a note about a reference already, then could you just set up the Citations literature note file name in such a way that it would take you directly to the already existing note? In that case, it would not create a new one. The doability of this may depend on the naming scheme for your literature notes that are not created with the plugin.

If you change the title of a literature note, it is not taken into account by the Citation plugin (e.g. : if you open a literature note whose name has been changed, it will open a new note with title from the template, and not the already existing one).

Has someone found a workaround ?

Link to Github issue.

I think this is expected behavior; one should be consistent with how one names the lit notes. If you rename one, then since the plugin is set up with a template, I’d expect for another one to be created that do actually follow the template. You can of course always change the template.

Thanks. Problem is I use a special character at the beginning of title, depending on reference type. I think this is currently not handled by this plugin.

1 Like

@atiz Ah, I see now. So the Pandoc style citations work seamlessly with Latex! I’ve never used Latex before because nobody in my field does and (although I’ve heard great things about it) I’m afraid it would cause me a lot more hassle than necessary. Plus, I consider myself an advanced Word user. I’d discussed this with a friend who’s in STEM (I’m in the Humanities), he was surprised to see how far Word has come since he’d last used it - I’d explained how I do things in Word that he does in Latex.

But I’m getting off topic.

Using the citekey is practical because you can then at least see that something’s a reference in a glance. The way I’ve tried it, it just adds in the reference as simple text so it isn’t as clearly visible. I’ll give the citekey a chance.

I’ll be using the notes for only myself anyway so as long as I know what it’s referencing, it’s fine. :slight_smile:

Thanks for the feedback and taking the time to type all that out!

1 Like

Of course :). Yeah, our field is kind of humanities but with a bunch of tech nerds, so some but probably a minority of people use latex. (I’m in philosophy.) I just procrastinated a lot in grad school so I learned it then and now am used to it and don’t like messing with Word as much. But at least for me it’s not really a question of quality than just what I’m used to. (Except for bibliography management, which I think is really top-notch in BibDesk.)

Good luck! I also think that there have been some requests to preview pandoc-style citations directly in Obsidian, which may also help if it ever comes to be. See here.

@atiz I’ll definitely have a look at that page now. Thanks so much!

As for bibliography management, the Zotero-Word system works seamlessly for me, personally. Though loading the references can get a big slower once your document reaches 1000 references haha.

1 Like

Thanks, I use a consistent naming convention that can’t be set up in the template (title begins with a special character depending on the reference type). Perheaps I should switch to a simpler naming convention as a temporary workaround.

1 Like

Are there any plans to make this work on mobile ?
Thanks !


Thank you very much this is very helpful! Is there a way to set up multiple templates depending on the type of content in Zotero? For example a template for books and one for journal articles?

Hello there! I would like to know if there is any possibility to articulate an “if … else …” statement in the template field of the plugins options.

In my case I have the following problem: For example I have the following item in my Zotero database:

  title = {The {{Fiction}} of {{Bourgeois Morality}} and the {{Paradox}} of {{Individualism}}},
  shorttitle = {Bourgeois {{Morality}}},
  booktitle = {The {{Novel}}: {{Forms}} and {{Themes}}},
  author = {Armstrong, Nancy},
  editor = {Moretti, Franco},
  date = {2007},
  volume = {2},
  pages = {349--388},
  publisher = {{Princeton University Press}},

I want to set up the literature note title template that it shows the following:

T - Armstrong2007 - Bourgeois Morality

Until here it works fine with:

T - {{citekey}} - {{entry.titleShort}}

My problem now is that not every item has a short title. Is it possible to write an expression that the template uses the short title if provided and else just the normal title?

Thanks in advance and all the best!


Cannot figure out how to add a return newline character to a “markdown primary citation template”


  1. Can this tiny textbox be a reference to a template file instead ( or just make this box bigger like the one above it )
  2. How can we put a NL, [return] character, line-break into a template in that tiny box?

I have tried many ways to have this one template have multiple lines, please help.
Thanks for the cool plugin!

Hi there - this is awesome - thanks!

I’m new to Obsidian, and Zotero, and so maybe I’m missing something trivial… I can pull in citations with no problem, including the abstract. But when I try to bring in annotations, using {{note}} that field is empty. Should it work and, if so, any ideas? I can see that my annotations are in the Bib file - do I need to save them as a note in Zotero, rather than as an attachment (I haven’t yet figured out how to do that).

What would that be used for?

The “markdown primary citation template” is used just for that – to enter a citation, i.e., a citekey in the markdown text. So, it’s a tiny box because it is for inserting a tiny thing :slight_smile:
I think it’s only meant to be for that, and you can set it to different values depending on what markdown converter you use afterwards (pandoc, etc.).

My zotero citations workflow works fine for single bokk/article etc via the command pane.

What I need is a mass import/note creation from all references exported by zotero via better bilatex or json an using the citation plugin.

How to achieve this once?
Many thanks.

Does somebody know if it is possible to limit the number of words with the variable {{title}}? For example, if the title of some paper has 10 words, is it possible to restrict the result to the first 4 or 5 words?
Thank you so much in advance!

1 Like

I need some help here. Has anyone experienced that the plugin suddenly can’t read the .bib file? I have the same .bib file that I have used for ages, and I know that it is full of data, but the Citations plugin says it has loaded 0 references! I have tried to do a new automatic export with BetterBibTex in Zotero and pointing the Citations plugin towards the new file, but still nothing. Hope anyone can help!

@Kullenej I have just tested it and it’s still working for me.
But I remember in the beginning I struggled with something similar, and it turned out I had a few invalid things in the bib file. (I use BibDesk to maintain the bib file, and if you put some invalid characters (like special characters) in some of the fields, then apparently the bib file gets invalid, and the plugin can’t read it at all. Biblatex still read my bib file fine.)

If you remember what were the last items you added after which it stopped working, you may want to check them. You can also make a copy of the .bib file, delete the last added items, and see if it works – if so, the problem is in the last added items.

Thank you so much - that was the problem of course! :smile:

1 Like

I’m having the same issue that @Thom had last January, but the root cause seems to be different.

I have Better BibTex installed in Zotero, I’ve exported my library as Better CSL JSON, I’ve copied the path to My Library.json and pasted it into Obsidian’s ‘Citation database path’ which acknowledges “Loaded library with 3777 references.” Keying Shift + Option + E brings up the list of references, but when I click Enter to insert the correct citation I get the error “Unable to access literature note. Please check that the literature note folder exists, or update the Citations plugin settings.”

Any ideas?