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

Add ODT export format #23

Closed bdarcus closed 3 years ago

bdarcus commented 3 years ago

To accommodate people who need to target MS Word, etc, with real footnotes, etc.

denismaier commented 3 years ago

Shouldn't that be done on the org-side?

bdarcus commented 3 years ago

Yes, also, but ODT isn't a supported format here, according to the docs.

denismaier commented 3 years ago

I still don't get it. Wouldn't it make more sense to go through a common intermediary? E.g. org-syntax? So that citeproc-el doesn't have to do the formatting for all output formats.

denismaier commented 3 years ago

Maybe I'm to much influenced by pandoc here, but I would expect citeproc-el to work with all supported output formats out-of-the-box without further configuration.

bdarcus commented 3 years ago

IDK why the current design, but that's not how this library works. See:

https://github.com/andras-simonyi/citeproc-el/blob/master/citeproc-formatters.el

andras-simonyi commented 3 years ago

I still don't get it. Wouldn't it make more sense to go through a common intermediary? E.g. org-syntax? So that citeproc-el doesn't have to do the formatting for all output formats.

The main reason for the existence of multiple citeproc-el formatting backends is that Org markup is not expressive enough to represent some of the formatting described by CSL styles, e.g., there is no native Org representation of small caps or hanging indent. Because of these limitations, citeproc-el is designed to be able to provide richer export for important formats that can actually describe (some of) these formatting instructions like HTML and LaTeX, everything else can indeed use the Org citeproc-el backend as an intermediary.

For exporting Org documents with a particular backend using citeproc-el this means that the exporter has to use the dedicated citeproc-el backend for the format in question if it's available, and use the Org citeproc-el backend as a fallback. This ensures that citations and bibliographies can be exported to any format for which there is an Org exporter, and the exported documents will contain richer formatting than what would be possible with plain Org if there is a compatible dedicated citeproc-el backend.