>> >> I got curious enough about citation processing to draft an elisp-based >> citeproc for orgmode. You can see the code here: >> >> https://github.com/jkitchin/org-ref/tree/master/citeproc > > I gave it a spin and it was very easy to set up as an org-ref user. > Great work so far. I think an Elisp based implementation has many > strengths like you mentioned in the readme.
I am glad to hear that! > >> It is loosely based on the xml-CSL file, but in lisp. The principle is >> the same, there is a csl file in lisp that contains formatting >> information, and a processor that works on my org-ref links to replace >> them with formatted citations and entries. > > What would be the best way moving forward? How easy would it be to > implement a converter for xml-CSL files? Or would it be better to > support the xml-CSL format directly to avoid duplicate work? I don't know the answer here. We can read the xml-CSL directly into an elisp data structure that looks similar to my lisp-csl. I thought about trying to use the xml-csl directly, but they write some logic control into them, and I didn't want to write code to turn them into functions (which is what the other citeproc codes must do I guess.) Also, by going straight to elisp-csl, we can directly write code into them if we want, which makes them pretty flexible, probably more so than xml-csl. It only took a couple of days to get to this, so I am not too committed to not using the xml-csl files. There are a lot of them already available. They don't support my space-chomping and punctuation transposition ideas, or different citation types (cite, citenum, citeyear, citeauthor, ...) I think, so we would have to adapt them to do that or provide some other mechanism to pass options to the processor. > >> It certainly isn't complete, bug-free, or stable yet and might still not >> solve >> note-based styles, but it is pretty powerful already. > > Do you already accept bug reports and pull requests on Github? Sure. I think this code has some value to org-ref whether it becomes the citation processing solution in the future or not. It will make it easy to add nicely formatted citations to emails, text documents, etc... I am not sure it is particularly stable in structure yet. I still don't know how easy it will be to modify backend outputs, e.g. to change how in-text citations are hyperlinked to bibliography entries, or if it would be easy to have a bibitems list prepared for LaTeX, or to export as an org-file with footnotes, or otherwise linked references, etc... We can only learn those things by trying them ;) > > Best regards, > Martin Yrjölä -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu