From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Citation processing via Zotero + zotxt Date: Thu, 03 Dec 2015 18:31:14 -0500 Message-ID: References: <87wpt1yj5k.fsf@berkeley.edu> <87d1uqyiva.fsf@berkeley.edu> <8737vkidgl.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4dLM-0006nd-3g for emacs-orgmode@gnu.org; Thu, 03 Dec 2015 18:31:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4dLI-00084y-T1 for emacs-orgmode@gnu.org; Thu, 03 Dec 2015 18:31:20 -0500 Received: from mail-qg0-x236.google.com ([2607:f8b0:400d:c04::236]:33837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4dLI-00084N-OB for emacs-orgmode@gnu.org; Thu, 03 Dec 2015 18:31:16 -0500 Received: by qgeb1 with SMTP id b1so75598245qge.1 for ; Thu, 03 Dec 2015 15:31:16 -0800 (PST) In-reply-to: <8737vkidgl.fsf@fastmail.fm> 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 Lundin Cc: emacs-orgmode@gnu.org, Martin =?utf-8?B?WXJqw7Zsw6Q=?= I clearly had some super important academic work to do today, so instead I played around with citations ;) I am not yet convinced a citation processor will get us where we want because of the complexity of the external dependencies, and the potential/probable need for us to define new CSL files for different backends, or at a minimum for org-formatted citations and bibliographies. Hacking bst files is no fun, and it doesn't look like CSL files are much better! Plus you have to find them and install them somehow. I wanted to get a sense for how well I could manipulate citation and bibliography format from org-ref with a bibtex database. The answer is it is pretty easy, not perfect, but pretty good, and could certainly be made better with dedicated effort. You can see how here, and some discussion about its limitations: http://kitchingroup.cheme.cmu.edu/blog/2015/12/03/Exporting-numbered-citations-in-html-with-unsorted-numbered-bibliography/ I am pointing this out because I think the approach I used could allow for plugins for different database backends, different ways to get the replacements, etc... you could substitute org-ref links for the citation syntax at some point with no real loss of generality. org-ref could insert the new syntax as soon as it is available in a main org branch. Some code will have to be rewritten to get the key under point, but that probably won't be too hard. We could provide a solution like this for some backends, using bibtex as the database, for pretty immediate use. Then other more advanced solutions could come along that would likely be superior in output quality if they use real citation processors, but only if there are CSLs for different backends (if I understand how they work). These would be optional, and only needed if higher quality and flexibility in output was required. What do you think? Matt Lundin writes: > Richard Lawrence writes: > >> Eric S Fraga writes: >> >>> 2. How would I use this starting from an org-bibtex database (which I >>> typically export to bibtex)? >> >> I can envision a couple of possibilities. One simple option would be to >> switch to managing your reference database with Zotero, by exporting >> from org-bibtex to .bib, and then importing the .bib into Zotero. >> >> I don't want to force that on anyone, though. Another option is to >> use the org-bibtex to produce .bib at export time, and then use Zotero >> to read the .bib and process citations when exporting to non-LaTeX formats. >> >> This second option is more work, as I don't know of any API for loading >> items into Zotero's citation processor in BibTeX format. But given that >> Zotero is able to import .bib files, I imagine this API would not be too >> much work to build. > > Given these complexities, it seems that if we went the zotero route we > could end up with a fairly large installation chain (firefox, zotero, > zotxt, plugin for zotero). And this would require installing items from > multiple, heterogeneous sources. > > I wonder at this point whether pandoc-citeproc (packaged with pandoc) > would actually be the simpler route. It can parse bibtex files directly > and (as a filter within pandoc) can output formatted citations in org > format. > > As a GNU/Linux user, I would find installing zotero and all the add-ons > messier and more cumbersome than installing pandoc and/or node-js (were > we to use citeproc-js) from the command line. > > Best, > Matt > > Footnotes: -- 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