From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Citation syntax: a revised proposal Date: Wed, 18 Mar 2015 08:19:53 -0700 Message-ID: <87fv9272p2.fsf@berkeley.edu> References: <87k2zjnc0e.fsf@berkeley.edu> <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> <87bnkbi61v.fsf@gmail.com> <87a8zlmujp.fsf@gmail.com> <87ioe8yftp.fsf@berkeley.edu> <871tkwmh87.fsf@gmail.com> <87sidb8mm7.fsf@berkeley.edu> <87lhj07ol0.fsf@berkeley.edu> <87y4mw19yj.fsf@berkeley.edu> <87twxj1tfh.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]:41942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYFlp-0006LX-1h for emacs-orgmode@gnu.org; Wed, 18 Mar 2015 11:20:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYFll-0004AQ-MC for emacs-orgmode@gnu.org; Wed, 18 Mar 2015 11:20:32 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:36843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYFll-0004A6-F0 for emacs-orgmode@gnu.org; Wed, 18 Mar 2015 11:20:29 -0400 Received: by padcy3 with SMTP id cy3so45406557pad.3 for ; Wed, 18 Mar 2015 08:20:27 -0700 (PDT) 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: Matt Price Cc: Org Mode Hi Matt, Matt Price 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 and 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 org-citeproc. Best, Richard