Sure, I remember this thread and it is clear that the problem is very
different when it is for LaTeX of for and HTML backend.
However, Reftex is provided with Emacs, and it is also integrated to Org
mode.

So I was trying to solve my simple problem about the bibliography keyword
this way:

(defadvice org-latex-keyword (around org-latex-keyword-bibliography)
  "Exports `bibliography' keyword with LaTeX backend."
  (let ((key (org-element-property :key (ad-get-arg 0)))
        (value (org-element-property :value (ad-get-arg 0))))
    (if (and (string= key "BIBLIOGRAPHY")
             (string-match "\\(\\S-+\\)[ \t]+\\(\\S-+\\)\\([^\r\n]*\\)"
value))
        (let ((bibfile (match-string 1 value))
              (bibstyle (match-string 2 value)))
          (format "\\bibliography{%s}\n\\bibliographystyle{%s}" bibfile
bibstyle))
        ad-do-it)))

(ad-activate 'org-latex-keyword)

in my personal Org mode setup. However, it does not work. The advice is
called and returns the string,
but somehow it is not inserted in the buffer. If I do the same thing in
ox-latex.el:org-latex-keyword function,
it does work. Any idea why ?

Fabrice


2013/5/6 Suvayu Ali <fatkasuvayu+li...@gmail.com>

> On Mon, May 06, 2013 at 04:26:16PM +0200, Fabrice Popineau wrote:
> > Is it me or is it normal that the:
> >
> > #+Bibliography: foo plain
> >
> > line is not exported by the LaTeX backend?
> >
> > I assume that:
> > \bibliography{foo}
> > \bibliographystyle{plain}
> > is a decent way to handle it.
>
> Sometime back there was talk about integrating bibliography in the Org
> syntax.  That would make it backend agnostic (always a goal with most
> Org features).  If you are interested, take a look at the following
> thread.
>
>   <http://thread.gmane.org/gmane.emacs.orgmode/67488/focus=67521>
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>
>


-- 
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------

Reply via email to