[Top][All Lists]

[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, 18 Mar 2015 08:19:53 -0700
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu)

Hi Matt,

Matt Price <address@hidden> writes:

> Just a note about Zotero:  I think for most of us, the reason to export
> into ODT and/or DOC is to circulate a paper either for review or
> collaboration.  Either case will likely involve some revision to citations,
> which would ideally be handled through Zotero.  for this to work properly,
> we would want to export a full Zotero citation.  To do that, we would
> likely need to speak directly to Zotero iteself.  
> ...
> Among other pieces of data, it contains a reference to a zotero URL which i
> don't think org-citeproc will know about.  Can you describe what would be
> necessary to get text like this into an ODT, using ythe code you've been
> working on?  

Hmm, interesting.  It looks like the ODT XML encodes the actual JSON
representing the citation, with the Zotero URL you refer to going in the
"uri" or "uris" property.  What is this used for, exactly?  I get an
Access Denied error when I try to visit the URL...is it something you
can share with collaborators?

I'm not sure exactly what's required to get this information through a
processing pipeline that looks like Zotero -> Org -> org-citeproc ->
pandoc-citeproc -> pandoc -> org-citeproc -> Org.  The question is
whether the pandoc(-citeproc) data structures have slots for URLs
associated with a work in the reference database, and whether the
rendering functions will pay attention to those URLs.  

I know that Pandoc is capable of reading in citation data that includes
URLs, but I don't know whether that URL information makes it to the
other side of the pandoc-citeproc CSL processing.  It may (in fact,
probably does) depend on the CSL stylesheet.  I would need to look into
this a bit, but it's possible that with an appropriate stylesheet, it's
pretty trivial to generate output like this.

Another option would be to post-process the org-citeproc output within
the Org exporter.  If Org has got the data from Zotero, wrapping the
actual citation in <text:reference-mark-start ...> and
<text:reference-mark-end ...> tags that contain this data shouldn't be
too hard to do from Elisp.

Finally, a third option is not to use org-citeproc at all in this case.
If you are already using Zotero, which contains its own CSL processor
(citeproc-js), then you may be able to just use Zotero to render the
citations and bibliography, by passing it JSON data.  The zotxt plugin
might help here: https://bitbucket.org/egh/zotxt/src.  In that case, the
processing pipeline would be much simpler:
Org -> (zotxt ->) Zotero (-> zotxt) -> Org. 

The nice thing about using the citeproc-js JSON format as the input to
org-citeproc is that it makes having this alternative pipeline pretty
simple.  I already have Elisp functions to generate this JSON from an
Org citation object (see the *-to-json functions in the org-citeproc
repo).  Setting up this alternative pipeline would involve figuring out
how to send that data to Zotero and how to parse the response, which
would basically mean writing a function parallel to
org-cite--process-citations (in the org-cite library in my
wip-cite-org-citeproc branch) that talks to Zotero instead of


reply via email to

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