hans / obsidian-citation-plugin

Obsidian plugin which integrates your academic reference manager with the Obsidian editor. Search your references from within Obsidian and automatically create and reference literature notes for papers and books.
MIT License
1.09k stars 81 forks source link

Feature Request: {{lastname}} - author last name as setting #144

Open francescoragazzi opened 2 years ago

francescoragazzi commented 2 years ago

Is your feature request related to a problem? Please describe. I would like to format my imported zotero references as "lastname date - title" (for ex. "Airoldi 2021 - Machine Habitus"). It makes much sense because then all my references folder is sorted alphabetically by last name. There is currently no way to select only the last name as a setting.

Describe the solution you'd like I would very much like to be able to choose something like {{lastname}} as a setting;

Describe alternatives you've considered Currently I import the full name then remove the first name manually

rtsaboya commented 1 year ago

This comment provides a workaround: https://github.com/hans/obsidian-citation-plugin/issues/189#issuecomment-1325422724

{{#each entry.author}}{{this.family}}{{#unless @last}}, {{/unless}} {{/each}}

francescoragazzi commented 1 year ago

Great, thanks a lot I'll try it out!