andras-simonyi/org-cite-csl-activate

Use document cite style?

Closed this issue · 2 comments

I see that currently, the code uses the fallback style file.

org-cite-csl--fallback-style-file

I'd imagine you should be able to do something like

(let* ((cite-string (cadar (org-collect-keywords '("CITE_EXPORT"))))
        (cite-spec (when (stringp cite-string) (split-string cite-string "[ \t]"))))
    (if (and cite-spec (string= "csl" (car cite-spec)) (cdr cite-spec))
        (expand-file-name (cadr cite-spec) org-cite-csl-styles-dir)
    org-cite-csl--fallback-style-file))

instead, no?

I'd be happy to make a PR if you like the look of this.

Thanks for the suggestion! The main consideration against doing this automatically is that IMHO it wouldn't make much sense to users of note citation styles which are typically rather verbose. But as an option (or even automatic in the case of author-date and numeric styles?) it could certainly be useful, so a PR in this direction would be absolutely welcome.