andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

17 Sub-bibliographies #51

Closed andras-simonyi closed 3 years ago

andras-simonyi commented 3 years ago

Add support for defining and rendering filter-based sub-bibliographies

denismaier commented 2 years ago

Do you know if that feature is already available in orgmode?

andras-simonyi commented 2 years ago

Unfortunately it hasn't yet been integrated into oc-csl.

denismaier commented 2 years ago

Too bad. Would you do that? Or should I raise that issue on the org-list? @bdarcus WDYT?

bdarcus commented 2 years ago

There was already a thread on this on the list earlier; right?

The only reason to raise it on the list now is if there's uncertainty about implementation, and there's reasonable likelihood someone else will have time, capability, and interest to do it.

I doubt either applies, since it could just borrow the same approach as in oc-biblatex, and we've seen very little activity with patches like these so far.

OTOH, you could fully test oc-biblatex support for this, and if you run into problems with it, post a note on the list? That could then benefit oc-csl if and when someone finds time to implement it?

andras-simonyi commented 2 years ago

I doubt either applies, since it could just borrow the same approach as in oc-biblatex, and we've seen very little activity with patches like these so far.

I wasn't aware that oc-biblatex already supports sub-bibliographies...

bdarcus commented 2 years ago

I wasn't aware that oc-biblatex already supports sub-bibliographies...

Oh; now that I think about it, I'm not sure either.

I just vaguely I recall I saw this, or similar, support.

Obviously that would be something Denis could check out, and if it's not present, post suggestions on that.

denismaier commented 2 years ago

I think it's in oc-biblatex. IIUC, @ebouna uses that already, right?

bdarcus commented 2 years ago

From the docstrings; this?

;; Bibliography is printed using "\printbibliography" command.  Additional
;; options may be passed to it through a property list attached to the
;; "print_bibliography" keyword.  E.g.,
;;
;;    #+print_bibliography: :section 2 :heading subbibliography
;;
;; Values including spaces must be surrounded with double quotes.  If you need
;; to use a key multiple times, you can separate its values with commas, but
;; without any space in-between:
;;
;;    #+print_bibliography: :keyword abc,xyz :title "Primary Sources"
ebouna commented 2 years ago

I think it's in oc-biblatex. IIUC, @ebouna uses that already, right?

Yes, I am using it!

andras-simonyi commented 2 years ago

FYI, I've made some improvements in this area and now the following types of filters are supported: type, nottype, keyword, notkeyword, csltype, notcsltype, filter. The last three are new, and make it possible (i) to choose whether to match based on bib(la)tex type (if available) or CSL type, and (ii) to filter using any Emacs Lisp function. Perhaps more importantly, I have now a working oc-csl.el patch which adds support for filter-based sub-bibliographies to the csl org-cite export processor (nocite support has already been merged.), I plan to test it a bit more and then send it to the Org mailing list.

andras-simonyi commented 2 years ago

Update: I've just sent the patch to the mailing list and don't expect major changes functionality-wise. Any comments, especially based on testing would be appreciated.

andras-simonyi commented 2 years ago

Further update: The support for this feature has just been merged into Org's main ("master") branch, so should be available in the next version.