emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: aaronecay@gmail.com
To: Rasmus Pank Roulund <rasmus@pank.eu>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-exp-bibtex missing in git?
Date: Fri, 08 Mar 2013 14:32:35 -0500	[thread overview]
Message-ID: <87txolk7qk.fsf@gmail.com> (raw)
In-Reply-To: <87k3pikchy.fsf@pank.eu>

Hi Rasmus,

2013ko martxoak 7an, Rasmus Pank Roulund-ek idatzi zuen:
> 
> In my book it would seem 'natural' to strive towards the following:
> 
>   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=val&key2=val2] 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 “Foo 2000”
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.

-- 
Aaron Ecay

  parent reply	other threads:[~2013-03-08 19:32 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-03  7:06 org-exp-bibtex missing in git? Vikas Rawal
2013-03-03 10:39 ` François Allisson
2013-03-03 17:11   ` Bastien
2013-03-03 17:19     ` Nicolas Goaziou
2013-03-03 20:00       ` Andreas Leha
2013-03-03 20:42         ` Nicolas Goaziou
2013-03-04  9:29           ` Eric S Fraga
2013-03-06 13:38           ` Andreas Leha
2013-03-06 18:25             ` Bastien
2013-03-06 18:39               ` Nicolas Goaziou
2013-03-06 21:16                 ` Andreas Leha
2013-03-06 22:55                 ` Bastien
2013-03-06 23:37                   ` Andreas Leha
2013-03-07  8:32                     ` Bastien
2013-03-07  8:44                       ` Andreas Leha
2013-03-07  5:38               ` aaronecay
2013-03-07  8:54                 ` Eric S Fraga
2013-03-07 10:21                 ` Bastien
2013-03-07 11:04                   ` Aaron Ecay
2013-03-07 11:16                     ` Bastien
2013-03-07 12:03                       ` Aaron Ecay
2013-03-07 13:13                   ` Nicolas Goaziou
2013-03-07 15:28                     ` Bastien
2013-03-07 17:39                       ` Achim Gratz
2013-03-07 22:06                         ` Bastien
2013-03-07 22:46                           ` Achim Gratz
2013-03-07 23:37                             ` Rasmus Pank Roulund
2013-03-07 23:43                               ` Rasmus
2013-03-08  0:10                                 ` Thomas S. Dye
2013-03-08  9:27                                   ` Rasmus
2013-03-08 17:36                                     ` Thomas S. Dye
2013-03-08 19:32                               ` aaronecay [this message]
2013-03-08 19:40                                 ` Rasmus
2013-03-08 19:29                       ` aaronecay
2013-03-09  9:28                         ` Bastien
2013-03-19  5:02                           ` Aaron Ecay
2013-04-18 10:58                             ` Bastien
2013-03-09 15:15                         ` Nicolas Goaziou
2013-03-09 16:04                           ` Jambunathan K
2013-03-09 16:12                             ` Jambunathan K
2013-03-09 17:08                             ` Thomas S. Dye
2013-03-07 10:04             ` Jambunathan K
2013-03-11 13:34               ` Andreas Leha
2013-03-04  4:40   ` Vikas Rawal
2013-03-04 13:55     ` Suvayu Ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87txolk7qk.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@pank.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).