On Mon, Oct 26, 2015 at 6:23 PM, Richard Lawrence < richard.lawrence@berkeley.edu> wrote: > Hi Nicolas and all, > > Nicolas Goaziou writes: > > > Richard Lawrence 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). > The obvious advantage to pandoc-citeproc is that it keeps us close to pandoc, and it would be good to encourage as much compatibility as possible with those guys. The disadvantage is that, from what I can tell, the javascript implementation is the canonical version of citeproc, and the place where improvements are pushed first. So, for instance, if one wanted to implement an org-syntax output format for citeproc, citeproc-js would be the most likely project to support that work.