From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: contributing to work on citations Date: Wed, 4 Nov 2015 17:25:41 -0500 Message-ID: References: <87si4lvlm8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11343daa9ca66a0523be7d49 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu6Uz-00007t-FM for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 17:25:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zu6Ux-0006LH-0u for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 17:25:45 -0500 Received: from mail-ig0-x236.google.com ([2607:f8b0:4001:c05::236]:35081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu6Uw-0006L9-Pc for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 17:25:42 -0500 Received: by igpw7 with SMTP id w7so116478153igp.0 for ; Wed, 04 Nov 2015 14:25:41 -0800 (PST) In-Reply-To: <87si4lvlm8.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: Matt Price , Org Mode --001a11343daa9ca66a0523be7d49 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Nov 4, 2015 at 10:18 AM, Aaron Ecay wrote: > Hi Matt, > > Thanks for your willingness to help with the project. > > 2015ko urriak 30an, Matt Price-ek idatzi zuen: > > > > So, from the "some projects" thread I have the sense there is a group o= f > > users with some interest in improving citation support. What is the bes= t > > way to kickstart that process? it seems to me that, at a minimum, the > > following is needed: > > > > 1. Finalization of the citation syntax. > > > > IIUC, This involves refining and merging the work in the wip-cite git > > branch. > > There was a very voluminous discussion on this last time. Lots of > people proposed various additions. I=E2=80=99d be inclined to go with wh= atever > syntax is implemented currently, and let any needed extensions sort > themselves out through real-world testing. > OK, great. Does this mean just checking out the org-wip-cite branch? Or has someone perhaps merged more recent changes into wip-cite somewhere else? > > > > > 2. Choice of a citation creation tool > > > > IIUC, the two main candidates are pandoc-citeproc and citeproc-js/node. > > Pandoc-citeproc works well but requires users to install the whole pand= oc > > infrastructure, and needs to be wrapped in a thin tool for use with org= . > > Citeproc-node has fewer dependencies (I guess), but needs to be updated > to > > support additional output formats (e.g. latex, odt, and org) and is a > > little more elaborate to run from the command line (runs as a service, > can > > only be communicated with over http). > > IIUC, citeproc-node just wraps citeproc-js, which has a =E2=80=9Cnormal= =E2=80=9D API. > So it should be possible to write a CLI wrapper for citeproc-js. (But I > have not studied citeproc-js at all, so I could be wrong). > I am not sure but I don't think it's trivial; and alas i am slow at eveyr kind of coding, but I will certainly look into this. > > My plan is to create preliminary citation support based on Richard=E2=80= =99s > haskell tool, with the intention of moving to a JS-based tool when > possible. So implementing a work-alike of Richard=E2=80=99s tool in JS w= ould be > a good development. > > OK, I'll pay more attention to Richard's tool and how it works, with the goal of making something like a drop-in replacement. > > > > 3. Handling of citation links in the various export engines > > Functions must be written to handle citations in, at minimum, latex, > html, > > and org > > > > 4. Interface with backends > > Org should be able to talk to bibtex and zotero databases, at least (an= d > > maybe more). > > The code I wrote should have enough hooks to enable this. But I haven=E2= =80=99t > looked at zotero at all. If zotero support is important to you, you > could investigate the =E2=80=9Clookup types=E2=80=9D in the citation code= I wrote, see > if they are adequate, and try to use them to implement zotero lookup. > From the docstring: > > "Types of citation lookup backends. > > Alist from type to list of: > > - Function called at the beginning of export, with the rest of > the keyword line after #+BIBDB: type, and the info plist. > Should cache whatever it needs in the info plist. > > - Function to lookup a citation. Called with the key and the > info plist. Will be memoized by > `org-export-cite--lookup' (TODO). Should return an alist of > keys and values about the citation (author, year, title, etc.) > > - A boolean; non-nil =3D this lookup type is remote. All local > lookups will be tried before any remote one is. > TODO: not yet implemented" > > I'll start here. Thanks for the pointer. > > > > A lot of this work has already been done. Richard has written > org-citeproc > > as a wrapper for pandoc-citeproc https://github.com/wyleyr/org-citeproc > . > > Aaron has written some functions for org-citeproc in the wip-cite-awe > > branch. Nicolas has developed the syntax in wip-cite. I even have a for= k > of > > citeproc-node that could be used to develop the missing features we nee= d. > > And of course John has org-ref ( > > > http://kitchingroup.cheme.cmu.edu/blog/2014/05/13/Using-org-ref-for-citat= ions-and-references/ > ) > > The org-ref features provide a good aspirational horizon for us, I think. > I.e. org=E2=80=99s core should aim to support almost all of them eventual= ly. But > the support for citation syntax is not so far along that creating such > support is an immediate prospect. > > > while Erik H has zotxt-emacs for Zotero integration ( > > https://github.com/egh/zotxt-emacs). > > > > What would be the best next move? It seems to me there are enough movin= g > > parts that the process will be quite a bit easier if we co-ordinate. > > Based on the interests you=E2=80=99ve expressed, I think working on the J= S > citation processor and/or zotero integration would be good contributions > you can make. But you can work on other things as well. I think the > best way to coordinate will be to keep the list apprised of your > progress. If you have push access, you can push WIP code as branches in > the org-mode repository. (Otherwise, you can use github or some other > git host, or ask for push access.) > > OK, will do. I think it would be great if you, Nicolas, Richard, and Erik H if he's still interested, could also keep the rest of us up to date with your efforts -- in all likelihood you will be moving faster than me (though I can speak for Will, Bill and John). I'll try to stay current with what you're doing and make what contributtions I can. thanks Aaron! > Thanks again, > > -- > Aaron Ecay > --001a11343daa9ca66a0523be7d49 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Nov 4, 2015 at 10:18 AM, Aaron Ecay <aaronecay@gmail.com= > wrote:
Hi Matt,

Thanks for your willingness to help with the project.

2015ko urriak 30an, Matt Price-ek idatzi zuen:
>
> So, from the "some projects" thread I have the sense there i= s a group of
> users with some interest in improving citation support. What is the be= st
> way to kickstart that process? it seems to me that, at a minimum, the<= br> > following is needed:
>
> 1. Finalization of the citation syntax.
>
> IIUC, This involves refining and merging the work in the wip-cite git<= br> > branch.

There was a very voluminous discussion on this last time.=C2=A0 Lots= of
people proposed various additions.=C2=A0 I=E2=80=99d be inclined to go with= whatever
syntax is implemented currently, and let any needed extensions sort
themselves out through real-world testing.

<= div>OK, great.=C2=A0 Does this mean just checking out the org-wip-cite bran= ch? Or has someone perhaps merged more recent changes into wip-cite somewhe= re else?=C2=A0

>
> 2. Choice of a citation creation tool
>
> IIUC, the two main candidates are pandoc-citeproc and citeproc-js/node= .
> Pandoc-citeproc works well but requires users to install the whole pan= doc
> infrastructure, and needs to be wrapped in a thin tool for use with or= g.
> Citeproc-node has fewer dependencies (I guess), but needs to be update= d to
> support additional output formats (e.g. latex, odt, and org) and is a<= br> > little more elaborate to run from the command line (runs as a service,= can
> only be communicated with over http).

IIUC, citeproc-node just wraps citeproc-js, which has a =E2=80=9Cnor= mal=E2=80=9D API.
So it should be possible to write a CLI wrapper for citeproc-js.=C2=A0 (But= I
have not studied citeproc-js at all, so I could be wrong).
=

I am not sure but I don't think it's trivial; a= nd alas i am slow at eveyr kind of coding, but I will certainly look into t= his.=C2=A0

My plan is to create preliminary citation support based on Richard=E2=80=99= s
haskell tool, with the intention of moving to a JS-based tool when
possible.=C2=A0 So implementing a work-alike of Richard=E2=80=99s tool in J= S would be
a good development.


OK, I'll p= ay more attention to Richard's tool and how it works, with the goal of = making something like a drop-in replacement. =C2=A0
>
> 3. Handling of citation links in the various export engines
> Functions must be written to handle citations in, at minimum, latex, h= tml,
> and org
>
> 4. Interface with backends
> Org should be able to talk to bibtex and zotero databases, at least (a= nd
> maybe more).

The code I wrote should have enough hooks to enable this.=C2=A0 But = I haven=E2=80=99t
looked at zotero at all.=C2=A0 If zotero support is important to you, you could investigate the =E2=80=9Clookup types=E2=80=9D in the citation code I= wrote, see
if they are adequate, and try to use them to implement zotero lookup.
>From the docstring:

"Types of citation lookup backends.

Alist from type to list of:

- Function called at the beginning of export, with the rest of
=C2=A0 the keyword line after #+BIBDB: type, and the info plist.
=C2=A0 Should cache whatever it needs in the info plist.

- Function to lookup a citation.=C2=A0 Called with the key and the
=C2=A0 info plist.=C2=A0 Will be memoized by
=C2=A0 `org-export-cite--lookup' (TODO).=C2=A0 Should return an alist o= f
=C2=A0 keys and values about the citation (author, year, title, etc.)

- A boolean; non-nil =3D this lookup type is remote.=C2=A0 All local
=C2=A0 lookups will be tried before any remote one is.
=C2=A0 TODO: not yet implemented"


I'll start= here.=C2=A0 Thanks for the pointer.=C2=A0
=C2=A0
>
> A lot of this work has already been done. Richard has written org-cite= proc
> as a wrapper for pandoc-citeproc https://github.com/wyley= r/org-citeproc .
> Aaron has written some functions for org-citeproc in the wip-cite-awe<= br> > branch. Nicolas has developed the syntax in wip-cite. I even have a fo= rk of
> citeproc-node that could be used to develop the missing features we ne= ed.
> And of course John has org-ref (
> ht= tp://kitchingroup.cheme.cmu.edu/blog/2014/05/13/Using-org-ref-for-citations= -and-references/)

The org-ref features provide a good aspirational horizon for us, I t= hink.
I.e. org=E2=80=99s core should aim to support almost all of them eventually= .=C2=A0 But
the support for citation syntax is not so far along that creating such
support is an immediate prospect.

> while Erik H has zotxt-emacs for Zotero integration (
> https://github.com/egh/zotxt-emacs).
>
> What would be the best next move? It seems to me there are enough movi= ng
> parts that the process will be quite a bit easier if we co-ordinate.
Based on the interests you=E2=80=99ve expressed, I think working on = the JS
citation processor and/or zotero integration would be good contributions you can make.=C2=A0 But you can work on other things as well.=C2=A0 I think= the
best way to coordinate will be to keep the list apprised of your
progress.=C2=A0 If you have push access, you can push WIP code as branches = in
the org-mode repository.=C2=A0 (Otherwise, you can use github or some other=
git host, or ask for push access.)


OK, will do. I think it would be great= if you, Nicolas, Richard, and Erik H if he's still interested, could a= lso keep the rest of us up to date with your efforts -- in all likelihood y= ou will be moving faster than me (though I can speak for Will, Bill and Joh= n).=C2=A0 I'll try to stay current with what you're doing and make = what contributtions I can.=C2=A0 thanks Aaron!
=C2=A0
Thanks again,

--
Aaron Ecay

--001a11343daa9ca66a0523be7d49--