New plugin: Citations (with Zotero)

Has anyone managed to get citations and aliases working well? People’s names are often written differently in bibliographies - whether it’s Dave/David or Redstrom/Redström. I’d really like to be able to have a canonical page for authors of interest, and add their aliases to that, and then have the generated Knowledge Graph is correct. At the moment, it seems that:

  • I would need to have the link in on my literature page be [Redström|Redstrom], which is a bit clunky
  • The aliases are not followed by the graph builder, so [Redstrom] and [Redström] are two different nodes

(note - I’m generating an author list for each paper in the body of my template, using {{#each entry.author}}[[{{this.given}} {{this.family}}]]{{#unless @last}}, {{/unless}}{{/each}}

Is my understanding right? Has anyone got a good workaround? I think this will happen in a lot of bibliographies due to general inconsistency in naming authors. I guess eventually everyone might get a unique ID (e.g. ORCID), but then I’d still like to refer to them by name…

I just have to say: I love you man! :joy: This is the one feature I was missing from Obsidian. Well this and the outliner butsomeone else made the outliner. It’s amazing! I think I can even do writing in Obsidian now.

Many thanks @jgauthier for this excellent plugin. Like others npseaver and welstand I would like to name a new citation note with lastnames only out of {{authorString}} without commas. How to achieve this? Or missed I something in this thread?

Try this: {{entry.author.[0].family}}. It solved my problem.

2 Likes

I am on MacOS Catalina, but it doesn’t work either. Is it maybe because I have Zotfile installed in Zotero?

Hi
Your solution works at my side, many thanks @welstand. I am on Big Sur 11.5.1 running Zotero with Better Biblatex mdnotes and zotfile basic configured , exported bib as better biblatex. I tried also JSON, but better bibaltex works here.

My current Literature note title template shows:

}Z-{{entry.author.[0].family}}{{entry.author.[1].family}}{{entry.author.[2].family}}{{entry.author.[3].family}}{{entry.author.[4].family}}-{{title}}

Where }Z is a category-placeholder, which I have to set manually after note creation (}b=book,}w=website,}a=article) . Each increasing number with {{entry.author.[0].family}} will take the next lastname out of the entry.author array I think. That gives me 4 lastnames and the title of the reference, for me its ok.

1 Like

I have an issue with the {{year}} variable.

Every time I use it, the result is the actual year of the source -1. Here an example:


The actual date is “2014”, but the automatic generated year is “2013”.

Did anyone encounter the same problem? Does anyone know a solution?

Yep, I have the same problem, but no solution as of now. It’s pretty annoying.

Btw, currently writing my MA thesis in post-phenomenology :wink:

1 Like

After using the Zotero → Export Bibliography → Create Literature Note using Citation → Zotfile to extract annotations → MDNotes to extract annotations to MD → Copy paste from temporary MD file into Literature Note pathway that I’ve seen posted, I dug into MDNotes a bit more, and found it’s easier to export the whole entry including annotations direct from Zotero. This means I don’t have to keep the .bib file up to date, and it’s a single click to generate everything from Zotero. To set this up, I used the Templates doc for MDNotes https://argentinaos.com/zotero-mdnotes/docs/advanced/templates/defaults and made a Mdnotes Default Template.md that mimics the Citations Literature Note entry like this:

---
title: "%(title)"
authors: [%(author)]
year: %(date)
type: %(itemType)
citekey: %(citekey)
alias: 
  - "%(title)"

---


{{title}}
{{author}}
(%(publicationTitle), %(date)) 

%(pdfAttachments) (%(localLibrary))

{{abstractNote}}
{{url}}
@%(citekey), %(DOI)

{{collections}}
{{tags}}, #zotero, #literature-notes, #reference

## Notes

## Quotes

with a Zotero Note Template.md that looks like this:

{{noteContent}}

The trick I needed was setting up the MDNotes preferences (Tools → MDNotes) to export everything as a single file, straight into a papers folder in my Vault, with the right filename.

Now, I can Read/Annotate a paper, click Extract Annotations and then MDNotes->Create Full Export Note, and it’s all there in Obsidian. It’s not perfect - still working through the fields in MDNotes, but it’s much quicker than making temp files and reloading Obsidian.

4 Likes

Hi Ncraig, I am back to this topic with three questions if you don’t mind :slight_smile:

  1. do I need to fill the yaml frontmatter even if I use the Citation plugin on Obsidian, or the one it automatically compiles is fine by itself?
  2. I don’t understand, from the instruction page, what it means “download the pandoc filter”, which simply redirect to the link "https://retorque.re/zotero-better-bibtex/exporting/zotero.lua
  3. what is the “path to script zotero.lua” you mention in your code? Where do I find that path?

Thanks so much in advance

Looks great! One question (I don’t know if this is the right thread to ask it, though): Is it possible to create a placeholder in Zotero for the author lastname only? I didn’t find it in the list of the Zotero Item Types.

I noticed that the plugin does not recognize editors as “authors”. So, in the case of an edited volume, it will say “unknown authors”, which is technically correct, but it would be better if it uses the editors instead (suggestion for improvement).

2 Likes

To add a bit on what @tophee said, is there a way to have different templates based on Zotero item type ?

The ability to use templater in Citations plugin would help in that sense.

If it’s not possible in the citations plugin, you might want to consider using the mdnotes plugin in Zotero. It has access to all fields in Zotero.

See for a brief comparison of the two plugins:

Thank you for developing such an amazing plugin! As already mentioned by previous users, the plugin cannot be enabled on iPadOS. Any way to fix this, or plans to address this in a future release?

Hi everyone! I’m new to Obsidian and to the forum. I was hoping to get some help. I installed the Citation plug-in today. Everything seems to be imported correctly. But when I press Ctrl+Shift+E to enter a citation and select the one I want (via Enter or mouse click), nothing appears. I just get this error:
2021-08-18 22_31_37-Microsoft Store

Does anyone have any idea how to fix this? Would be greatly appreciated. Thank you so much!

P.S. I might jus be missing something so any guidance is more than welcome. :slight_smile:

1 Like

Can you confirm that you have followed the error instructions i.e, 1.) verify that the ‘Literature note folder’ pathway exists, or 2) verify that the Citation plugin ‘Literature note folder’ points to an existing folder?

Hi @Otolith! Thanks for responding. I ended up watching a few YouTube videos on the Citations function and it turns out I just had to play around with the way “Literature note/content title templates” were set up. But I managed to sort this out.

I’m still confused as to why every time I reference a source, a new note is automatically created?

It shouldn’t be. But there are 2 commands that may get confused: 1) insert citation; 2) insert literature note link. A new lit note is created if you click on the link inserted in the second case.

So, you should check how your hotkeys are set up. For me, ctr+shift+E is the literature note command (NOT the citation command), so if it’s set up the same way for you too, then that’s why.

@atiz thanks for the feedback! I left the settings to be default.

Ctrl+Shift+E inserts a literature note link whereas Ctrl+Shift+O just opens a literature note. No shortcuts for the markdown citation. The markdown citation function. It just inserts the citation the way I set it up, but doesn’t link to anything really. Basically, it works as it should.

I want to be able to insert a literature note link, but even when I just insert it, without clicking on it, a new note is automatically created. Seems a bit redundant to me?