From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: Citation syntax: a revised proposal Date: Tue, 10 Mar 2015 22:51:13 -0300 Message-ID: <874mpsmi7o.fsf@gmail.com> References: <87k2zjnc0e.fsf@berkeley.edu> <87bnkvm8la.fsf@berkeley.edu> <87zj8co3se.fsf@berkeley.edu> <87ioezooi2.fsf@berkeley.edu> <87mw4bpaiu.fsf@nicolasgoaziou.fr> <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> <87pp8hrxma.fsf@gmx.us> 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]:44733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVVpN-0003R6-Bq for emacs-orgmode@gnu.org; Tue, 10 Mar 2015 21:52:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVVpJ-00076m-B5 for emacs-orgmode@gnu.org; Tue, 10 Mar 2015 21:52:53 -0400 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:33454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVVpJ-00076h-4z for emacs-orgmode@gnu.org; Tue, 10 Mar 2015 21:52:49 -0400 Received: by qcvx3 with SMTP id x3so6941858qcv.0 for ; Tue, 10 Mar 2015 18:52:48 -0700 (PDT) In-Reply-To: <87pp8hrxma.fsf@gmx.us> 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: Rasmus , emacs-orgmode@gnu.org Hi Rasmus, Thanks for your comments. Some replies: 2015ko martxoak 10an, Rasmus-ek idatzi zuen: >> These are then slurped by org, and used to fill in printf-style >> templates. Some people mentioned using citations as generated by >> citeproc-java directly. However, I don=E2=80=99t believe this is reliab= le since >> (as also mentioned), it is difficult to control whether a certain style >> uses parentheses around a citation or not, whether the citation is >> capitalized*, the insertion of prefixes/suffixes within the parentheses, >> etc. > > If so, is there *any* advantage is using a processors over say > bibtex.el/reftex-cite.el/org-bibtex-parser.el? We'd get a couple of more > backends, right? But this step can presumably be handled by other tools > as necessary. > > If we have to do processing to the extend you describe (or I imagine that > you describe), I'm not sure there's a point in relying on a external tool, > which we cannot easily extend as opposed to fixing bugs we might encounter > in reftex-cite or "forking"/reimplementing functions we need from > there. I have made citeproc-java give output like: Smith////2014 Doe////1999 Smith et al.////2005 I parse that into lists of (author, year) pairs by splitting on the ////. Then I expose a template to elisp: =E2=80=9C%p%a (%y%s)=E2=80=9D (fo= r prefix, author, year, and suffix). This template could be changed however it is desired by a user: using square brackets instead of round parens, for example. I think people will likely want to customize things like this, and it seems difficult to get such flexibility from CSL. So far, this has proved much easier than trying to implement all the =E2=80=9Cproper=E2=80=9D citation functionality in elisp. CSL also gives the bibliography basically for free, including support for zillions of highly specific formats. (We do have to convert it from HTML, but it is highly structured, in the sense that only a few tags and styles can occur. So the conversion can basically just handle those cases one-by-one.) > >> So I think the only solution is to implement the formatting of the >> in-text portion of citations ourselves, and use citeproc-java only to >> extract authors and years. > > See above. I then don't see the point. It=E2=80=99s only the template for author-year in-text citations that I have implemented in elisp. CSL still gives us name parsing, disambiguation, and bibliography formatting, which are each very complex. > What I gather is that a big selling point of csl is the plentifulness of > styles. But you say we anyway need curated CSL styles to make it > work. I need just one such style, for our extraction of author + year for in-text citations. CSL styles are still used off-the-shelf for the bibliography. >> 2. Is it possible to support for implement importing citations from >> jabref through the =E2=80=9Clookup types=E2=80=9D facility in my code? > > This is major. I don't want to Jabref to manage citation and I would > rather not give it write access to my citation library as it has encoding > issues. It would be one among many options: bibtex, org-bibtex, jabref, ... You would be free to pick the one(s) that hold your reference database, and not bother with the others. I hope that=E2=80=99s helpful, -- Aaron Ecay