Hi Nicolas and all,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Richard Lawrence <richard.lawrence@berkeley.edu> writes:
>
>> Yes, this is my understanding, too. In particular, there does not seem
>> to be an Elisp CSL library, and it would be a lot of work to write
>> one.
>
> Here is a genuine question: what is the difficult part, or if there is
> none, the longer parts of the work? AFAIU, CSL is XML and we can use
> libxml for the low-level parsing.
I can't speak to how difficult it would really be. But I do think it
would be a lot of work, and tedious, unglamorous work at that.
Essentially it means implementing the CSL specification:
http://docs.citationstyles.org/en/stable/specification.html
The specification describes the XML format for CSL styles, which IIUC
are something like XSLT programs: they describe how to transform an
input document tree into an output document tree. So, implementing CSL
is something like implementing a very special-purpose declarative
programming language, which has to handle declarations about every
detail of citation formatting (where to put periods, how to capitalize
names like "von Neumann", whether to use "&" or a translation of "and"
for the current locale, etc.). Lisp is a good language to do this kind
of thing in, but parsing the XML is surely the easy part.
> Could you give some examples of the UI offered by the citeproc-hs
> library?
The library I ended up wrapping is actually pandoc-citeproc, which is a
fork of citeproc-hs (which seems to be unmaintained).