New plugin: Citations (with Zotero)

Still the use of {{note}} can give a direct note extraction method. Minimizes the complication of extra plugins and gives a more robust workflow. I would love to see it.

@romanov.maxim there are two similar, but different features: “insert literature note link” and “insert markdown citation” - have a look, in your hotkey settings, at the respective shortcuts.

1 Like

Yes, I checked those — I cannot figure out how to change the pattern for inserting pattern. For the “markdown primary citation template” I have: @{{citekey}} (and the same for the secondary one), but it always inserts this pattern in double square brackets (to make it work as a wikilink).

I guess, the problem I am having is that there is no default “Insert markdown citation” hotkey. How to make one?

I mean the obsidian hotkey settings - not the plugin settings…

And in the plugin settings, the “markdown primary citation template” should be [@{{citekey}}]

1 Like

What are you trying to achieve? What OS are you in?

For example, Zotero links doesn’t work well for Zotero installed as flatpak for those on Linux

Vielen Dank! Sehr hilfreich!

1 Like

@mixpap - I won’t disagree things would be easier, but the plugin dev is limited to the way BetterBibTex pulls the information. In there the notes come through, but they aren’t well organized. I found that out after looking a little deeper and playing with Mdnotes templating, which is a little more robust - and should be, given what it’s being asked to do.
Maybe he’ll find a way - who knows. Meanwhile, I’m going to stick to this for citations, and Mdnotes for data extraction.

For those on Linux (at least in Debian/Ubuntu) that want to use zotero:// links, I recommend using GitHub - retorquere/zotero-deb: Packaged versions of Zotero and Juris-M for Debian-based systems (this will take care of setting the URL protocol for you). Otherwise, you need to set up the Zotero URI in the same way that you did with the Obsidian URI.

2 Likes

This extension is amazing! One problem I have is, if the paper title has colon, which is very common, then the YAML will be invalid. Is there any way to bypass this problem? Like having a choice to replace all colons to dashes?

1 Like

You could wrap the title in quotation marks in the template:

title: "{{title}}"
1 Like

Try

[Pdf file](<file:///{{entry.files.[0]}}>) - [Zotero item]({{zoteroSelectURI}})

Works on MacOS Catalina

2 Likes

Thank you so much for the plugin! Helped me so much in my research1

In case it’s helpful to anyone, here’s a citation template that’s working well for me.

---
title: "{{title}}"
authors: [{{authorString}}]
year: {{year}}
type: {{entry.type}}
journal: {{containerTitle}}
URL: {{URL}}
citekey: {{citekey}}
DOI: {{DOI}}
alias: 
  - "{{title}}"

---

# {{title}}

[Open in Zotero]({{zoteroSelectURI}})

## Abstract

{{abstract}}

## Notes

- [ ] Take notes about {{title}} #someday
12 Likes

Thanks for the great plugin. I a new to Obsidian and newish to Zotero but have a question … or 2.
Preamble: I’m not sure I understand the full ramifications or use of this plugin. I am messing around with the template settings within the plugin settings as I speak.
Is it possible to insert a simple citation (author, date, page) and have that link directly to the Zotero item?
If I understand the plugin, I can insert the citekey as markdown OR have a link to a Zotero item, in which case the in-text info is too long for my liking. I would love a combo of the Zettlr way with the link to Zotero. I do like the Zetllr method: Typing “@” brings up the citation list to search. Selecting an entry inserts the citekey, which then gets displayed as author, date. Now if only this linked to Zotero …

Change your settings for “Markdown primary citation template” to [@{{citekey}}]({{zoteroSelectURI}}) then use the “Insert markdown citation link” option to get a link to the Zotero item, with a shorter citekey (or whatever you want, really) as the link name.

I’ve setup BetterBibTeX to a pretty short citekey, so it looks just fine. Admittedly my library isn’t too full though.

4 Likes

Thanks, I had something pretty close. Good idea with the BetterBibTex short citekey. I’ll look into that. How will that affect citekeys already present in Obsidian and other documents though?

Is there any way to get this to spit out formatted references (like in MLA/APA?). I modified the template to spit out something similar, but it’s still not quite right.

1 Like

BetterBibTeX does not auto-update citekeys in Zotero unless you ask it to - even if you change the format, so they will work just fine. If you do decide to update them in Zotero, any links to them will need to be refreshed as well.

There may exist a way to change the URI that BBT uses to something other than the citekey, but I haven’t personally explored that.

@mangosteel - You can format the output pretty much however you want.

Maybe a couple of shots showing what you want versus what you’re getting would help troubleshoot.