[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] new exporter, conditional options according to backend
From: |
Nicolas Goaziou |
Subject: |
Re: [O] new exporter, conditional options according to backend |
Date: |
Fri, 25 Jan 2013 14:23:41 +0100 |
Hello,
Andreas Leha <address@hidden> writes:
> Sorry for hijacking this thread. But I am also interested in backend
> specific options. Could you give an example of how to achieve something
> like this with the new exporter:
>
> #+begin_src R :results graphics :file (if (and (boundp
> 'org-export-current-backend) (eq org-export-current-backend 'e-latex))
> "foo.pdf" "foo.png")
> plot(1:10)
> #+end_src
You need to process the buffer being exported before Babel blocks are
expanded. You could use `org-export-before-processing-hook' for that.
For example, you could define a specific extension for :file values,
like "foo.xxx", process the buffer and and replace "xxx" with an
appropriate extension according to the current back-end (the argument of
the function).
Regards,
--
Nicolas Goaziou
- [O] new exporter, conditional options according to backend, Ezequiel Birman, 2013/01/18
- Re: [O] new exporter, conditional options according to backend, Andreas Leha, 2013/01/24
- Re: [O] new exporter, conditional options according to backend,
Nicolas Goaziou <=
- Re: [O] new exporter, conditional options according to backend, cberry, 2013/01/25