From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: Let's discuss citation and Org syntax Date: Thu, 2 Jan 2014 20:12:34 +0100 Message-ID: References: <878v38cylw.fsf@pank.eu> <87k3eiz0zw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11360b7ca6534604ef019464 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VynhS-0006M2-Cq for emacs-orgmode@gnu.org; Thu, 02 Jan 2014 14:13:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VynhQ-0000vq-1Y for emacs-orgmode@gnu.org; Thu, 02 Jan 2014 14:12:58 -0500 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:37402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VynhP-0000v3-JW for emacs-orgmode@gnu.org; Thu, 02 Jan 2014 14:12:55 -0500 Received: by mail-we0-f178.google.com with SMTP id u57so12677578wes.37 for ; Thu, 02 Jan 2014 11:12:54 -0800 (PST) In-Reply-To: <87k3eiz0zw.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: Eric Schulte Cc: emacs-orgmode list , Rasmus --001a11360b7ca6534604ef019464 Content-Type: text/plain; charset=UTF-8 Great ! Many thanks Eric. I see also that I have to forget gmail in order to definitely adopt gnus ! :) I will be back on the list to say thank you again , to all of you. Best wishes, Jo. 2014/1/2 Eric Schulte > Take a look at ox-bibtex.el in contrib [1], which adds support for > bibtex citations. The commentary at the top of that file explains the > usage, but in brief, ox-bibtex adds cite: links which will export to > HTML, ASCII and LaTeX (using bibtex2html [2] for HTML export, and pandoc > [3] for ASCII export). > > For example, I've used ox-bibtex to write this Org file [4], which > exports to this HTML [5], as well as LaTeX. > > Best, > > Joseph Vidal-Rosset writes: > > > Hi Rasmus, hi the list, > > > > Reading this thread I've understood that the question of html export of > > biblatex citations is still an open problem for org-mode developers, > right > > ? > > > > Thanks to the online manual and the help of the list, I have succeeded to > > write a template of koma-article class which is correctly exported both > in > > latex and in html. But I meet the problem of exporting into html > footnotes > > and references. > > > > At the moment, what is the best i.e. the more convenient solution? > > > > My best wishes for this new year, > > > > Jo. > > > > > > 2013/5/21 Rasmus > > > >> 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! > >> > >> > >> > > > Footnotes: > [1] > http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/lisp/ox-bibtex.el;hb=HEAD > > [2] http://www.lri.fr/~filliatr/bibtex2html/ > > [3] http://johnmacfarlane.net/pandoc/ > > [4] > https://github.com/eschulte/netgear-repair/blob/master/pub/netgear-repair.org > > [5] http://eschulte.github.io/netgear-repair/pub/netgear-repair.html > > -- > Eric Schulte > https://cs.unm.edu/~eschulte > PGP: 0x614CA05D > --001a11360b7ca6534604ef019464 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Great ! Many thanks Eric. =C2=A0I see also that I have to = forget gmail in order to definitely adopt gnus ! :)

I wi= ll be back on the list to say thank you again , to all of you.=C2=A0
<= div>
Best wishes,

Jo.=C2=A0


2014/1/2 Eric Schulte <= span dir=3D"ltr"><schulte.eric@gmail.com>
Take a look at ox-bibtex.el in contrib [1], = which adds support for
bibtex citations. =C2=A0The commentary at the top of that file explains the=
usage, but in brief, ox-bibtex adds cite: links which will export to
HTML, ASCII and LaTeX (using bibtex2html [2] for HTML export, and pandoc [3] for ASCII export).

For example, I've used ox-bibtex to write this Org file [4], which
exports to this HTML [5], as well as LaTeX.

Best,

Joseph Vidal-Rosset <jo= seph.vidal.rosset@gmail.com> writes:

