emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Fabrice Popineau <fabrice.popineau@supelec.fr>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Bibliography
Date: Mon, 06 May 2013 20:51:07 +0200	[thread overview]
Message-ID: <87wqrcdjs4.fsf@gmail.com> (raw)
In-Reply-To: <CAFgFV9MDBE=cC6v4pygW_EKQMhmknm7nxcJuUC+xZH_m_BqhHw@mail.gmail.com> (Fabrice Popineau's message of "Mon, 6 May 2013 19:21:31 +0200")

Hello,

Fabrice Popineau <fabrice.popineau@supelec.fr> 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

  reply	other threads:[~2013-05-06 18:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06 14:26 Bibliography Fabrice Popineau
2013-05-06 14:50 ` Bibliography Suvayu Ali
2013-05-06 17:21   ` Bibliography Fabrice Popineau
2013-05-06 18:51     ` Nicolas Goaziou [this message]
2013-05-06 18:55       ` Bibliography Fabrice Popineau
2013-05-06 18:59         ` Bibliography Nicolas Goaziou
2013-05-07  5:37           ` Bibliography Vikas Rawal
2013-05-07 16:48             ` Bibliography Nicolas Goaziou
2013-05-09  7:58               ` Bibliography Vikas Rawal
2013-05-09  9:43                 ` Bibliography Vikas Rawal
2013-05-09  9:28               ` Bibliography Vikas Rawal
2013-05-09  9:44                 ` Bibliography Vikas Rawal
2013-05-09 16:03                 ` Bibliography Rafael
2013-05-10 11:51                   ` Bibliography Vikas Rawal
2013-05-10 11:54                   ` Bibliography Vikas Rawal
2013-05-12  3:55                     ` Bibliography Rafael
2013-05-09 18:21                 ` Bibliography Nicolas Goaziou
2013-05-09 19:23                   ` Bibliography Fabrice Popineau
2013-05-10  2:56                   ` Bibliography Vikas Rawal
2013-05-12 12:57                     ` Bibliography Nicolas Goaziou
2013-05-12 23:56                       ` Bibliography Vikas Rawal
2013-05-13  0:49                         ` Bibliography Vikas Rawal
2013-05-14  9:06                           ` Bibliography Fabrice Popineau
2013-05-16 17:47                             ` Bibliography Nicolas Goaziou
2013-05-16 16:12                       ` Bibliography Vikas Rawal
2013-05-16 17:44                         ` Bibliography Nicolas Goaziou
2013-05-17  0:37                           ` Bibliography Vikas Rawal
2013-05-09 13:18               ` Bibliography Vikas Rawal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqrcdjs4.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fabrice.popineau@supelec.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).