New plugin: Citations (with Zotero)

Nothing - this is currently what the plugin does… More functionality might follow

2 Likes

Thanks for your reply! I thought I saw that somewhere on youtube or a blog, but that must have been another tool then. Looking forward to perhaps having this functionality in this plugin. Is there a quick workaround for formatting the citation when printing as pdf?

I think most of us who use this use some other tool as well. I write in markdown in Obsidian, and then convert it to latex via pandoc. Pandoc converts the markdown citations into latex ones, and then latex renders them as needed.
So, nothing wrong – but if you want to have full citations, you need some other tools. (I’m sure it’s doable without latex, it’s just the way I do it for other reasons.)

1 Like

Since nobody mentioned it I’ll suggest to the maintainer to check citeproc by John MacFarlane. It is a CSL processor that doesn’t depend directly on pandoc, I’m using it for my wiki-to-html setup and it’s quite an awesome tool.

It can be useful to generate per-page bibliography on-the-fly when entering preview mode (to me to have the bibliography hardcoded in the markdown file isn’t a good idea)

@lorenzuru As far as I understood this is on the ToDo list - it has been discussed to use the Zettlr solution, which is actually using citeproc to render bibliographic information.

1 Like

As shown here, you can use this plugin together with the Dataview plugin to generate an overview of specific literature, for example a preliminary bibliography for a certain project: Dataview plugin snippet showcase - #4 by phlind

4 Likes

Thanks for sharing this! I didn’t thought about this possibility.

Btw it’s sweet to know that someone interested in the same subject area as mine uses Obsidian as well!

This is cool, thanks for showing – I hadn’t thought of this way of doing it, but will give it a try.

(@welstand, as far as I can tell, there are a number of us philosophers here…)

1 Like

I didn’t realize that we can re-load Obsidian until today! So we don’t need to re-start Obsidian but just re-load it. This is great.

Please note that reloading the app can have some negative/unexpected consequences, including data loss. The shortcut has been unset by default in the latest version for this very reason:
image

Aha, I see. Thank you @argentum for pointing this out! So to refresh the Citation-extension reference list after adding new items to the bib file, we’d better still do quit-restart Obsidian? It’s a bit more complicated, but if it’s safer than I will stick to this workflow.

One work-around that has worked for me (although now the auto-refresh also works so I don’t use it any more): if you go to the Citations setting page, and re-paste the path to the bib file (I used to just Ctr+X and Ctr+V), it re-loads it. So no need to quit the program.

Concerning this “reload the library” problem: I still can’t see why this isn’t working for some of you. Whenever I add any new entry to my bib file, it is immediately recognized by the citations plugin - without having to reload or restart obsidian or re-entering the path in the citation settings.

So I still think the problem is not with the plugin itself - it obviously has this feature - but with your BetterBibtex settings in Zotero… :thinking:

I’m running into a strange formatting issue when inserting links: they seem to insert exactly in the line ABOVE wherever my cursor is. I’ve altered the shortcut to be Ctrl + P, but when I hit that and select a citation, it appears in the previous line, not where I’d directed it to paste.

EDIT: this issue only happens when using the hotkey for “Insert literature note link,” not “Insert markdown citation.”

Has anyone else had this problem?

Quick Issue report here:

The plugin uses semicolons to split file info but it seems that’s not always what is used, for me, Zotero seems to use colons as a delimiter for that field. I was getting the whole original string until I changed the code to colons and now it works for me.

Not sure where this is being determined (couldn’t find enough on the way BibLaTeX usually works, or if it’s something odd in my Zotero setup, but if it isn’t just me then perhaps there’s a more robust approach to the file field splitting.

For reference, here is a file field straight out of a test .bib export:
file = {Bonchi et al. - 2013 - Activity preserving graph simplification.pdf:/Users/orion/Zotero/storage/7X742TDQ/Bonchi et al. - 2013 - Activity preserving graph simplification.pdf:application/pdf}

Hello, and thanks for a great plugin! I am new to obsidian in general, and would like some input on an issue I am having regarding attaching files to a literature note. I am using this now:

---
title: {{title}}
authors: {{authorString}}
journal: {{containerTitle}}
year: {{year}}
file: {{entry.files.[0]}}
---

This is to get the file link itself in the literature overview table i create like this:

```dataview
table title as Title, authors as Authors, title as Title, journal as Journal, year as Year, file as PDF
from "lib"

I also add the link to the attachment in the literature note itself like this:

PDF: [[{{entry.files.[0]}}]]

However, when I click on the link generated in the md for the literature note, it says “File name cannot contain any of the following characters: * | /” and so on. Additionally, the link in the publication table looks like this:

{ path: lib/@Ibrahim2018.md, name: @Ibrahim2018, link: app://obsidian.md/lib/@Ibrahim2018, ctime: 14. mar. 2021, 12:18, mtime: 14. mar. 2021, 12:37, size: 2918 }

All I want is a clickable link that opens the attached pdf in a pdf-reader directly, both in the table and in the publication note. Is this possible?

To get a link to Zotero you need to use {{zoteroSelectURI}} in the template, the resulting link will open an item in your Zotero library.

To directly open the file from Obsidian you need to edit the link substituting select with a direct open-pdf/library option

Below how the links should look like in markdown

[Show in library](zotero://select/items/1_4XK234ZW)
[Open PDF in default browser](zotero://open-pdf/library/items/FLQZ3X3K)
2 Likes

Try this in your template: [{{title}}](file://{{entry.files.[0]}})

1 Like

BetterBibTeX is refreshing the .bib file, but the Citations plugin isn’t seeing the update. I’ve been using Obsidian’s Reload without saving command, but have seen that this sometimes results in data loss (or it did at one time).
Auto-refresh would be super cool if I could get it working!

1 Like

Thanks for this, works great!