[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bibliography
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Bibliography |
Date: |
Mon, 06 May 2013 20:51:07 +0200 |
Hello,
Fabrice Popineau <address@hidden> writes:
> 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.
Since it is back-end dependent, why don't you use:
#+latex: \bibliography{...}\bibilographystyle{...}
instead?
> 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 ?
You need to set `ad-return-value' somewhere, don't you?
Regards,
--
Nicolas Goaziou
- [O] Bibliography, Fabrice Popineau, 2013/05/06
- Re: [O] Bibliography, Suvayu Ali, 2013/05/06
- Re: [O] Bibliography, Fabrice Popineau, 2013/05/06
- Re: [O] Bibliography,
Nicolas Goaziou <=
- Re: [O] Bibliography, Fabrice Popineau, 2013/05/06
- Re: [O] Bibliography, Nicolas Goaziou, 2013/05/06
- Re: [O] Bibliography, Vikas Rawal, 2013/05/07
- Re: [O] Bibliography, Nicolas Goaziou, 2013/05/07
- Re: [O] Bibliography, Vikas Rawal, 2013/05/09
- Re: [O] Bibliography, Vikas Rawal, 2013/05/09
- Re: [O] Bibliography, Vikas Rawal, 2013/05/09
- Re: [O] Bibliography, Vikas Rawal, 2013/05/09
- Re: [O] Bibliography, Rafael, 2013/05/09
- Re: [O] Bibliography, Vikas Rawal, 2013/05/10