# New plugin: Citations (with Zotero)

**URL:** <https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793>\
**Category:** Plugins\
**Tags:** plugin-release\
**Created:** [December 10, 2020, 12:59am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793 "2020-12-10T00:59:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgauthier](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jgauthier/32/4680_2.png) [@jgauthier](https://forum.obsidian.md/u/jgauthier)\
**Post date:** [December 10, 2020, 12:59am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/1 "2020-12-10T00:59:41Z")

</div>

Hi all,

I’ve just released a very minimal [Citations plugin](https://github.com/hans/obsidian-citation-plugin/tree/0.1.3) for Obsidian. You can find it in the third-party plugins browser within the app.

 ![](https://forum.obsidian.md/uploads/default/original/2X/3/3b81aceb60c943e24bae8041e8bea146aaaad3df.png)

Right now I’ve just implemented the feature most important to me, which is **quick within-Obsidian search of a reference database**. You can automatically create literature notes for a particular reference according to your own templates.

I’ve developed this for use with Zotero to start, but it could work right now with any reference manager that can export to [CSL-JSON](https://github.com/citation-style-language/schema#csl-json-schema). You can find setup instructions in the [GitHub readme](https://github.com/hans/obsidian-citation-plugin/blob/0.1.3/README.md).

Lots more features I would like to add in time, including..:

1. Open papers from the search dialog
2. Automatically copy PDF annotations from Zotero into a new note, without leaving Obsidian
3. Peek at a paper’s abstract from within the search dialog
4. Pretty-render paper references in Obsidian Preview mode as full APA/etc. citations

Let me know if it works (or doesn’t) for you, and what other features you’d be interested in seeing!

---

<div class="post-metadata">

**Author:** ![mneinast](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/5daacb/32.png) [@mneinast](https://forum.obsidian.md/u/mneinast)\
**Post date:** [December 10, 2020, 2:41am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/2 "2020-12-10T02:41:12Z")

</div>

thank you this is exactly what I was looking for! I have it working, currently using this template for new notes:

```
---
tags: (#lit)
---

{{title}}
{{authorString}}
{{year}}

```

I would love to also include the publication / journal in the template.

Is it possible to also include a link to the zotero item and/or pdf?

---

<div class="post-metadata">

**Author:** ![Max73](https://forum.obsidian.md/user_avatar/forum.obsidian.md/max73/32/5271_2.png) [@Max73](https://forum.obsidian.md/u/Max73)\
**Post date:** [December 10, 2020, 9:13am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/3 "2020-12-10T09:13:07Z")

</div>

Hi jgauthier, thanks for your citations plugin. I’ve tried but it doesn’t work: surely, I do something wrong.  
 ![Schermata 2020-12-10 alle 10.07.03](https://forum.obsidian.md/uploads/default/original/2X/9/9f58fa2b2b3a66d17f1a080055659f5d72e93d55.png)

 ![Schermata 2020-12-10 alle 10.07.13](https://forum.obsidian.md/uploads/default/original/2X/f/f8240513265d8f8e707e06c60c0b72113c4cef88.jpeg)

I’ve saved file in the vault.

 ![Schermata 2020-12-10 alle 10.10.34](https://forum.obsidian.md/uploads/default/original/2X/e/e7d567d69bfcbbba47cda5d7d27d080ee961c5d3.png)

If a press alt + ctrl + O or I, i can find any citation

 ![Schermata 2020-12-10 alle 10.12.08](https://forum.obsidian.md/uploads/default/original/2X/4/480b2bdfeb9d7e659bc0d86247b0002eb1ab5060.png)

Where do I wrong?

Thanks  
Massimiliano

---

<div class="post-metadata">

**Author:** ![phlind](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/p/e36b37/32.png) [@phlind](https://forum.obsidian.md/u/phlind)\
**Post date:** [December 10, 2020, 10:08am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/4 "2020-12-10T10:08:40Z")

</div>

> [@jgauthier](#):
>
> Pretty-render paper references in Obsidian Preview mode as full APA/etc. citations

Does that also mean that you’re planning to add a feature to insert references itself in markdown quotation style `[@Paper2020, 123]`? That would be very interesting, because it would implement a solution for what I have hacked together here: [How I enter citekey references in Obsidian using the terminal](https://forum.obsidian.md/t/how-i-enter-citekey-references-in-obsidian-using-the-terminal/6789)

---

<div class="post-metadata">

**Author:** ![echej](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/e/e495f1/32.png) [@echej](https://forum.obsidian.md/u/echej)\
**Post date:** [December 10, 2020, 10:28am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/5 "2020-12-10T10:28:47Z")

</div>

Hi @Max73!  
Did you put full name to your file like  
`/Users/daniel/Dropbox/Zettlekasten/My Library.json`  
Or only  
`/Users/daniel/Dropbox/Zettlekasten`

You should insert path to the file there

Hi @jgauthier great plugin!  
Do you consider change “Citation export path” to “Citation database path (Better CSL JSON)” , it could be less ambiguous to newer users?

---

<div class="post-metadata">

**Author:** ![Max73](https://forum.obsidian.md/user_avatar/forum.obsidian.md/max73/32/5271_2.png) [@Max73](https://forum.obsidian.md/u/Max73)\
**Post date:** [December 10, 2020, 11:22am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/6 "2020-12-10T11:22:15Z")

</div>

Hi @echej, thanks!!! Now it works!! 😉

---

<div class="post-metadata">

**Author:** ![Max73](https://forum.obsidian.md/user_avatar/forum.obsidian.md/max73/32/5271_2.png) [@Max73](https://forum.obsidian.md/u/Max73)\
**Post date:** [December 10, 2020, 2:59pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/7 "2020-12-10T14:59:06Z")

</div>

Hi @echej, thanks!!! Now it works!! 😉

---

<div class="post-metadata">

**Author:** ![jgauthier](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jgauthier/32/4680_2.png) [@jgauthier](https://forum.obsidian.md/u/jgauthier)\
**Post date:** [December 10, 2020, 5:24pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/8 "2020-12-10T17:24:38Z")

</div>

I just released a version `0.2.0` with the following changes:

New features:

- Library is auto-reloaded whenever the export file is updated, no Obsidian refresh necessary

Minor changes:

- Clarified configuration setting re: literature note paths. The new version presents a simpler option, ‘Literature note folder.’ Existing users will have to reconfigure with this new setting.
- “Insert citation” hotkey default changed to Ctrl-Shift-E, since the former overlapped with the default Obsidian console hotkey

---

<div class="post-metadata">

**Author:** ![echej](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/e/e495f1/32.png) [@echej](https://forum.obsidian.md/u/echej)\
**Post date:** [December 10, 2020, 7:22pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/9 "2020-12-10T19:22:43Z")

</div>

in 0.2.0 version picked references doesn’t appear in obsidian (in the previous version it worked, I am on Obsidian 0…9.20, MacOS Big Sur)

 ![2020-12-10 20.19.42](https://forum.obsidian.md/uploads/default/original/2X/6/61ee790a60c95c49c9f39bc92c46a0c494d6e1d9.gif)

---

<div class="post-metadata">

**Author:** ![jgauthier](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jgauthier/32/4680_2.png) [@jgauthier](https://forum.obsidian.md/u/jgauthier)\
**Post date:** [December 10, 2020, 7:31pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/10 "2020-12-10T19:31:48Z")

</div>

Hi, looks like you’re not the only one with this issue, though I can’t reproduce it on my end. Can you try to reproduce the issue while the Obsidian developer console is open (Ctrl+Shift+I) and tell me whether you see any errors appear there?

---

<div class="post-metadata">

**Author:** ![jgauthier](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jgauthier/32/4680_2.png) [@jgauthier](https://forum.obsidian.md/u/jgauthier)\
**Post date:** [December 10, 2020, 7:57pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/11 "2020-12-10T19:57:04Z")

</div>

This issue should be resolved in the latest release (0.2.1, just pushed).

---

<div class="post-metadata">

**Author:** ![welstand](https://forum.obsidian.md/user_avatar/forum.obsidian.md/welstand/32/8030_2.png) [@welstand](https://forum.obsidian.md/u/welstand)\
**Post date:** [December 10, 2020, 8:33pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/12 "2020-12-10T20:33:30Z")

</div>

I have the same problem. I installed the 0.2.1. version. But the problem remains. I also use MacOS Big Sur and Obsidian 0.9.20.

---

<div class="post-metadata">

**Author:** ![jgauthier](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jgauthier/32/4680_2.png) [@jgauthier](https://forum.obsidian.md/u/jgauthier)\
**Post date:** [December 10, 2020, 8:39pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/13 "2020-12-10T20:39:25Z")

</div>

Unfortunately I can’t reproduce the issue over here, so this must be a platform-specific thing. Can you open the Obsidian developer console (Ctrl+Shift+I), reproduce the bug, and let me know if any errors appear in the console? Thanks!

---

<div class="post-metadata">

**Author:** ![welstand](https://forum.obsidian.md/user_avatar/forum.obsidian.md/welstand/32/8030_2.png) [@welstand](https://forum.obsidian.md/u/welstand)\
**Post date:** [December 10, 2020, 10:43pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/14 "2020-12-10T22:43:51Z")

</div>

This appears when I digit ctrl+shift+E:

> index.html:1 Uncaught (in promise) Error: ENOENT: no such file or directory, open ‘/Users/username/Documents/Zettelkasten/Literature notes/@kierkegaardBegriffAngst1984.md’  
> Promise.then (async)   
> eval @ main.ts:165  
> step @ tslib.es6.js:102  
> eval @ tslib.es6.js:83  
> eval @ tslib.es6.js:76  
> \_\_awaiter @ tslib.es6.js:72  
> CitationPlugin.insertLiteratureNoteLink @ main.ts:162  
> InsertCitationModal.onChooseItem @ modals.ts:82  
> t.onChooseSuggestion @ app.js:1  
> t.selectSuggestion @ app.js:1  
> e.useSelectedItem @ app.js:1  
> (anonymous) @ app.js:1  
> e.handleKey @ app.js:1  
> e.onKeyEvent @ app.js:1

This when I digit ctrl+shift+O:

> Uncaught (in promise) Error: ENOENT: no such file or directory, open ‘/Users/username/Documents/Zettelkasten/Literature notes/@kierkegaardBegriffAngst1984.md’  
> Promise.then (async)   
> eval @ main.ts:159  
> step @ tslib.es6.js:102  
> eval @ tslib.es6.js:83  
> eval @ tslib.es6.js:76  
> \_\_awaiter @ tslib.es6.js:72  
> CitationPlugin.openLiteratureNote @ main.ts:156  
> OpenNoteModal.onChooseItem @ modals.ts:66  
> t.onChooseSuggestion @ app.js:1  
> t.selectSuggestion @ app.js:1  
> e.useSelectedItem @ app.js:1  
> (anonymous) @ app.js:1  
> e.handleKey @ app.js:1  
> e.onKeyEvent @ app.js:1

---

<div class="post-metadata">

**Author:** ![welstand](https://forum.obsidian.md/user_avatar/forum.obsidian.md/welstand/32/8030_2.png) [@welstand](https://forum.obsidian.md/u/welstand)\
**Post date:** [December 10, 2020, 10:45pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/15 "2020-12-10T22:45:40Z")

</div>

Wait, you know what? I created a “Literature Notes” folder in the Obsidian vault, and then it worked!

---

<div class="post-metadata">

**Author:** ![echej](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/e/e495f1/32.png) [@echej](https://forum.obsidian.md/u/echej)\
**Post date:** [December 10, 2020, 11:49pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/16 "2020-12-10T23:49:59Z")

</div>

I will try!

> Clarified configuration setting re: literature note paths. The new version presents a simpler option, ‘Literature note folder.’ Existing users will have to reconfigure with this new setting.

This really confused me since nowhere in the config panel I couldn’t find this option

---

<div class="post-metadata">

**Author:** ![welstand](https://forum.obsidian.md/user_avatar/forum.obsidian.md/welstand/32/8030_2.png) [@welstand](https://forum.obsidian.md/u/welstand)\
**Post date:** [December 11, 2020, 6:19am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/17 "2020-12-11T06:19:51Z")

</div>

It would be great if you could insert the Zotero path as a placeholder in the Literature Note Template, like this: Kierkegaard. 1992. _Der Begriff Angst_.

---

<div class="post-metadata">

**Author:** ![phlind](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/p/e36b37/32.png) [@phlind](https://forum.obsidian.md/u/phlind)\
**Post date:** [December 12, 2020, 8:46am UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/18 "2020-12-12T08:46:23Z")

</div>

Unfortunately the plugin doesn’t work if you have “:” in your citekey (e.g. @Name:2020), because it can’t create a literature note within obsidian. But that can probably not be fixed on your side. So I guess, I have to remove all “:” from my citekeys.

Another problem I stumbled upon: If I try to insert the link for this source, an error is produced:

```
@misc{Saraceno,
	author = {Saraceno, Tom\'{a}s},
	howpublished = {Fotografien der Installation},
	title = {In Orbit},
	url = {http://www.tomassaraceno.com/projects/in-orbit},
	urldate = {2017-06-06}
}

{
"URL": "http://www.tomassaraceno.com/projects/in-orbit",
"accessed": {
  "date-parts": [
    [
      2017,
      6,
      6
    ]
  ]
},
"author": [
  {
    "family": "Saraceno",
    "given": "Tomás"
  }
],
"id": "Saraceno",
"publisher": "Fotografien der Installation",
"title": "In Orbit",
"type": "no-type"
},

```

Error:

```
Uncaught (in promise) TypeError: Cannot read property 'toString' of null
at CitationPlugin.getTitleForCitekey (eval at <anonymous> (app.js:1), <anonymous>:388:30)
at CitationPlugin.getPathForCitekey (eval at <anonymous> (app.js:1), <anonymous>:392:26)
at CitationPlugin.eval (eval at <anonymous> (app.js:1), <anonymous>:411:37)
at step (eval at <anonymous> (app.js:1), <anonymous>:70:23)
at Object.eval [as next] (eval at <anonymous> (app.js:1), <anonymous>:51:53)
at eval (eval at <anonymous> (app.js:1), <anonymous>:44:71)
at new Promise (<anonymous>)
at __awaiter (eval at <anonymous> (app.js:1), <anonymous>:40:12)
at CitationPlugin.getOrCreateLiteratureNoteFile (eval at <anonymous> (app.js:1), <anonymous>:406:16)
at CitationPlugin.eval (eval at <anonymous> (app.js:1), <anonymous>:437:22)
```

---

<div class="post-metadata">

**Author:** ![jgauthier](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jgauthier/32/4680_2.png) [@jgauthier](https://forum.obsidian.md/u/jgauthier)\
**Post date:** [December 12, 2020, 9:29pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/19 "2020-12-12T21:29:44Z")

</div>

Thanks @phlind for the bug reports!

1. “:” in citekey: Hmm, I think it might be good to automatically convert characters that would produce an invalid filename into underscores or something. Will think about this one more, though.
2. This will be fixed in the next version. This error is triggered because the entry is missing a year.

---

<div class="post-metadata">

**Author:** ![phlind](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/p/e36b37/32.png) [@phlind](https://forum.obsidian.md/u/phlind)\
**Post date:** [December 14, 2020, 8:38pm UTC](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793/20 "2020-12-14T20:38:24Z")

</div>

@jgauthier Thanks for your answer. I now changed all citekeys to be without “:”. Probably it would be better for the plugin not to convert, but to display an error, so that the keys can be consistent.

Btw: Did you see my post above? It would be great to have another shortcut to enter just the citekey in pandoc format `[@citekey]`. Would be nice for people who directly write parts of papers or books in Obsidian.

[Next page](https://forum.obsidian.md/t/new-plugin-citations-with-zotero/9793.md?page=2)
