From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Citation syntax: a revised proposal Date: Wed, 04 Mar 2015 08:41:59 -0800 Message-ID: <87zj7s7m08.fsf@berkeley.edu> References: <87k2zjnc0e.fsf@berkeley.edu> <87zj8co3se.fsf@berkeley.edu> <87ioezooi2.fsf@berkeley.edu> <87mw4bpaiu.fsf@nicolasgoaziou.fr> <8761aznpiq.fsf@berkeley.edu> <87twyjnh0r.fsf@nicolasgoaziou.fr> <87oaopx24e.fsf@berkeley.edu> <87k2zd4f3w.fsf@nicolasgoaziou.fr> <87egpkv8g9.fsf@berkeley.edu> <877fv6xfaq.fsf@gmail.com> <87twya2ak0.fsf@berkeley.edu> <87zj81aa97.fsf@nicolasgoaziou.fr> <87ioep2r6p.fsf@berkeley.edu> <87y4ngbgm7.fsf@nicolasgoaziou.fr> <87h9u4csln.fsf@gmx.us> <8761aji5a3.fsf@gmail.com> <874mq2ai1k.fsf@berkeley.edu> <87ioei7zzw.fsf@berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTCNi-0005GO-UN for emacs-orgmode@gnu.org; Wed, 04 Mar 2015 11:42:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTCNd-0005RL-NI for emacs-orgmode@gnu.org; Wed, 04 Mar 2015 11:42:46 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:46868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTCNd-0005QR-Hc for emacs-orgmode@gnu.org; Wed, 04 Mar 2015 11:42:41 -0500 Received: by pabli10 with SMTP id li10so34772661pab.13 for ; Wed, 04 Mar 2015 08:42:39 -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: Avram Lyon , emacs-orgmode@gnu.org Avram Lyon writes: > I know that citeproc-js has tried to be engine-agnostic, so perhaps it can > work with Guile. It looks like I was too quick. Although the homepage makes it seem like Guile supports JS, the manual says: "ECMAScript was not the first non-Schemey language implemented by Guile, but it was the first implemented for Guile's bytecode compiler. The goal was to support ECMAScript version 3.1, a relatively small language, but the implementor was completely irresponsible and got distracted by other things before finishing the standard library, and even some bits of the syntax. So, ECMAScript does deserve a mention in the manual, but it doesn't deserve an endorsement until its implementation is completed, perhaps by some more responsible hacker." https://www.gnu.org/software/guile/manual/html_node/ECMAScript.html#ECMAScript ...and I can't even get my local Guile to interpret "var x = 2;", though I doubt that is entirely Guile's fault. So it looks to me like Guile's JS support is not quite mature enough to run citeproc-js, though I'd be happy to be wrong about this. > If not, you may also want to look at citeproc-hs and citeproc-rb, both > of which are quite complete (they, I believe, pass the entire test > suite) and which may be easier to bring in as dependencies (JS engines > are still a rarer dependency than Ruby or Haskell). This is the citeproc-ruby you have in mind, right? https://github.com/inukshuk/citeproc (I found another under the name `citeproc-rb', but it doesn't look nearly as complete.) Both the Ruby citeproc and citeproc-hs seem to have support for reading BibTeX databases. Anyway, maybe a good intermediate step would be translating citation objects and Org-bibtex data to JSON. It looks like citeproc-hs and citeproc-js both accept JSON as input formats (though I do not know if these formats are compatible...). The Ruby citeproc implementation speaks some amount of JSON (though mostly as an output format, I think), and I guess it could probably be taught to read JSON pretty easily. This needs some more investigation, but if Org can produce a JSON representations of citation data, it seems like it could be made to work with several citeproc implementations that look reasonably complete. Best, Richard