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 00:44:45 -0300 Message-ID: <87a8zlmujp.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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVB6T-0004YE-RR for emacs-orgmode@gnu.org; Mon, 09 Mar 2015 23:45:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVB6Q-0002Zh-Fq for emacs-orgmode@gnu.org; Mon, 09 Mar 2015 23:45:09 -0400 Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:45340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVB6Q-0002Yz-BG for emacs-orgmode@gnu.org; Mon, 09 Mar 2015 23:45:06 -0400 Received: by qgaj5 with SMTP id j5so33835501qga.12 for ; Mon, 09 Mar 2015 20:45:06 -0700 (PDT) In-Reply-To: <87bnkbi61v.fsf@gmail.com> 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: Nicolas Goaziou , Richard Lawrence Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello all, I=E2=80=99ve pushed an update to my branch. The major change is to use citeproc-java for the generation of the bibliography and the parsing of names. The former is straightforward. For the latter, I have created a CSL file which outputs author-year citations in an easy-to-parse format. 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 reliable = 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. 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. * NB neither my branch nor the parser currently handles capitalized citations either. Using citeproc gives us for free sophisticated disambiguation of authors that share a last name (by adding first initial) or works by the same author in the same year (by adding a letter suffix to the year). My code still does not implement numeric or footnote citations. It=E2=80=99s hard to keep straight all of the traffic in citation-related threads. I=E2=80=99ll try to respond to what I see as the major points rai= sed, but I apologize if I inadvertently skip something. Some people have talked about supporting other CSL processors. I don=E2=80= =99t see much utility in that, since CSL is a standard that all processors should implement faithfully. I judge the java implementation to be the most complete and cross-platform. With respect to Zotero, it is possible, through the =E2=80=9Clookup=E2=80=9D facility I=E2=80=99ve implemented, to = implement fetching of bibliography data from Zotero. I merely do not want to talk to Zotero (or other tools) for the *formatting* of the data. Rasmus writes about the insertion of punctuation by biblatex. I=E2=80=99ve noticed it too, and it= =E2=80=99s a thorny problem. Perhaps the best and easiest solution is to say that org-latex documents must do \renewcommand{\postnotedelim}{} in their preamble. (Thanks also to Rasmus for discussion of points I raised in previous mails about reftex and org syntax. I have no specific reply but the responses were all extremely helpful. I haven=E2=80=99t had time t= o act on any of them because I=E2=80=99ve been concentrating on citeproc support.) I haven=E2=80=99t updated the branch to the new multicitation syntax yet, b= ut thanks as always to Nicolas for working on it. I think that is next on my list, along with getting biblatex support completely ironed out. I have not had much time to study Vaidheeswaran=E2=80=99s jabref integration code. In any case I would be hesitant to do so until there is confirmation of the code=E2=80=99s copyright status, since he(?) sometimes = posts to the mailing list using an email address belonging to Jambunathan, who at some points in the past was not willing to provide copyright assignment. However, it would be good to know: 1. Is any important functionality lost by using citeproc-java as the CSL processor, rather than jabref? 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? 3. How are citations formatted for export to ODT? An example of the ODT/XML code for something like =E2=80=9Cas demonstrated by Smith (2015)= =E2=80=9D, where =E2=80=9CSmith (2015)=E2=80=9D has whatever fancy formatting a cit= ation is expected to have in ODT, would be helpful. I=E2=80=99m sorry that I do not have enough time to both work on the code a= nd participate very much in the discussion. But reading it has been quite helpful to me in creating the code, so thank you all. Finally, the attachments demonstrate the output from ascii export of a sample document + bibliography (in org-bibtex format). --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=doc.txt Content-Transfer-Encoding: quoted-printable Aaron Ecay 1 Section one =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Here is a citation (Smith 2015) . Here is another with parens J. Doe (2016b). Here is one with a prefix and suffix (see Smith 2015 and other such works). Here is one with a prefix and suffix and parens see Smith (2015 and other such works). Here=E2=80=99s a citation to demonstrate the disambiguation of names: (B.= Doe 2016) . And the disambiguation of years: (J. Doe 2016a) . 2 Bibliography =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Currently the bibliography keyword doesn=E2=80=99t create its own section. - Doe, Bill. 2016. =E2=80=9CWork Three.=E2=80=9D - Doe, Jane. 2016a. =E2=80=9CWork Two Bis.=E2=80=9D - =E2=80=94=E2=80=94=E2=80=94. 2016b. =E2=80=9CWork Two.=E2=80=9D - Smith, John. 2015. =E2=80=9CWork One.=E2=80=9D --=-=-= Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename=doc.org Content-Transfer-Encoding: base64 IytCSUJEQjogb3JnLWJpYnRleCBiaWIub3JnCiMrQ0lUQVRJT05fTU9ERTogYXV0aG9yLXllYXIK IytDSVRBVElPTl9TVFlMRTogZGVmYXVsdAoKIytvcHRpb25zOiB0b2M6bmlsCgoqIFNlY3Rpb24g b25lCgpIZXJlIGlzIGEgY2l0YXRpb24gQG9uZSAuCgpIZXJlIGlzIGFub3RoZXIgd2l0aCBwYXJl bnMgW0B0d29dLgoKSGVyZSBpcyBvbmUgd2l0aCBhIHByZWZpeCBhbmQgc3VmZml4IFtjaXRlOiBz ZWUgQG9uZSBhbmQgb3RoZXIgc3VjaCB3b3Jrc10uCgpIZXJlIGlzIG9uZSB3aXRoIGEgcHJlZml4 IGFuZCBzdWZmaXggYW5kIHBhcmVucyBbKGNpdGUpOiBzZWUgQG9uZSBhbmQgb3RoZXIgc3VjaCB3 b3Jrc10uCgpIZXJl4oCZcyBhIGNpdGF0aW9uIHRvIGRlbW9uc3RyYXRlIHRoZSBkaXNhbWJpZ3Vh dGlvbiBvZiBuYW1lczogQHRocmVlIC4KCkFuZCB0aGUgZGlzYW1iaWd1YXRpb24gb2YgeWVhcnM6 IEB0d29iaXMgLgoKKiBCaWJsaW9ncmFwaHkKCkN1cnJlbnRseSB0aGUgYmlibGlvZ3JhcGh5IGtl eXdvcmQgZG9lc27igJl0IGNyZWF0ZSBpdHMgb3duIHNlY3Rpb24uCgojK0JJQkxJT0dSQVBIWTog ZG9lc250LW1hdHRlci13aGF0cy1oZXJlCg== --=-=-= Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename=bib.org Content-Transfer-Encoding: base64 KiBXb3JrIG9uZQo6UFJPUEVSVElFUzoKOkJJQl9BVVRIT1I6IFNtaXRoLCBKb2huCjpCSUJfWUVB UjogMjAxNQo6Q1VTVE9NX0lEOiBvbmUKOkJJQl9USVRMRTogV29yayBvbmUKOkJJQl9CVFlQRTog YXJ0aWNsZQo6RU5EOgoKKiBXb3JrIHR3bwo6UFJPUEVSVElFUzoKOkJJQl9BVVRIT1I6IERvZSwg SmFuZQo6QklCX1lFQVI6IDIwMTYKOkNVU1RPTV9JRDogdHdvCjpCSUJfVElUTEU6IFdvcmsgdHdv CjpCSUJfQlRZUEU6IGFydGljbGUKOkVORDoKCiogV29yayB0d28gYmlzCjpQUk9QRVJUSUVTOgo6 QklCX0FVVEhPUjogRG9lLCBKYW5lCjpCSUJfWUVBUjogMjAxNgo6Q1VTVE9NX0lEOiB0d29iaXMK OkJJQl9USVRMRTogV29yayB0d28gYmlzCjpCSUJfQlRZUEU6IGFydGljbGUKOkVORDoKCiogV29y ayB0aHJlZQo6UFJPUEVSVElFUzoKOkJJQl9BVVRIT1I6IERvZSwgQmlsbAo6QklCX1lFQVI6IDIw MTYKOkNVU1RPTV9JRDogdGhyZWUKOkJJQl9USVRMRTogV29yayB0aHJlZQo6QklCX0JUWVBFOiBh cnRpY2xlCjpFTkQ6Cg== --=-=-= Content-Type: text/plain -- Aaron Ecay --=-=-=--