emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Citation syntax: a revised proposal


From: Richard Lawrence
Subject: Re: [O] Citation syntax: a revised proposal
Date: Wed, 04 Mar 2015 08:41:59 -0800
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu)

Avram Lyon <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]