obsidian-citation-plugin icon indicating copy to clipboard operation
obsidian-citation-plugin copied to clipboard

Pulling tags into the literature note templates?

Open mikeion opened this issue 5 years ago • 5 comments

Hi there,

Thanks again for this amazing plugin! You have provided a list of variables that we can put in our literature note content templates (i.e., citekey, DOI, page, etc.). I'm wondering if it would be possible to also pull a comma-separated list of tags provided by Zotero that are associated with each unique citation? I'm thinking that this is where the backlinking functionality of Obsidian can really shine!

mikeion avatar Dec 23 '20 17:12 mikeion

+1, this would be really helpful.

annargrs avatar Jan 03 '21 18:01 annargrs

Hi, this is a great idea! Unfortunately zotero-better-bibtex doesn't include the tag data in its CSL-JSON export.

BUT it does include it in the BibLaTeX export, which will soon be supported (in the 0.4.0 release) and which is currently supported on the develop branch.

I'm focusing on stability/performance issues at the moment, but I'd gladly appreciate a code contribution here if anyone is interested. I'll document the relevant necessary work below for others (or for my later self in case no one else gets to it :) )

hans avatar Jan 07 '21 16:01 hans

+1 for this, would be super useful. I would absolutely help if I knew how!

slsdunn avatar Jan 18 '22 13:01 slsdunn

Any updates on this feature?

huaiyizhao avatar Oct 15 '22 08:10 huaiyizhao

I found something at #61, where you can use {{entry.data.fields.keywords}} to extract tags of Zotero and do some tricks like {{#each entry.data.fields.keywords}}{{#if @last}}#{{this}}{{else}}#{{this}}, {{/if}}{{/each}} to convert them to obsidian tags. But it may not work on keywords with blank space.

huaiyizhao avatar Oct 15 '22 08:10 huaiyizhao