emacs-citar / citar

Emacs package to quickly find and act on bibliographic references, and edit org, markdown, and latex academic documents.
GNU General Public License v3.0
479 stars 53 forks source link

Allow `citar-citeproc-format-reference` to take an optional `style` arg #737

Closed bdarcus closed 1 year ago

bdarcus commented 1 year ago

We could also include a couple/few minimal CSL styles for this, a al here.

See https://github.com/pprevos/citar-denote/issues/15.

@localauthor WDYT is the best way to handle this case?

The initial impetus was wanting specific complex name formatting to include in new note titles in denote.

Once we tweak this function, with this commit, it should be easy to do something like this:

((sn citar--shorten-names)
 (etal citar-citeproc-format-reference 
    citar-citeproc-csl-name-only-etal)) ; the latter is a variable for the style

... and then in a template this, which would run that function (though there's a wrinkle here I need to think about more):

"$["author" "editor":%etal}"
bdarcus commented 1 year ago

As you see, I merged a solution, though I confess I don't totally understand what I did (let-binding the argument?)!

If you see any issues, let me know.