From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: org-cite and org-citeproc Date: Wed, 01 Apr 2015 08:42:23 -0700 Message-ID: <87h9szg8io.fsf@berkeley.edu> References: <87twx5hs2x.fsf@berkeley.edu> <871tk560p3.fsf@delle7240.chemeng.ucl.ac.uk> <878uedgeuq.fsf@berkeley.edu> <87iodh55b5.fsf@alphaville.usersys.redhat.com> <874mp0hlth.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]:56078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdKnO-0008U5-2t for emacs-orgmode@gnu.org; Wed, 01 Apr 2015 11:43:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdKnJ-0001AS-4I for emacs-orgmode@gnu.org; Wed, 01 Apr 2015 11:43:10 -0400 Received: from plane.gmane.org ([80.91.229.3]:33928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdKnI-0001A7-UR for emacs-orgmode@gnu.org; Wed, 01 Apr 2015 11:43:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YdKnH-0003g1-2G for emacs-orgmode@gnu.org; Wed, 01 Apr 2015 17:43:03 +0200 Received: from c-67-169-117-151.hsd1.ca.comcast.net ([67.169.117.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Apr 2015 17:43:03 +0200 Received: from richard.lawrence by c-67-169-117-151.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Apr 2015 17:43:03 +0200 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: emacs-orgmode@gnu.org Hi Tom and all, Thanks for answering my questions! tsd@tsdye.com (Thomas S. Dye) writes: > With natbib, it is possible to give a pre-note and a post-note to the > citation as a whole, but not to individual citations within it. In > order to support your syntax fully, I think BibLaTeX is needed. OK, good to know. >> (Also, do you think it is important to support plain BibTeX at all? It >> seems like we should not bother with this problem unless it's important >> for a lot of people. I personally would be fine with just targeting >> BibLaTeX, and it sounds like Eric would be too.) > > Well, one benefit of Aaron's function was to make this choice > superfluous, both now and in the future. It binds the two citation > commands you've implemented to citation commands implemented in > CITATION_STYLE. As Aaron notes, it should be easy to modify this (to > bind additional commands) when advanced citation support comes along. I think I have to retract what I said earlier: I doubt this part of Aaron's code still works in my branch, because I think Aaron was assuming citation objects contain just one reference; in my branch, I've merged in the parser support Nicolas later implemented for multi-cite citations. So a CITATION_MODE needs to know how to turn a list of works, each with associated prefix and suffix data, into a complete citation command. This complicates things enough that probably custom citation modes should be defined as Lisp functions, rather than via format strings...what do you think? I'm still having a hard time seeing what an analogous customization would look like for non-LaTeX backends. The LaTeX exporter is unique in that Org produces output which must then be further processed by another tool, so having customizable control over how a citation `looks' to that tool makes sense. But in other backends, the Org exporter itself produces the final document; there's no intermediate representation besides Org's own, plus whatever arguments are passed to a citation processing tool like org-citeproc. So, if that's right, the analogous customization in a non-LaTeX backend would be something like a filter, one that pre-processes citation objects before they are run through the external tool, or that post-processes the strings that come back (or both). Does that make sense? Certainly, both of those things are possible. > Typically, a bibliography style file defines several citation commands, > which might belong to one or more modes. ... > I think you might be able to merge CSL_FILE and CITATION_STYLE, since > they both point to a style file. OK, I see, that makes things clearer. Would it make sense to have two keywords, say LATEX_CITE_STYLE and CSL_FILE or similar, so that the style can vary independently when exporting to LaTeX vs. non-LaTeX? I'm thinking it will be tricky to come up with a single set of values for a CITATION_STYLE keyword that can be correctly mapped to both kinds of backend. Or maybe CITATION_STYLE should have "sub"-keywords, like #+CITATION_STYLE: biblatex:authoryear csl:chicago-author-date.csl or something similar? Best, Richard