From mboxrd@z Thu Jan 1 00:00:00 1970 From: aaronecay@gmail.com Subject: Re: org-exp-bibtex missing in git? Date: Fri, 08 Mar 2013 14:32:35 -0500 Message-ID: <87txolk7qk.fsf@gmail.com> References: <20130303070635.GA12112@panahar> <87fw0cg42y.fsf@allisson.co> <87vc98be83.fsf@bzg.ath.cx> <87ehfwwgdd.fsf@gmail.com> <87ppzg2r05.fsf@med.uni-goettingen.de> <87ppzgusem.fsf@gmail.com> <87ppzcfy2e.fsf@med.uni-goettingen.de> <87lia0s7wi.fsf@bzg.ath.cx> <876213lqfk.fsf@gmail.com> <87wqtjo6h6.fsf@bzg.ath.cx> <87boavcpzc.fsf@gmail.com> <87fw075ivl.fsf@bzg.ath.cx> <87ppzbcdnt.fsf@Rainer.invalid> <871ubq50gq.fsf@bzg.ath.cx> <87sj46bzgx.fsf@Rainer.invalid> <87k3pikchy.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE322-0007zn-IR for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 14:32:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UE31x-0005Aa-3T for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 14:32:42 -0500 Received: from mail-qe0-f41.google.com ([209.85.128.41]:42588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE31w-0005AR-VW for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 14:32:37 -0500 Received: by mail-qe0-f41.google.com with SMTP id 6so1242667qeb.0 for ; Fri, 08 Mar 2013 11:32:36 -0800 (PST) In-Reply-To: <87k3pikchy.fsf@pank.eu> 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 Pank Roulund Cc: emacs-orgmode@gnu.org Hi Rasmus, 2013ko martxoak 7an, Rasmus Pank Roulund-ek idatzi zuen: >=20 > In my book it would seem 'natural' to strive towards the following: >=20 > 1. It should be Bibtex-based. I.e. Bibtex should be the 'database' > or storage for citation information. It may be stored in > Org-Bibtex-whatever, but Bibtex should be the natural base. > 2. Citation selection should be possible via Reftex. In principle this is true, but I think RefTeX is deeply intertwined with the assumption that it is running in a LaTeX buffer. Going through its code and making it major-mode-agnostic is a worthy project all of its own. But it might take less effort and be more long-run maintainable to just wire up the bibtex.el bundled with emacs, CompletionUI (http://www.emacswiki.org/CompletionUI) and YAsnippet (http://emacswiki.org/emacs/Yasnippet). > 3. It should look nice in the buffer. For instance, with the > current link hacks I am shown the pre or post notes in place of > the citation. Ideally, it should be able to specify a > reftex-cite-format string on how to display stuff in the buffer. > Notes should be viewable in an non-disturbing way. > Ideally, I would want to see something like: > (POSTFIX, Jensen, 1906, SUFFIX) > or > Jensen (POSTFIX, 1906, SUFFIX) > (If my memory serves me correctly this is how BibLatex places > notes). One could do this with font-lock and the new citation syntax I proposed in my other email. We would need two alists. One would pair citation lookup types with functions to resolve them to a location, and to get their properties. The other would pair display types with two functions: one to return a format string that would be displayed by font-lock instead of the citation markup, and one to return the code to export the citation. So, a citation like [cite:doi:parens:some-doi:key=3Dval&key2=3Dval2] would = be displayed by: 1. call (org-lookup-cite-doi "some-doi") -> (:author "Foo" :title "bar" ...) 2. call (org-display-cite-parens '(:author "Foo" :title "bar" ...)) -> "(Foo 2000)" 3. (font-lock puts an overlay over the citation markup, with the returned string) If you click on the citation, org would open the location (URL or local file) returned by (org-resolve-cite-doi "some-doi") A citation could exported by calling (org-export-cite-parens 'doi "some-doi" (:author "foo" :title "bar") current-backend). This function could just return \parencite{foo} if exporting to latex and the citation was already in a bibtex file. But it could also just return =E2=80=9CFoo 2= 000=E2=80=9D as a static string for dumb backends like ASCII, or write the information to a temporary bibtex file (so that latex can atomatically use the bibliographic info looked up from a DOI citation). In any event, this is a big, complicated project. Step zero for me (and many people, I guess) is to get a slightly less hackish way to export Bibtex-based citations to latex, and the other pieces can be built on top of that. --=20 Aaron Ecay