all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Let's discuss citation and Org syntax
@ 2013-05-21 12:21 Rasmus
  2013-05-21 12:25 ` Rasmus
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Rasmus @ 2013-05-21 12:21 UTC (permalink / raw)
  To: emacs-orgmode

Hi, 

Now that 8.0 has shipped let's talk bibliography support.  This
follows directly upon the discussion around March[1].

The essence of the thread was that some people agreed that it would be
nice to have support for citation commands build into Org (I'll
summarize in the next post).  But let me first restate my own take on
the issue.  IMO a nice format would be:

(*)   [KEYWORD PROPERTIES]

I think we should allow for a more general approach than one just for
citation and this is a good thing (IMO).

The in-buffer display of (*) could be governed by
org-buffer-format-KEYWORD (similar to
gnus-user-format-function-LETTER) or just identity if no function is
defined.  Export could be handled by org-BACKEND-KEYWORD or
org-export-KEYWORD.  With officially recognized KEYWORDs something
like citation could be a 'first-class citizen'.  PROPERTIES could be a
string like:

  optional-keyless-entry :prop1 one :prop2 two ... 

Perhaps, treatment of keyword, could even be handled by an
in-buffer Org Babel function in the spirit of e.g. reproducible
research (see below).

This would be different from Org links in that (*) is more like a
functions that allows for (i) pretty and informative display in
buffer/export and (ii) easy user extension.

I think there are many compelling use-cases for such a framework.

1. Citation: Take the keyword citetext which should be an 'official'
   KEYWORD.  So for instance we could have

     [citetext BIBTEX-KEY :prenote note, w/comma :postnote blah].

   In buffers, via org-in-buffer-format-citetext, it would be
   displayed as
   
     BIBTEX-KEY (note, w/comma, YEAR, blah)
   
   or something similar (depending to what extend bibtex.el would be
   leveraged; e.g. BIBTEX-KEY might show the author/editor key and
   YEAR would also depend on parsing a bibtex file) (obviouesly,
   there's some reference to a bibtex file somewhere).  In LaTeX it
   would be exported as
   
     \citetext[note,w/comma][blah]{BIBTEX-KEY}
   
   In html it might utilize some tool that understand bibtex (there's
   a link to such a tool in the next post).  In ASCII it could almost
   use what would be displayed in the buffer.

2. MY-FUN: MY-FUN is some function that does something with some
   properties, perhaps just a string (simple cases: [sc text] is used
   for small caps, or mayhaps [my-treat-dna-string DNA-STRING]).  I
   might use it in a single file that I want to send to people or I
   might just use it in my notes.  Currently it's implemented via
   org-emphasis-alist or as a link.  Changing emphases is a hacks, and
   they are hard to export with the now more robust Org syntax and
   further permit little control over how they are displayed
   in-buffer.  Links are more flexible but lacks display control and
   becomes somewhat painful with many arguments[2].  Also, MY-FUN
   doesn't take a 'description'.  With (*) I could simply write
   
     [MY-FUN PROPERTIES].
   
   Perhaps, I could even define org-BACKEND-MY-FUN in a babel block
   if it's only relevant to the current file.

There's been some work and some discussion on this already, most
notably Aaron already supplied some patches towards this end[3],
but using a slightly different syntax more like the link syntax;
e.g. textcite above would look like

  [[textcite:bibtex-key&&pre%3Dfoo&&post%3Dbar][whatever]]

where whatever is ignored.  The state of the discussion is to some
extend summarized in the next post.
  
It would love to hear whether other people find something like this to
be a good idea?  Would anyone find a use such a framework?  Would (*)
conflict with anyone's current usage of Org?  Is (*) too ambitious and
in terms of getting citation support?  Is this is taking a musket to
kill a butterfly?  What are the the flaws in the above.

I'm not a good (lisp) programmer, but I think I have a month off this
summer where I could work on something like the above.

Thanks for reading,
Rasmus

Footnotes: 
[1] http://mid.gmane.org/20130303070635.GA12112%40panahar
[2] my citation links often look like postnote;prenote without
showing the BIBTEX-KEY or citation format.
[2] here http://mid.gmane.org/87lia0s7wi.fsf%40bzg.ath.cx
and here http://mid.gmane.org/87wqthk7vj.fsf%40gmail.com.


-- 
When in doubt, do it!

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2014-01-08 12:53 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-21 12:21 Let's discuss citation and Org syntax Rasmus
2013-05-21 12:25 ` Rasmus
2013-05-22  9:02   ` Christian Moe
2013-05-22 16:23     ` Matt Price
2013-05-23  8:05       ` Christian Moe
2013-05-26 14:23         ` Darlan Cavalcante Moreira
2013-05-26 19:12           ` Christian Moe
2013-06-27  6:17           ` Christian Wittern
2013-05-21 17:55 ` Viktor Rosenfeld
2013-05-21 18:18   ` Rasmus
2013-05-21 21:34   ` Marcin Borkowski
2013-05-22 21:53     ` Matt Lundin
2013-05-22  5:36   ` Erik Hetzner
2013-05-22  3:51 ` Christian Wittern
2014-01-02  8:08 ` Joseph Vidal-Rosset
2014-01-02 15:51   ` Rüdiger Sonderfeld
2014-01-02 18:33   ` Eric Schulte
2014-01-02 19:12     ` Joseph Vidal-Rosset
2014-01-03 18:32       ` Joseph Vidal-Rosset
2014-01-03 19:13         ` John Hendy
2014-01-03 20:27           ` Joseph Vidal-Rosset
2014-01-03 21:56             ` John Hendy
2014-01-04 10:17               ` Joseph Vidal-Rosset
2014-01-04 14:52                 ` John Hendy
2014-01-03 21:15           ` Joseph Vidal-Rosset
     [not found]             ` <87fvoy4r1l.fsf@ucl.ac.uk>
2014-01-08 12:53               ` Joseph Vidal-Rosset

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.