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

Provide bibliographic data inline #5

Closed denismaier closed 3 years ago

denismaier commented 6 years ago

It should also be possible to add bibliographic data inline, i.e. without a seperate bibfile. This is useful for shorter documents. With pandoc, bibliographic data can be added in a special metadate field, see https://pandoc.org/MANUAL.html#citations. Something similar should be possible with citeproc-el/citeproc-org.

andras-simonyi commented 3 years ago

(This might interest @bdarcus as well.) There are actually (at least) two means to have inline bibliographies in Org-mode documents right now: The first, very general way is using an Org source block for the bibliography which is tangled to a separate bibliography file and produces no output during export. The second, perhaps more interesting solution is based on the fact that citeproc-el/oc-csl/citeproc-org have recently acquired the ability to directly use org-bibtex bibliographies (see, e.g., http://gewhere.github.io/org-bibtex) so one can have a non-exported section in the Org file in which all subheadings describe bibliography entries using attributes which is used as the bibliography when the file is exported. All in all this seems to be a solved problem, although improvements are surely possible. (I see a lot of potential in generalizing the org-bibtex idea, e.g., to CSL, it'd be also trivial to add CSL-YAML support.)

andras-simonyi commented 3 years ago

I've created a Wiki page with the response above, so will close this issue if there are no objections.

denismaier commented 3 years ago

Sure, go ahead.