emacs-orgmode@gnu.org archives
 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

* Re: Let's discuss citation and Org syntax
  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-21 17:55 ` Viktor Rosenfeld
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 26+ messages in thread
From: Rasmus @ 2013-05-21 12:25 UTC (permalink / raw)
  To: emacs-orgmode

A lot of people more clever than me have thought about this topic.
Here I'll just summarize the "org-exp-bibtex missing in
git?"-thread.  The ordering more or less follows how it was
displayed in my Gnus.  I've tried to "stay honest" to the people
I've quoted and hopefully I've not failed too badly.  Also, I hope
I've not forgotten valuable suggestions.  I've not quoted Thomas,
but he gave some insights of what one would want in citation here
http://mid.gmane.org/m1a9qczekf.fsf%40tsdye.com.
   

There were approximately three types of suggestions:
1. the new-type approach, which I've tried to generalize more
   above.  Aaron made valueable suggestions here.  Nicolas gave it
   some support.
2. The extending link approach, notably Bastien, Andreas and Aaron
   even supplied patches!
I've also included some quick references to the "current frontier"
using links.  Lastly, there's some links to implementation in other
formats.

The "new-type" approach
   - Nicolas: 
     #+BEGIN_QUOTE
     It would be good to integrate citations in export framework
     [...]
     Maybe something like [cite:....]. org-element could parse this, and
     ox.el provide some tools to access data. Then each back-end could deal
     with them.
     [...]
     I favor [cite:PROPERTIES] over [[cite:PROPERTIES]], because the latter
     (link syntax) implies a (optional) description part. I don't think
     a description is ever meaningful in citations.
     #+END_QUOTE
     Ref: http://mid.gmane.org/87ehfwwgdd.fsf%40gmail.com and
     http://mid.gmane.org/874ngkzjt6.fsf%40gmail.com

   - Much of my discussion in the previoues post is similar to Aaron's
     response to my original post
     #+BEGIN_QUOTE
     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).
     #+END_QUOTE
     Ref: http://mid.gmane.org/87txolk7qk.fsf%40gmail.com


    - Jamuthan's take on viewing citation as footnotes
     #+BEGIN_QUOTE
     I view Citations as closer to Footnotes.  The syntax should parallels
     footnotes syntax.
     
     1. PROPERTIES should be opaque to Org.  It is a key or a list of
        keys possibly bibtex but Org doesn't take stand on how it
        looks like.
   
     2. There will be a org-BACKEND-citation-reference.
     3. There will be a org-BACKEND-bibliography.
   
     2, 3 more likely with interface with respective citation processor
     (citation processor as opposed to a database) via CLI.  Citation
     processor could be whatever org-exp-bibtex interfaces with right now.  I
     also have some proof-of-concept - see zotcite - for zotero.
   
     2, 3 will parallel footnote-reference and footnote-section callbacks in
     HTML backend.
   
     4. Footnotes can be introduced with either fn: prefix or cite:
        prefix.  There should be a way to put fn: and cite: in same
        enumeration context.  There should be a way to put fn: and
        cite: in different enumeration context.  The former case could
        be a degenerate mode where Org can transcode what is seen in
        the buffer where everything is footnotes.  The latter case
        will result in Citations and Bibliography being generated by
        the above backend transcoders.
       
     5. Citation definitions in Org buffer will be *ignored*.  (It
        could be considered when the exporter works in a degenerate
        footnote only mode where plain text transcoding is resorted to
        because there is no suitable application available for the
        backend format.)  Plain text citation definitions are only to
        help the author have a glimpse of what he is doing, it has
        only UI-value but no contents value.
   
     6. There may be an advisory citation style - say APA, Chicago
        etc - which the backends may honor or ignore.
      #+END_QUOTE


The "extend-link" suggestions:

   - Andreas Leha suggest something like what I suggested above, but
     extending upon the link syntax.  What I agree strongly with is:

       citations are more than links but also include information on
       formatting
     
     I.e. (in my words): cite alone doesn't cut it. 

     Here's Eric/Andreas' suggestion for a syntax:
     #+BEGIN_QUOTE
       \footfullcite[prenote][postnote]{key}
       
       Eric suggested/uses this format (thanks for sharing, Eric):
         [[cite:jones-etal-2000][Jones et al., 2000]]
                ^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^
                    key           displayed in org
       
       So, a possible extension of that could, for instance,
       use a third pair of [] as in
         [[cite:jones-etal-2000][Jones et al., 2000][[citationcommand][prenote][postnote]]]
                ^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^
                key           displayed in org
     #+END_QUOTE
     
     Reference:  http://mid.gmane.org/87ppzcfy2e.fsf%40med.uni-goettingen.de
   - Bastien suggests leveraging on links 
     #+BEGIN_QUOTE
       1. Allow more syntax for #+LINK:
       
          ,#+LINK: bib;%s;%s file:my.bib::%s org-bib-follow-link org-bib-export-link
       
       If `org-bib-follow-link' is nil, it'll follow [[bib:my.bib::key][key]]
       like it does right now, jumping to the "key" line in the my.bib file.
       
       If `org-bib-follow-link' is non-nil, it will operate on
       [[bib:my.bib::key;prenote;postnote][key]] and find the correct key.
       
       If `org-bib-export-link' is non-nil, it will operate on
       [[bib:my.bib::key;prenote;postnote][key]] and export it correctly
       depending on the backend.
       
       [...]
       
       I see two advantages:
       
       - adding new types will be easier -- e.g.:
         ,#+LINK: cite file:my.bib::%s org-bib-follow-link org-bib-export-link
       
       - users can decide what syntactic glue they want to their abbreviated
         links (using ";" or another separator).
       
       [...]
       
       See for example this new link type (or "protocol"):
       
       ,#+LINK: with-title::%s http://orgmode.org/worg/doc.html# nil org-html-link-with-title
       
         [[with-title::org-mode::A link title][org-mode]]
       
       org-html-link-with-title would then take care of exporting this
       as a link like <a href="..." title="A link title">org-mode</a>.
       
       There are really two changes here:
       
       1. extending #+LINK so that the third and fourth strings are
          recognized as follow and export functions
       
       2. extending #+LINK so that a formatting string in the link
          abbreviation name is handle later on by those functions.

     [...]	  
     In general, the idea is just to be able to hook an export
     function to a link after it has been expanded, and maybe 
     this can be useful beyond this use-case.  For example:

     #+LINK: local file://%s org-odt-local-link
     #+LINK: local file://%s org-odt-global-link
     #+END_QUOTE
     this suggestion is from
     http://mid.gmane.org/87wqtjo6h6.fsf%40bzg.ath.cx and extends upon
     http://mid.gmane.org/87lia0s7wi.fsf%40bzg.ath.cx.  Also
     http://mid.gmane.org/876213laso.fsf%40bzg.ath.cx. And finally
     http://mid.gmane.org/871ubrr4ou.fsf%40bzg.ath.cx.

   - Aaron supplied patches as mention in the post above, and
     suggests the syntax
     #+BEGIN_SRC org
       [[type:key;pre;post][desc]]
       or
       [[type:address;key1=value1,key2=value2][description]]
     #+END_SRC
     His patches are just for citation and only for LaTeX but they
     are there right now(!).  They are quite substational posts and
     I didn't find a good way to quote it here.  In addition to the
     two links in the post above also check out
     http://mid.gmane.org/CAFcZrT2mG0tFZRTrx5tKhm2SURHte-fCnDa+PyGCZhWwTQwxNA%40mail.gmail.com


