From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: org-cite and org-citeproc Date: Wed, 01 Apr 2015 09:41:12 -1000 Message-ID: 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> <87h9szg8io.fsf@berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdOW5-0004xK-C9 for emacs-orgmode@gnu.org; Wed, 01 Apr 2015 15:41:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdOW0-00027S-HK for emacs-orgmode@gnu.org; Wed, 01 Apr 2015 15:41:33 -0400 Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:35313) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1YdOW0-000278-9y for emacs-orgmode@gnu.org; Wed, 01 Apr 2015 15:41:28 -0400 In-Reply-To: <87h9szg8io.fsf@berkeley.edu> (Richard Lawrence's message of "Wed, 01 Apr 2015 08:42:23 -0700") 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: Richard Lawrence Cc: emacs-orgmode@gnu.org Aloha Richard, Richard Lawrence writes: > 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. Yes, I think an export filter would work for LaTeX. The general form for BibLaTeX is: \cites(=E2=9F=A8multiprenote=E2=9F=A9)(=E2=9F=A8multipostnote=E2=9F=A9)[=E2= =9F=A8prenote=E2=9F=A9][=E2=9F=A8postnote=E2=9F=A9]{=E2=9F=A8key=E2=9F=A9}.= ..[=E2=9F=A8prenote=E2=9F=A9][=E2=9F=A8postnote=E2=9F=A9]{=E2=9F=A8key=E2= =9F=A9} where \cites can also be \parencites, \textcites, etc. For natbib it is: \cite[=E2=9F=A8prenote=E2=9F=A9][=E2=9F=A8postnote=E2=9F=A9]{=E2=9F=A8key= =E2=9F=A9,...=E2=9F=A8key=E2=9F=A9} where \cite can also be \citep, \citet, etc. >> 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 Won't the backends sort this out without the additional mapping? All the best, Tom --=20 Thomas S. Dye http://www.tsdye.com