> Hi Rasmus, hi the list,
>
> Reading this thread I've understood that the question of html expo= rt of
> biblatex citations is still an open problem for org-mode developers, r= ight
> ?
>
> Thanks to the online manual and the help of the list, I have succeeded= to
> write a template of koma-article class which is correctly exported bot= h in
> latex and in html. But I meet the problem of exporting =C2=A0into html= footnotes
> and references.
>
> At the moment, what is the best i.e. the more convenient solution?
>
> My best wishes for this new year,
>
> Jo.
>
>
> 2013/5/21 Rasmus <rasmus@gmx.us>
>
>> Hi,
>>
>> Now that 8.0 has shipped let's talk bibliography support. =C2= =A0This
>> follows directly upon the discussion around March[1].
>>
>> The essence of the thread was that some people agreed that it woul= d be
>> nice to have support for citation commands build into Org (I'l= l
>> summarize in the next post). =C2=A0But let me first restate my own= take on
>> the issue. =C2=A0IMO a nice format would be:
>>
>> (*) =C2=A0 [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. =C2=A0Export could be handled by org-BACKEND-KEYWORD or >> org-export-KEYWORD. =C2=A0With officially recognized KEYWORDs some= thing
>> like citation could be a 'first-class citizen'. =C2=A0PROP= ERTIES could be a
>> string like:
>>
>> =C2=A0 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<= br> >> 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.<= br> >>
>> 1. Citation: Take the keyword citetext which should be an 'off= icial'
>> =C2=A0 =C2=A0KEYWORD. =C2=A0So for instance we could have
>>
>> =C2=A0 =C2=A0 =C2=A0[citetext BIBTEX-KEY :prenote note, w/comma :p= ostnote blah].
>>
>> =C2=A0 =C2=A0In buffers, via org-in-buffer-format-citetext, it wou= ld be
>> =C2=A0 =C2=A0displayed as
>>
>> =C2=A0 =C2=A0 =C2=A0BIBTEX-KEY (note, w/comma, YEAR, blah)
>>
>> =C2=A0 =C2=A0or something similar (depending to what extend bibtex= .el would be
>> =C2=A0 =C2=A0leveraged; e.g. BIBTEX-KEY might show the author/edit= or key and
>> =C2=A0 =C2=A0YEAR would also depend on parsing a bibtex file) (obv= iouesly,
>> =C2=A0 =C2=A0there's some reference to a bibtex file somewhere= ). =C2=A0In LaTeX it
>> =C2=A0 =C2=A0would be exported as
>>
>> =C2=A0 =C2=A0 =C2=A0\citetext[note,w/comma][blah]{BIBTEX-KEY}
>>
>> =C2=A0 =C2=A0In html it might utilize some tool that understand bi= btex (there's
>> =C2=A0 =C2=A0a link to such a tool in the next post). =C2=A0In ASC= II it could almost
>> =C2=A0 =C2=A0use what would be displayed in the buffer.
>>
>> 2. MY-FUN: MY-FUN is some function that does something with some >> =C2=A0 =C2=A0properties, perhaps just a string (simple cases: [sc = text] is used
>> =C2=A0 =C2=A0for small caps, or mayhaps [my-treat-dna-string DNA-S= TRING]). =C2=A0I
>> =C2=A0 =C2=A0might use it in a single file that I want to send to = people or I
>> =C2=A0 =C2=A0might just use it in my notes. =C2=A0Currently it'= ;s implemented via
>> =C2=A0 =C2=A0org-emphasis-alist or as a link. =C2=A0Changing empha= ses is a hacks, and
>> =C2=A0 =C2=A0they are hard to export with the now more robust Org = syntax and
>> =C2=A0 =C2=A0further permit little control over how they are displ= ayed
>> =C2=A0 =C2=A0in-buffer. =C2=A0Links are more flexible but lacks di= splay control and
>> =C2=A0 =C2=A0becomes somewhat painful with many arguments[2]. =C2= =A0Also, MY-FUN
>> =C2=A0 =C2=A0doesn't take a 'description'. =C2=A0With = (*) I could simply write
>>
>> =C2=A0 =C2=A0 =C2=A0[MY-FUN PROPERTIES].
>>
>> =C2=A0 =C2=A0Perhaps, I could even define org-BACKEND-MY-FUN in a = babel block
>> =C2=A0 =C2=A0if it's only relevant to the current file.
>>
>> There's been some work and some discussion on this already, mo= st
>> 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
>>
>> =C2=A0 [[textcite:bibtex-key&&pre%3Dfoo&&post%3Dba= r][whatever]]
>>
>> where whatever is ignored. =C2=A0The state of the discussion is to= some
>> extend summarized in the next post.
>>
>> It would love to hear whether other people find something like thi= s to
>> be a good idea? =C2=A0Would anyone find a use such a framework? = =C2=A0Would (*)
>> conflict with anyone's current usage of Org? =C2=A0Is (*) too = ambitious and
>> in terms of getting citation support? =C2=A0Is this is taking a mu= sket to
>> kill a butterfly? =C2=A0What are the the flaws in the above.
>>
>> I'm not a good (lisp) programmer, but I think I have a month o= ff 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<= br> >> and here http://mid.gmane.org/87wqthk7vj.fsf%40gmail.com. >>
>>
>> --
>> When in doubt, do it!
>>
>>
>>


Footnotes:
[1] =C2=A0http://orgmode.o= rg/w/?p=3Dorg-mode.git;a=3Dblob_plain;f=3Dcontrib/lisp/ox-bibtex.el;hb=3DHE= AD

[2] =C2=A0http://www.lri.fr/~filliatr/bibtex2html/

[3] =C2=A0h= ttp://johnmacfarlane.net/pandoc/

[4] =C2=A0https://github.com/eschulte/netg= ear-repair/blob/master/pub/netgear-repair.org

[5] =C2=A0http://eschulte.github.io/netgear-repair/pub/= netgear-repair.html

--
Eric Schulte
https://cs.unm.e= du/~eschulte
PGP: 0x614CA05D

--001a11360b7ca6534604ef019464--