The current "frontier": 
   - was summarized by Eric F,
     #+BEGIN_QUOTE
     I have the following defined in my org customisation:
      
     #+begin_src org
       (org-add-link-type "cite" 'ebib
                          (lambda (path desc format)
                            (cond
                             ((eq format 'latex)
                             (format "\\cite{%s}" path)))))
                              
     #+end_src
     which allows me to insert links like
     [[cite:jones-etal-2000][Jones et al., 2000]]
     #+END_QUOTE
     this is also on the Worg LaTeX page (it's what I use currently,
     but much more extensively).
     
     Here's a link for how I use Reftex:
     http://mid.gmane.org/878v5xhe8w.fsf%40pank.eu.

   - I pointed out that for citation we should use Reftex but as
     Aaron pointed out it might be too convoluted for use non-tex
     buffers and he suggests bibtex.el instead.  However, Reftex has
     a very nice interface and ships with Emacs which is a plus.  In
     my current setup I insert org citation links with Reftex.
     


Other implementations: 
  1. for html (pointed out by Aaron):
     https://bitbucket.org/fbennett/citeproc-js/wiki/Home
  2. citation in R-Markdown/Knitr-Markdown:
     https://github.com/cboettig/knitcitations
  3. Citation in Wordpress: http://wordpress.org/extend/plugins/kcite/

-- 
El Rey ha muerto. ¡Larga vida al Rey!

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

* Re: Let's discuss citation and Org syntax
  2013-05-21 12:21 Let's discuss citation and Org syntax Rasmus
  2013-05-21 12:25 ` Rasmus
@ 2013-05-21 17:55 ` Viktor Rosenfeld
  2013-05-21 18:18   ` Rasmus
                     ` (2 more replies)
  2013-05-22  3:51 ` Christian Wittern
  2014-01-02  8:08 ` Joseph Vidal-Rosset
  3 siblings, 3 replies; 26+ messages in thread
From: Viktor Rosenfeld @ 2013-05-21 17:55 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Hi,

Rasmus wrote:

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

I did not follow the discussion in March and only skimmed through the
recent discussion in May [2]. But I was wondering if bibliography
support in the LaTeX exporter would be BibTex-only or if it would also
support biblatex, for example.

Cheers,
Viktor

[1] http://mid.gmane.org/20130303070635.GA12112%40panahar
[2] http://thread.gmane.org/gmane.emacs.orgmode/71754

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

* Re: Let's discuss citation and Org syntax
  2013-05-21 17:55 ` Viktor Rosenfeld
@ 2013-05-21 18:18   ` Rasmus
  2013-05-21 21:34   ` Marcin Borkowski
  2013-05-22  5:36   ` Erik Hetzner
  2 siblings, 0 replies; 26+ messages in thread
From: Rasmus @ 2013-05-21 18:18 UTC (permalink / raw)
  To: emacs-orgmode

Viktor Rosenfeld <listuser36@gmail.com> writes:

>> Now that 8.0 has shipped let's talk bibliography support.  This
>> follows directly upon the discussion around March[1].
>
> I did not follow the discussion in March 

I tried to summarize it the second post since the thread was very
long.

> But I was wondering if bibliography support in the LaTeX exporter
> would be BibTex-only or if it would also support biblatex, for
> example.

Currently, you can use both through the link syntax, but it's not so
nice if you use prenote and postnotes.

I solely use biber + biblatex these days.

–Rasmus

-- 
This space left intentionally blank

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

* Re: Let's discuss citation and Org syntax
  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
  2 siblings, 1 reply; 26+ messages in thread
From: Marcin Borkowski @ 2013-05-21 21:34 UTC (permalink / raw)
  To: emacs-orgmode

Dnia 2013-05-21, o godz. 19:55:53
Viktor Rosenfeld <listuser36@gmail.com> napisał(a):

> Hi,
> 
> Rasmus wrote:
> 
> > Hi, 
> > 
> > Now that 8.0 has shipped let's talk bibliography support.  This
> > follows directly upon the discussion around March[1].
> 
> I did not follow the discussion in March and only skimmed through the
> recent discussion in May [2]. But I was wondering if bibliography
> support in the LaTeX exporter would be BibTex-only or if it would also
> support biblatex, for example.

Good point.

I do not use Org-mode for authoring (I'm quite happy with LaTeX itself
for that), and in LaTeX, I use neither bibtex nor biblatex; but AFAIK,
bibtex is basically dead like John Cleese's parrot.  I don't even think
that it needs to or should be supported; the faster bibtex usage fades
away, the better.

What I would suggest is to look into amsrefs manual.  The amsrefs
package was (is?) an interesting attempt at a /pure LaTeX/ solution to
the bibliography problem, not dependent on any executable other than
LaTeX.  It is not capable of sorting bibliographies, but other than
that is quite powerful (much more than bibtex, though seemingly less
than biblatex).  What is interesting here is its \ycite and \ocite
commands (see
http://mirrors.ctan.org/macros/latex/contrib/amsrefs/amsrdoc.pdf); it
might be a good idea to support something similar.  (I'm not sure
whether biblatex supports such a thing.)

> Cheers,
> Viktor

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University

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

* Re: Let's discuss citation and Org syntax
  2013-05-21 12:21 Let's discuss citation and Org syntax Rasmus
  2013-05-21 12:25 ` Rasmus
  2013-05-21 17:55 ` Viktor Rosenfeld
@ 2013-05-22  3:51 ` Christian Wittern
  2014-01-02  8:08 ` Joseph Vidal-Rosset
  3 siblings, 0 replies; 26+ messages in thread
From: Christian Wittern @ 2013-05-22  3:51 UTC (permalink / raw)
  To: emacs-orgmode

Hi Rasmus,

On 2013-05-21 21:21, Rasmus wrote:
> Now that 8.0 has shipped let's talk bibliography support.  This
> follows directly upon the discussion around March[1].
Thanks for a great post and for taken initiative for making org-mode even 
better for my purposes.  I started using org for writing papers a few years 
ago and I am not looking back.  The weak point however is bibliographies, as 
you say.

FWIW, I will describe my use case.  For drafting and when I can get away 
with it, I am going from org to PDF through XeLaTex, with either bibtex or 
more recently biber+biblatex.  However, when I submit papers, in most cases 
they have to be in a wordprocessor format, so I am going through the ODT 
export here.   In my current workflow this means that the bibliographie 
falls apart and in the end (deadlines!!) I usually cut and paste what I can 
get into either HTML or PDF.  This is not ideal and if this can improve it 
would mean a lot to me.

One problem I have had with bibtex and which I am now kind of dealing with 
(albeit still in a hackish way) in biber+biblatex is that I need specific 
formatting of the entries depending on the language I am publishing in, 
which is mostly either English or Japanese.  So for Japanese sources cited 
in English papers, I have to give the author and title optionally in 
Japanese characters, but also in romanized form and possibly in translation, 
whereas English sources in Japanese might require a Japanese form of the 
names and again a translation into Japanese.   I ended up adding extra 
fields to my bibtex file, since no bibliographic format I know of (except 
TEI) would support this and still allow me to integrate it into my workflow, 
but the big problem lies of course in integrating this better in my workflow.

So whatever org ends up with having in terms of bibliography, I would like 
to work with you and however jumps in to make sure that it also fits this 
need (which is actually not limited to an exotic field like mine, but is 
quite common for academics working in East Asia).

All the best,

Christian

-- 
Christian Wittern, Kyoto

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

* Re: Let's discuss citation and Org syntax
  2013-05-21 17:55 ` Viktor Rosenfeld
  2013-05-21 18:18   ` Rasmus
  2013-05-21 21:34   ` Marcin Borkowski
@ 2013-05-22  5:36   ` Erik Hetzner
  2 siblings, 0 replies; 26+ messages in thread
From: Erik Hetzner @ 2013-05-22  5:36 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

At Tue, 21 May 2013 19:55:53 +0200,
Viktor Rosenfeld wrote:
> 
> Hi,
> 
> Rasmus wrote:
> 
> > Hi, 
> > 
> > Now that 8.0 has shipped let's talk bibliography support.  This
> > follows directly upon the discussion around March[1].
> 
> I did not follow the discussion in March and only skimmed through the
> recent discussion in May [2]. But I was wondering if bibliography
> support in the LaTeX exporter would be BibTex-only or if it would also
> support biblatex, for example.

And to further confuse the issue, why not consider pandoc style
citations [1]?

This works right now. Create an org file:

  See [@citekey, p. 10] for more info.

(assuming a bibtex, endnote, ris, ... file that contains a cite with
key “citekey”). Export to markdown. Process in pandoc, either to
latex:

  ❤ pandoc --natbib test.md -t latex -s --biblio test.bib

or to HTML, etc:

  ❤ pandoc test.md -s --biblio test.bib

While it would be nice to make this work natively with org, especially
with latex output, it would be great if compatibility with pandoc
could be obtained.

best, Erik

1. http://johnmacfarlane.net/pandoc/README.html#citation-rendering

[-- Attachment #2: Type: text/plain, Size: 53 bytes --]

Sent from my free software system <http://fsf.org/>.

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

* Re: Let's discuss citation and Org syntax
  2013-05-21 12:25 ` Rasmus
@ 2013-05-22  9:02   ` Christian Moe
  2013-05-22 16:23     ` Matt Price
  0 siblings, 1 reply; 26+ messages in thread
From: Christian Moe @ 2013-05-22  9:02 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2380 bytes --]


Hi,

I'd be cool with a dedicated citation syntax, or using a
yet-to-be-introduced extensible syntax for citations. 

But link syntax does make sense to me -- after all, citations do point
to things. And unlike one of the opinions you cited, I think link
descriptions *are* meaningful in citations, and can be made more
meaningful yet (code attached).

First, with links, you can have an easily human-readable reference in
the description, and the link keyword and citekey tucked away, e.g. as
you note:

>          [[cite:jones-etal-2000][Jones et al., 2000]]

That makes for a better authoring experience when revising your document
months or years later. Sure, Bibtex users usually keep their citekeys
mnemonic. However, there are alternatives to Bibtex, and people will
increasingly be keying their references to very non-mnemonic DOIs,
Zotero IDs or other database keys, etc.

But second, and more interesting: 

Parsing the description part as meaningful would also let us think
outside the latex box and handle things like page numbers and post-notes
a bit more intuitively. The following is an example of thinking like latex:

>        So, a possible extension of that could, for instance,
>        use a third pair of [] as in
>          [[cite:jones-etal-2000][Jones et al., 2000][[citationcommand][prenote][postnote]]]
>                 ^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^
>                 key           displayed in org

Why should the prenote go nearly at the end? Do we really to add a
citation command? (Or define a bunch of different link types, one for
each citation command, as in Thomas S. Dye's excellent setup?) And do we
need all those brackets anyway?

My preference would be to write something like:

  [[cite:jones2000][(see further: Jones et al., 2000: p.18)]]

and  use a simple algorithm and a smidgen of extra processing power to
make sense of different human-meaningful forms of description, so that
e.g.:

  [[cite:jones2000][(2000: p.17)]] becomes a \citeyear
  [[cite:jones2000][Jones, 2000]] without round parens becomes a \citet

etc.

I have a rough, working example of this enabling Zotero cites for ODT
export (attached). I've been meaning to polish it up as a contributed
module for Zotero users, but if there's interest in a unified citation
syntax along these lines, I could rewrite it to work for Bibtex as well.

Yours,
Christian Moe


[-- Attachment #2: org-zotero-export.el --]
[-- Type: application/emacs-lisp, Size: 7467 bytes --]

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

* Re: Let's discuss citation and Org syntax
  2013-05-22  9:02   ` Christian Moe
@ 2013-05-22 16:23     ` Matt Price
  2013-05-23  8:05       ` Christian Moe
  0 siblings, 1 reply; 26+ messages in thread
From: Matt Price @ 2013-05-22 16:23 UTC (permalink / raw)
  To: Christian Moe; +Cc: Org Mode, Rasmus

On Wed, May 22, 2013 at 5:02 AM, Christian Moe <mail@christianmoe.com> wrote:
>
> I have a rough, working example of this enabling Zotero cites for ODT
> export (attached). I've been meaning to polish it up as a contributed
> module for Zotero users, but if there's interest in a unified citation
> syntax along these lines, I could rewrite it to work for Bibtex as well.
>
Hi Christian,

I'm really interested in this, as I use Zotero not only for writing
but for group bibliographies in my  courses.  The broader conversation
about the appropriate syntax is a bit beyond me, but I do have a
couple of questions about your work with Zotero:

(1) How do you get the Zotero cite keys right now, and what method do
you think would ultimately be the best to try for?  Since zotero now
operates as a service, I would think it should be possible to write an
emacs plugin that communicates directly to Zotero the way that the
word/libreoffice plugin does (though I don't know how to do that stuff
myself).

(2) How might you generalize the export to other formats, esp. HTML?
I imagine the best thing to do would be to use citeproc.js & set the
citation format using a variable, e.g.

#+ ZOTERO-FORMAT: Chicago

The option to do this would be great e.g. for people (like me) who use
org to compose blog posts, then process through the html export (in my
case via org2blog).

(3) Have you seen Erik Hetzner's zotero-plain,
https://bitbucket.org/egh/zotero-plain ?  Would it be useful to your
work? I see Erik is already involved in this thread, do you have any
comments Erik?

Thank you for this!

Matt

> Yours,
> Christian Moe
>

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

* Re: Let's discuss citation and Org syntax
  2013-05-21 21:34   ` Marcin Borkowski
@ 2013-05-22 21:53     ` Matt Lundin
  0 siblings, 0 replies; 26+ messages in thread
From: Matt Lundin @ 2013-05-22 21:53 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: emacs-orgmode

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
> I do not use Org-mode for authoring (I'm quite happy with LaTeX itself
> for that), and in LaTeX, I use neither bibtex nor biblatex; but AFAIK,
> bibtex is basically dead like John Cleese's parrot.  I don't even think
> that it needs to or should be supported; the faster bibtex usage fades
> away, the better.

As a point of clarification, bibtex syntax and bib files remain alive
and well (albeit with modifications) for those who use biblatex.

> What I would suggest is to look into amsrefs manual.  The amsrefs
> package was (is?) an interesting attempt at a /pure LaTeX/ solution to
> the bibliography problem, not dependent on any executable other than
> LaTeX.  It is not capable of sorting bibliographies, but other than
> that is quite powerful (much more than bibtex, though seemingly less
> than biblatex).  What is interesting here is its \ycite and \ocite
> commands (see
> http://mirrors.ctan.org/macros/latex/contrib/amsrefs/amsrdoc.pdf); it
> might be a good idea to support something similar.  (I'm not sure
> whether biblatex supports such a thing.)

Most biblatex backends have multiple versions of cite commands. I use
biblatex-chicago, which provides, among others, \autocite, \fullcite,
\citetitle, \footfullcite, \headlesscite, \headlessfullcite, \shortcite.

Best,
Matt

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

* Re: Let's discuss citation and Org syntax
  2013-05-22 16:23     ` Matt Price
@ 2013-05-23  8:05       ` Christian Moe
  2013-05-26 14:23         ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 26+ messages in thread
From: Christian Moe @ 2013-05-23  8:05 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode, Christian Moe, Rasmus


Matt Price writes:
> On Wed, May 22, 2013 at 5:02 AM, Christian Moe <mail@christianmoe.com> wrote:
>>
>> I have a rough, working example of this enabling Zotero cites for ODT
>> export (attached).

> Hi Christian,
>
> I'm really interested in this, as I use Zotero not only for writing
> but for group bibliographies in my  courses.  The broader conversation
> about the appropriate syntax is a bit beyond me,

Hi, Matt,

As the org-zotero-export.el shows, getting Zotero references from Org
into ODT is pretty simple. That framework could be implemented whatever
syntax we end up with to take care of the details. I'm interested in
feedback on the syntax, though -- that is, on the way I'm using the
description part of the link to convey various bits of information to
Zotero. Is it worth pursuing, or would people prefer other ways of
doing it? If worth pursuing, could it be improved?

> (1) How do you get the Zotero cite keys right now, and what method do
> you think would ultimately be the best to try for?

The best to try for: Something with as brilliant an interface as RefTex...

Since this thread is on citation syntax, I think I'll gather my thoughts
about how to get there (zotero-plain? Zotero Server API? sqlite? word
processor plugin emulation?), and about your other questions, and start
another Zotero-related thread in a day or two.

Right now: I'm still depending on Quick Copy with a custom Zotero
translator. That is, I tab from Emacs to Firefox, look up a reference in
the Zotero pane, and Quick Copy (C-S-c) to a formatted link to the
clipboard. Tab back to Emacs, yank the link, manually tweak the
description as necessary. RefTex it ain't, and it's cumbersome for
multiple citations, but it works.


Yours,
Christian

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

* Re: Let's discuss citation and Org syntax
  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
  0 siblings, 2 replies; 26+ messages in thread
From: Darlan Cavalcante Moreira @ 2013-05-26 14:23 UTC (permalink / raw)
  To: Christian Moe; +Cc: Org Mode, Rasmus


I prefer the [cite:citekey] syntax similar to [fn:number] for footnotes.

But no matter which syntax is chosen I think we can easily make reftex work
with it. All we need is to set the variable reftex-cite-format [1] to a
string with the desired format. For the syntax [cite:citekey] the string
would be "[cite:%l]".

[1] We probably need to make that a local variable in org-mode buffers so
    that the global value is kept on default for latex buffers.

--
Darlan

    
At Thu, 23 May 2013 10:05:37 +0200,
Christian Moe wrote:
> 
> 
> Matt Price writes:
> > On Wed, May 22, 2013 at 5:02 AM, Christian Moe <mail@christianmoe.com> wrote:
> >>
> >> I have a rough, working example of this enabling Zotero cites for ODT
> >> export (attached).
> 
> > Hi Christian,
> >
> > I'm really interested in this, as I use Zotero not only for writing
> > but for group bibliographies in my  courses.  The broader conversation
> > about the appropriate syntax is a bit beyond me,
> 
> Hi, Matt,
> 
> As the org-zotero-export.el shows, getting Zotero references from Org
> into ODT is pretty simple. That framework could be implemented whatever
> syntax we end up with to take care of the details. I'm interested in
> feedback on the syntax, though -- that is, on the way I'm using the
> description part of the link to convey various bits of information to
> Zotero. Is it worth pursuing, or would people prefer other ways of
> doing it? If worth pursuing, could it be improved?
> 
> > (1) How do you get the Zotero cite keys right now, and what method do
> > you think would ultimately be the best to try for?
> 
> The best to try for: Something with as brilliant an interface as RefTex...
> 
> Since this thread is on citation syntax, I think I'll gather my thoughts
> about how to get there (zotero-plain? Zotero Server API? sqlite? word
> processor plugin emulation?), and about your other questions, and start
> another Zotero-related thread in a day or two.
> 
> Right now: I'm still depending on Quick Copy with a custom Zotero
> translator. That is, I tab from Emacs to Firefox, look up a reference in
> the Zotero pane, and Quick Copy (C-S-c) to a formatted link to the
> clipboard. Tab back to Emacs, yank the link, manually tweak the
> description as necessary. RefTex it ain't, and it's cumbersome for
> multiple citations, but it works.
> 
> 
> Yours,
> Christian
> 
> 

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

* Re: Let's discuss citation and Org syntax
  2013-05-26 14:23         ` Darlan Cavalcante Moreira
@ 2013-05-26 19:12           ` Christian Moe
  2013-06-27  6:17           ` Christian Wittern
  1 sibling, 0 replies; 26+ messages in thread
From: Christian Moe @ 2013-05-26 19:12 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: Org Mode, Christian Moe, Rasmus




Darlan Cavalcante Moreira writes:

> I prefer the [cite:citekey] syntax similar to [fn:number] for footnotes.
>
> But no matter which syntax is chosen I think we can easily make reftex work
> with it. All we need is to set the variable reftex-cite-format [1] to a
> string with the desired format. For the syntax [cite:citekey] the string
> would be "[cite:%l]".

Yes, for bibtex. But to clarify, Matt Price and I got on the subject of
using Zotero as both the source database and the reference-formatting
engine for exported documents, with Org in the middle.

Reftex can be used for that as well, e.g. by synching the Zotero db to a
bibtex file with Zotero db keys as citekeys. There are other options,
with different pros and cons. (And I'll start a thread on that soon as
my day job stops interfering with my night life again.)

Yours,
Christian

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

* Re: Let's discuss citation and Org syntax
  2013-05-26 14:23         ` Darlan Cavalcante Moreira
  2013-05-26 19:12           ` Christian Moe
@ 2013-06-27  6:17           ` Christian Wittern
  1 sibling, 0 replies; 26+ messages in thread
From: Christian Wittern @ 2013-06-27  6:17 UTC (permalink / raw)
  To: emacs-orgmode

Sorry about this late contribution to this thread.  I just stumbled on the 
RTF/ODF scan tool for Zotero at[1], which seems to do something similar to 
the ideas ventilated in this thread.  Since Zotero compatibility is high on 
the list of desirables mentioned here, I thought it might be an interisting 
point of reference.

This page also mentions that Zotero can be told to provide a "scannable 
Cite" as output format, which works with things like
|{See | Smith, (2012) |p. 45 | for an example |zu:2433:WQVBH98K}

which the format engine than turns into
|
(See Smith, 2012, p. 45 for an example)

I wonder if it would be worthwhile if the citation handling in Org would 
become compatible with this approach?

Christian W.

[1] http://zotero-odf-scan.github.io/zotero-odf-scan/


On 2013-05-26 23:23, Darlan Cavalcante Moreira wrote:
> I prefer the [cite:citekey] syntax similar to [fn:number] for footnotes.
>
> But no matter which syntax is chosen I think we can easily make reftex work
> with it. All we need is to set the variable reftex-cite-format [1] to a
> string with the desired format. For the syntax [cite:citekey] the string
> would be "[cite:%l]".
>
> [1] We probably need to make that a local variable in org-mode buffers so
>      that the global value is kept on default for latex buffers.
>
> --
> Darlan
>
>      
> At Thu, 23 May 2013 10:05:37 +0200,
> Christian Moe wrote:
>>
>> Matt Price writes:
>>> On Wed, May 22, 2013 at 5:02 AM, Christian Moe <mail@christianmoe.com> wrote:
>>>> I have a rough, working example of this enabling Zotero cites for ODT
>>>> export (attached).
>>> Hi Christian,
>>>
>>> I'm really interested in this, as I use Zotero not only for writing
>>> but for group bibliographies in my  courses.  The broader conversation
>>> about the appropriate syntax is a bit beyond me,
>> Hi, Matt,
>>
>> As the org-zotero-export.el shows, getting Zotero references from Org
>> into ODT is pretty simple. That framework could be implemented whatever
>> syntax we end up with to take care of the details. I'm interested in
>> feedback on the syntax, though -- that is, on the way I'm using the
>> description part of the link to convey various bits of information to
>> Zotero. Is it worth pursuing, or would people prefer other ways of
>> doing it? If worth pursuing, could it be improved?
>>
>>> (1) How do you get the Zotero cite keys right now, and what method do
>>> you think would ultimately be the best to try for?
>> The best to try for: Something with as brilliant an interface as RefTex...
>>
>> Since this thread is on citation syntax, I think I'll gather my thoughts
>> about how to get there (zotero-plain? Zotero Server API? sqlite? word
>> processor plugin emulation?), and about your other questions, and start
>> another Zotero-related thread in a day or two.
>>
>> Right now: I'm still depending on Quick Copy with a custom Zotero
>> translator. That is, I tab from Emacs to Firefox, look up a reference in
>> the Zotero pane, and Quick Copy (C-S-c) to a formatted link to the
>> clipboard. Tab back to Emacs, yank the link, manually tweak the
>> description as necessary. RefTex it ain't, and it's cumbersome for
>> multiple citations, but it works.
>>
>>
>> Yours,
>> Christian
>>
>>
>


-- 
Christian Wittern, Kyoto

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

* Re: Let's discuss citation and Org syntax
  2013-05-21 12:21 Let's discuss citation and Org syntax Rasmus
                   ` (2 preceding siblings ...)
  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
  3 siblings, 2 replies; 26+ messages in thread
From: Joseph Vidal-Rosset @ 2014-01-02  8:08 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode list

[-- Attachment #1: Type: text/plain, Size: 4986 bytes --]

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 <rasmus@gmx.us>

> 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!
>
>
>

[-- Attachment #2: Type: text/html, Size: 6239 bytes --]

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

* Re: Let's discuss citation and Org syntax
  2014-01-02  8:08 ` Joseph Vidal-Rosset
@ 2014-01-02 15:51   ` Rüdiger Sonderfeld
  2014-01-02 18:33   ` Eric Schulte
  1 sibling, 0 replies; 26+ messages in thread
From: Rüdiger Sonderfeld @ 2014-01-02 15:51 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Rasmus, Joseph Vidal-Rosset

On Thursday 02 January 2014 09:08:44 Joseph Vidal-Rosset wrote:
> At the moment, what is the best i.e. the more convenient solution?

A while ago I started writing BibTeX support for org-mode.  It's still in a 
rather early stage and I didn't have the time to continue working on it.  It 
basically generates org-mode syntax for \cite entries/bib files and thus 
should work in all exporters.

https://github.com/ruediger/bibeltex

Regards
Rüdiger

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

* Re: Let's discuss citation and Org syntax
  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
  1 sibling, 1 reply; 26+ messages in thread
From: Eric Schulte @ 2014-01-02 18:33 UTC (permalink / raw)
  To: Joseph Vidal-Rosset; +Cc: emacs-orgmode list, Rasmus

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 <joseph.vidal.rosset@gmail.com> 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 <rasmus@gmx.us>
>
>> 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

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

* Re: Let's discuss citation and Org syntax
  2014-01-02 18:33   ` Eric Schulte
@ 2014-01-02 19:12     ` Joseph Vidal-Rosset
  2014-01-03 18:32       ` Joseph Vidal-Rosset
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph Vidal-Rosset @ 2014-01-02 19:12 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode list, Rasmus

[-- Attachment #1: Type: text/plain, Size: 6578 bytes --]

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 <schulte.eric@gmail.com>

> 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 <joseph.vidal.rosset@gmail.com> 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 <rasmus@gmx.us>
> >
> >> 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
>

[-- Attachment #2: Type: text/html, Size: 9274 bytes --]

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

* Re: Let's discuss citation and Org syntax
  2014-01-02 19:12     ` Joseph Vidal-Rosset
@ 2014-01-03 18:32       ` Joseph Vidal-Rosset
  2014-01-03 19:13         ` John Hendy
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph Vidal-Rosset @ 2014-01-03 18:32 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode list, Rasmus

[-- Attachment #1: Type: text/plain, Size: 7233 bytes --]

Hi,

Is there somewhere a documentation with a simple helpful example to follow
from step to step in order to use ox-bibtex or bibeltex ? I got only a
message error : "bibtex2html failed" and I do not understand why.

Reading this page, for example,
http://bowenli37.wordpress.com/tag/org-exp-bibtex/
I understand that I must add #+LINK ..

But nothing works...

Thanks in advance for your help

Jo.



2014/1/2 Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>

> 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 <schulte.eric@gmail.com>
>
>> 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 <joseph.vidal.rosset@gmail.com> 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 <rasmus@gmx.us>
>> >
>> >> 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
>>
>
>

[-- Attachment #2: Type: text/html, Size: 10343 bytes --]

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

* Re: Let's discuss citation and Org syntax
  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:15           ` Joseph Vidal-Rosset
  0 siblings, 2 replies; 26+ messages in thread
From: John Hendy @ 2014-01-03 19:13 UTC (permalink / raw)
  To: Joseph Vidal-Rosset; +Cc: emacs-orgmode list, Rasmus, Eric Schulte

On Fri, Jan 3, 2014 at 12:32 PM, Joseph Vidal-Rosset
<joseph.vidal.rosset@gmail.com> wrote:
> Hi,
>
> Is there somewhere a documentation with a simple helpful example to follow
> from step to step in order to use ox-bibtex or bibeltex ? I got only a
> message error : "bibtex2html failed" and I do not understand why.
>
> Reading this page, for example,
> http://bowenli37.wordpress.com/tag/org-exp-bibtex/
> I understand that I must add #+LINK ..
>
> But nothing works...


I think you need to post a minimal example with everything required.
For those of us who have never used bibtex (me), it's not clear what
you're trying to do and we (at least I) can't help. For example,
googling "orgmode bibtex" produces links which don't seem to do the
same thing, from my skimming:
- http://tex.stackexchange.com/questions/114864/how-to-get-bibtex-to-work-with-org-mode-latex-export
- http://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg00791.html
- http://orgmode.org/worg/org-api/org-bibtex-api.html
- http://blog.karssen.org/2013/08/22/using-bibtex-from-org-mode/
- http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/

For example, only one of those (that I noted), mentions anything about
#+LINK, so I'm thinking that what you are trying to do must be a
subset of everything embodied by "Orgmode and bibtex" since some
fairly complete other posts get by without mentioning using #+LINK.

Can you post:
- Minimal .org file
- Reproducible .emacs with what you currently have setup to get things working
- The matching minimal bibliography file
- Perhaps the output you want (in LaTeX or whatever output language)

Apologies if the above is self-explanatory and I'm playing the
un-needed role of mailing list police. I've noticed a lot of questions
recently without sufficient detail. Always posting with clear goals,
files so others can reproduce, and example output you want saves
others having to fill in the blanks.

You'll also get a lot more help since those generous with their time
can easily copy and paste some code into their own local Emacs setups
and see if it works. That helps differentiate setup issues from syntax
issues from usage issues, etc.



John

P.S. Also post what you actually *have* tried. This saves others
having to re-try what you tried, since no one knows that "but nothing
works" means concretely. There's a blog post link with a bunch of
stuff in it, followed by "but nothing works." What, exactly, from that
blog post did you try (as in, paste the code from the various
categories above -- org file, .emacs, bib file -- for each thing
attempted)?



>
> Thanks in advance for your help
>
> Jo.
>
>
>
> 2014/1/2 Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
>>
>> 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 <schulte.eric@gmail.com>
>>>
>>> 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 <joseph.vidal.rosset@gmail.com> 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 <rasmus@gmx.us>
>>> >
>>> >> 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
>>
>>
>

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

* Re: Let's discuss citation and Org syntax
  2014-01-03 19:13         ` John Hendy
@ 2014-01-03 20:27           ` Joseph Vidal-Rosset
  2014-01-03 21:56             ` John Hendy
  2014-01-03 21:15           ` Joseph Vidal-Rosset
  1 sibling, 1 reply; 26+ messages in thread
From: Joseph Vidal-Rosset @ 2014-01-03 20:27 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode list, Rasmus, Eric Schulte

[-- Attachment #1: Type: text/plain, Size: 11197 bytes --]

Hi John, hi everyone,

Here are the headers of my org-file:

#+OPTIONS: LaTeX:verbatim
#+LaTeX_CLASS: koma-article
#+LaTeX_CLASS_OPTIONS: [a4paper,twoside,twocolumn]
#+LaTeX_CLASS_OPTIONS: [captions=tableheading]
#+LATEX_HEADER: \usepackage[AUTO]{inputenc}
#+LATEX_HEADER: \usepackage{fitch}
#+LATEX_HEADER: \usepackage{bussproofs}
#+LaTeX_CLASS: koma-article
#+LANGUAGE:  en
#+LaTeX_HEADER: \usepackage[backend=biber,style=verbose]{biblatex}
#+LaTeX_HEADER: \bibliography{jvr-biblatex-references.bib}
#+LaTeX_HEADER: \usepackage{bussproofs}
#+LaTeX_HEADER: \usepackage{fitch}
#+LaTeX_HEADER: \usepackage{hyperref}
#+OPTIONS: tex:imagemagick
#+TITLE: a title
#+AUTHOR: Joseph Vidal-Rosset


I have a couple of questions:

1) Does biblatex works with ox-bibtex.el   ? I suppose that it does not but
I can switch to bibtex.

2) I do not know the headers that I have exactly to add in this file.

Best wishes,

Jo.


2014/1/3 John Hendy <jw.hendy@gmail.com>

> On Fri, Jan 3, 2014 at 12:32 PM, Joseph Vidal-Rosset
> <joseph.vidal.rosset@gmail.com> wrote:
> > Hi,
> >
> > Is there somewhere a documentation with a simple helpful example to
> follow
> > from step to step in order to use ox-bibtex or bibeltex ? I got only a
> > message error : "bibtex2html failed" and I do not understand why.
> >
> > Reading this page, for example,
> > http://bowenli37.wordpress.com/tag/org-exp-bibtex/
> > I understand that I must add #+LINK ..
> >
> > But nothing works...
>
>
> I think you need to post a minimal example with everything required.
> For those of us who have never used bibtex (me), it's not clear what
> you're trying to do and we (at least I) can't help. For example,
> googling "orgmode bibtex" produces links which don't seem to do the
> same thing, from my skimming:
> -
> http://tex.stackexchange.com/questions/114864/how-to-get-bibtex-to-work-with-org-mode-latex-export
> - http://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg00791.html
> - http://orgmode.org/worg/org-api/org-bibtex-api.html
> - http://blog.karssen.org/2013/08/22/using-bibtex-from-org-mode/
> -
> http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/
>
> For example, only one of those (that I noted), mentions anything about
> #+LINK, so I'm thinking that what you are trying to do must be a
> subset of everything embodied by "Orgmode and bibtex" since some
> fairly complete other posts get by without mentioning using #+LINK.
>
> Can you post:
> - Minimal .org file
> - Reproducible .emacs with what you currently have setup to get things
> working
> - The matching minimal bibliography file
> - Perhaps the output you want (in LaTeX or whatever output language)
>
> Apologies if the above is self-explanatory and I'm playing the
> un-needed role of mailing list police. I've noticed a lot of questions
> recently without sufficient detail. Always posting with clear goals,
> files so others can reproduce, and example output you want saves
> others having to fill in the blanks.
>
> You'll also get a lot more help since those generous with their time
> can easily copy and paste some code into their own local Emacs setups
> and see if it works. That helps differentiate setup issues from syntax
> issues from usage issues, etc.
>
>
>
> John
>
> P.S. Also post what you actually *have* tried. This saves others
> having to re-try what you tried, since no one knows that "but nothing
> works" means concretely. There's a blog post link with a bunch of
> stuff in it, followed by "but nothing works." What, exactly, from that
> blog post did you try (as in, paste the code from the various
> categories above -- org file, .emacs, bib file -- for each thing
> attempted)?
>
>
>
> >
> > Thanks in advance for your help
> >
> > Jo.
> >
> >
> >
> > 2014/1/2 Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
> >>
> >> 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 <schulte.eric@gmail.com>
> >>>
> >>> 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 <joseph.vidal.rosset@gmail.com> 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 <rasmus@gmx.us>
> >>> >
> >>> >> 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
> >>
> >>
> >
>

[-- Attachment #2: Type: text/html, Size: 16927 bytes --]

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

* Re: Let's discuss citation and Org syntax
  2014-01-03 19:13         ` John Hendy
  2014-01-03 20:27           ` Joseph Vidal-Rosset
@ 2014-01-03 21:15           ` Joseph Vidal-Rosset
       [not found]             ` <87fvoy4r1l.fsf@ucl.ac.uk>
  1 sibling, 1 reply; 26+ messages in thread
From: Joseph Vidal-Rosset @ 2014-01-03 21:15 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode list, Rasmus, Eric Schulte

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

2014/1/3 John Hendy <jw.hendy@gmail.com>

> it's not clear what
> you're trying to do
>

I have forgotten to say that I'm trying to get via org-mode export,
references in latex as well as in html. In latex there is no problem (via
bibtex or biblatex either), but for html export , bibtex2html fails and I
suppose that I have to add some line in the preamble of my file.

Best wishes,

Jo.

[-- Attachment #2: Type: text/html, Size: 877 bytes --]

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

* Re: Let's discuss citation and Org syntax
  2014-01-03 20:27           ` Joseph Vidal-Rosset
@ 2014-01-03 21:56             ` John Hendy
  2014-01-04 10:17               ` Joseph Vidal-Rosset
  0 siblings, 1 reply; 26+ messages in thread
From: John Hendy @ 2014-01-03 21:56 UTC (permalink / raw)
  To: Joseph Vidal-Rosset; +Cc: emacs-orgmode list, Rasmus, Eric Schulte

On Fri, Jan 3, 2014 at 2:27 PM, Joseph Vidal-Rosset
<joseph.vidal.rosset@gmail.com> wrote:
> Hi John, hi everyone,
>
> Here are the headers of my org-file:
>
> #+OPTIONS: LaTeX:verbatim
> #+LaTeX_CLASS: koma-article
> #+LaTeX_CLASS_OPTIONS: [a4paper,twoside,twocolumn]
> #+LaTeX_CLASS_OPTIONS: [captions=tableheading]
> #+LATEX_HEADER: \usepackage[AUTO]{inputenc}
> #+LATEX_HEADER: \usepackage{fitch}
> #+LATEX_HEADER: \usepackage{bussproofs}
> #+LaTeX_CLASS: koma-article
> #+LANGUAGE:  en
> #+LaTeX_HEADER: \usepackage[backend=biber,style=verbose]{biblatex}
> #+LaTeX_HEADER: \bibliography{jvr-biblatex-references.bib}
> #+LaTeX_HEADER: \usepackage{bussproofs}
> #+LaTeX_HEADER: \usepackage{fitch}
> #+LaTeX_HEADER: \usepackage{hyperref}
> #+OPTIONS: tex:imagemagick
> #+TITLE: a title
> #+AUTHOR: Joseph Vidal-Rosset
>
>
> I have a couple of questions:
>
> 1) Does biblatex works with ox-bibtex.el   ? I suppose that it does not but
> I can switch to bibtex.
>
> 2) I do not know the headers that I have exactly to add in this file.
>

Not to be redundant, but I still think what I posted below will be
quite helpful before we get ahead of ourselves:

#+begin_quote

Can you post:
- Minimal .org file
- Reproducible .emacs with what you currently have setup to get things working
- The matching minimal bibliography file
- Perhaps the output you want (in LaTeX or whatever output language)

#+end_quote

- Minimal .org as in only the headers you need to make this work, no
fancy options or custom classes. Just bare-bones what needs to be
there to verify bibtex functionality.
- Some text in the .org file that tries to call a bib entry.
- A minimal .bib file with a single matching entry you try to call
from the org file
- The output file you hope Org is able to tangle together from you
from the .org and .bib files.


John

> Best wishes,
>
> Jo.
>
>
> 2014/1/3 John Hendy <jw.hendy@gmail.com>
>>
>> On Fri, Jan 3, 2014 at 12:32 PM, Joseph Vidal-Rosset
>> <joseph.vidal.rosset@gmail.com> wrote:
>> > Hi,
>> >
>> > Is there somewhere a documentation with a simple helpful example to
>> > follow
>> > from step to step in order to use ox-bibtex or bibeltex ? I got only a
>> > message error : "bibtex2html failed" and I do not understand why.
>> >
>> > Reading this page, for example,
>> > http://bowenli37.wordpress.com/tag/org-exp-bibtex/
>> > I understand that I must add #+LINK ..
>> >
>> > But nothing works...
>>
>>
>> I think you need to post a minimal example with everything required.
>> For those of us who have never used bibtex (me), it's not clear what
>> you're trying to do and we (at least I) can't help. For example,
>> googling "orgmode bibtex" produces links which don't seem to do the
>> same thing, from my skimming:
>> -
>> http://tex.stackexchange.com/questions/114864/how-to-get-bibtex-to-work-with-org-mode-latex-export
>> - http://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg00791.html
>> - http://orgmode.org/worg/org-api/org-bibtex-api.html
>> - http://blog.karssen.org/2013/08/22/using-bibtex-from-org-mode/
>> -
>> http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/
>>
>> For example, only one of those (that I noted), mentions anything about
>> #+LINK, so I'm thinking that what you are trying to do must be a
>> subset of everything embodied by "Orgmode and bibtex" since some
>> fairly complete other posts get by without mentioning using #+LINK.
>>
>> Can you post:
>> - Minimal .org file
>> - Reproducible .emacs with what you currently have setup to get things
>> working
>> - The matching minimal bibliography file
>> - Perhaps the output you want (in LaTeX or whatever output language)
>>
>> Apologies if the above is self-explanatory and I'm playing the
>> un-needed role of mailing list police. I've noticed a lot of questions
>> recently without sufficient detail. Always posting with clear goals,
>> files so others can reproduce, and example output you want saves
>> others having to fill in the blanks.
>>
>> You'll also get a lot more help since those generous with their time
>> can easily copy and paste some code into their own local Emacs setups
>> and see if it works. That helps differentiate setup issues from syntax
>> issues from usage issues, etc.
>>
>>
>>
>> John
>>
>> P.S. Also post what you actually *have* tried. This saves others
>> having to re-try what you tried, since no one knows that "but nothing
>> works" means concretely. There's a blog post link with a bunch of
>> stuff in it, followed by "but nothing works." What, exactly, from that
>> blog post did you try (as in, paste the code from the various
>> categories above -- org file, .emacs, bib file -- for each thing
>> attempted)?
>>
>>
>>
>> >
>> > Thanks in advance for your help
>> >
>> > Jo.
>> >
>> >
>> >
>> > 2014/1/2 Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
>> >>
>> >> 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 <schulte.eric@gmail.com>
>> >>>
>> >>> 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 <joseph.vidal.rosset@gmail.com> 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 <rasmus@gmx.us>
>> >>> >
>> >>> >> 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
>> >>
>> >>
>> >
>
>

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

* Re: Let's discuss citation and Org syntax
  2014-01-03 21:56             ` John Hendy
@ 2014-01-04 10:17               ` Joseph Vidal-Rosset
  2014-01-04 14:52                 ` John Hendy
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph Vidal-Rosset @ 2014-01-04 10:17 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode list, Rasmus, Eric Schulte

[-- Attachment #1: Type: text/plain, Size: 2429 bytes --]

Dear John,

Thanks for your efforts to help me. I have good news.

2014/1/3 John Hendy <jw.hendy@gmail.com>

> Can you post:
> - Minimal .org file
>

Here is a minimal-paper.org

#+OPTIONS: LaTeX:verbatim
#+LaTeX_CLASS: article
#+LaTeX_CLASS_OPTIONS: [a4paper,twoside,twocolumn]
#+LaTeX_CLASS_OPTIONS: [captions=tableheading]
#+LATEX_HEADER: \usepackage[AUTO]{inputenc}
#+LATEX_HEADER: \usepackage{fitch}
#+LATEX_HEADER: \usepackage{bussproofs}
#+LaTeX_CLASS: article
#+TITLE:Minimal reference
#+AUTHOR: Max IMIN
#+BEGIN_abstract
 Mini test
#+END_abstract
#+OPTIONS: tex:imagemagick
* First section

Tennant [[cite:tennant96]] wrote :

#+BEGIN_QUOTE
quotation of Tennnant's paper...
#+END_QUOTE

#+BIBLIOGRAPHY: minimal-bibliography plain option:-a

 - Reproducible .emacs with what you currently have setup to get things
> working
>

I do not know if this list accept the attachment, but I know that in
general, attachments are not welcome. So here is the minimal set up of org
in my minimal init.el (I do not reproduce here what concerns bitex,
biblatex, latex and reftex in this email):

;; org-mode
(add-to-list 'load-path "~/.emacs.d/elpa/org-20131230")
;;répertoire contrib : org-plus-contrib
(add-to-list 'load-path "~/.emacs.d/elpa/org-plus-contrib-20131230/")

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

(global-set-key "\C-cl" 'org-store-link)
     (global-set-key "\C-cc" 'org-capture)
     (global-set-key "\C-ca" 'org-agenda)
     (global-set-key "\C-cb" 'org-iswitchb)

(require 'org)
(require 'ob-latex)
(require 'ox-latex)
(require 'org-mime)
(require 'ox-html)
(require 'ox-ascii)
(require 'ox-org)
(require 'ox-bibtex)


>  - The matching minimal bibliography file
>

Here is my minimal-bibliography.bib:

@Article{tennant96,
  author =  {Tennant, N.},
  title =  {{The Law of Excluded Middle is Synthetic A Priori, if Valid}},
  journal =  {Philosophical Topics},
  year =  1996,
  number =  24,
  pages =  {241-266}
}


> - Perhaps the output you want (in LaTeX or whatever output language)
>


I am happy to tell you that the export works in latex as well as in html !
Thanks to all !

Now just details , how to converts correctly the latex syntax : \cite[p.
1]{key} ? , and how is it possible to use easily reftex ? I do not succeed
to find ebib very convenient.

Again, many many thanks !

Jo.

[-- Attachment #2: Type: text/html, Size: 4756 bytes --]

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

* Re: Let's discuss citation and Org syntax
  2014-01-04 10:17               ` Joseph Vidal-Rosset
@ 2014-01-04 14:52                 ` John Hendy
  0 siblings, 0 replies; 26+ messages in thread
From: John Hendy @ 2014-01-04 14:52 UTC (permalink / raw)
  To: Joseph Vidal-Rosset; +Cc: emacs-orgmode, Eric Schulte, Rasmus

[-- Attachment #1: Type: text/plain, Size: 2792 bytes --]

On Jan 4, 2014 4:17 AM, "Joseph Vidal-Rosset" <joseph.vidal.rosset@gmail.com>
wrote:
>
> Dear John,
>
> Thanks for your efforts to help me. I have good news.
>
> 2014/1/3 John Hendy <jw.hendy@gmail.com>
>>
>> Can you post:
>> - Minimal .org file
>
>
> Here is a minimal-paper.org
>
> #+OPTIONS: LaTeX:verbatim
> #+LaTeX_CLASS: article
> #+LaTeX_CLASS_OPTIONS: [a4paper,twoside,twocolumn]
> #+LaTeX_CLASS_OPTIONS: [captions=tableheading]
> #+LATEX_HEADER: \usepackage[AUTO]{inputenc}
> #+LATEX_HEADER: \usepackage{fitch}
> #+LATEX_HEADER: \usepackage{bussproofs}
> #+LaTeX_CLASS: article
> #+TITLE:Minimal reference
> #+AUTHOR: Max IMIN
> #+BEGIN_abstract
>  Mini test
> #+END_abstract
> #+OPTIONS: tex:imagemagick
> * First section
>
> Tennant [[cite:tennant96]] wrote :
>
> #+BEGIN_QUOTE
> quotation of Tennnant's paper...
> #+END_QUOTE
>
> #+BIBLIOGRAPHY: minimal-bibliography plain option:-a
>
>> - Reproducible .emacs with what you currently have setup to get things
working
>
>
> I do not know if this list accept the attachment, but I know that in
general, attachments are not welcome. So here is the minimal set up of org
in my minimal init.el (I do not reproduce here what concerns bitex,
biblatex, latex and reftex in this email):
>
> ;; org-mode
> (add-to-list 'load-path "~/.emacs.d/elpa/org-20131230")
> ;;répertoire contrib : org-plus-contrib
> (add-to-list 'load-path "~/.emacs.d/elpa/org-plus-contrib-20131230/")
>
> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
>
> (global-set-key "\C-cl" 'org-store-link)
>      (global-set-key "\C-cc" 'org-capture)
>      (global-set-key "\C-ca" 'org-agenda)
>      (global-set-key "\C-cb" 'org-iswitchb)
>
> (require 'org)
> (require 'ob-latex)
> (require 'ox-latex)
> (require 'org-mime)
> (require 'ox-html)
> (require 'ox-ascii)
> (require 'ox-org)
> (require 'ox-bibtex)
>
>>
>> - The matching minimal bibliography file
>
>
> Here is my minimal-bibliography.bib:
>
> @Article{tennant96,
>   author = {Tennant, N.},
>   title = {{The Law of Excluded Middle is Synthetic A Priori, if Valid}},
>   journal = {Philosophical Topics},
>   year = 1996,
>   number = 24,
>   pages = {241-266}
> }
>
>>
>> - Perhaps the output you want (in LaTeX or whatever output language)
>
>
>
> I am happy to tell you that the export works in latex as well as in html
! Thanks to all !
>

A lovely post that will hopefully help many others down the road! Thanks
for obliging :)

Glad you got it working,
John

> Now just details , how to converts correctly the latex syntax : \cite[p.
1]{key} ? , and how is it possible to use easily reftex ? I do not succeed
to find ebib very convenient.
>
> Again, many many thanks !
>
> Jo.
>
>
>

[-- Attachment #2: Type: text/html, Size: 3877 bytes --]

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

* Re: Let's discuss citation and Org syntax
       [not found]             ` <87fvoy4r1l.fsf@ucl.ac.uk>
@ 2014-01-08 12:53               ` Joseph Vidal-Rosset
  0 siblings, 0 replies; 26+ messages in thread
From: Joseph Vidal-Rosset @ 2014-01-08 12:53 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Liste-emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

2014/1/8 Eric S Fraga <e.fraga@ucl.ac.uk>

> It would help if you showed us how bibtex2html fails.  It works for
> me.  A small org file example which illustrates what you want to do
> would also help.  What version of org are you using?
>

Many thanks Eric, it works now for me also.  The only thing that I do not
succeed to get , it a bibliographical reference in plain style with
postnote like this one for example:

Descartes [1, pp. 224-225] blablabla


* Références

[1] Descartes, Oeuvres complètes, La Pléiade,  Paris, 1973.

End of example.

It does not work because references [[cite:key][postnote]] do not accept
spaces in html.

Therefore I have adopted this less eye-candy format: ([1], pp. 224-225)
 ... It's DIY ...

Best wishes, and thanks again,

Jo.

[-- Attachment #2: Type: text/html, Size: 1695 bytes --]

^ 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 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).