From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: a new csl - citation style lisp ;) Date: Sat, 12 Dec 2015 08:23:46 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7k9R-0008Sq-9c for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 08:23:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7k9N-0007DP-8e for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 08:23:53 -0500 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:34125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7k9N-0007DA-3f for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 08:23:49 -0500 Received: by qkdp187 with SMTP id p187so77828099qkd.1 for ; Sat, 12 Dec 2015 05:23:48 -0800 (PST) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Martin =?utf-8?B?WXJqw7Zsw6Q=?= Cc: Org Mode >> >> 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