[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] conditional export based on target

From: Juan Pechiar
Subject: Re: [Orgmode] conditional export based on target
Date: Sat, 23 Oct 2010 21:46:08 -0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Oct 07, 2010 at 01:24:28AM -0300, Ezequiel Birman wrote:
> Is there something like conditional export? I'd like to use tikz when
> exporting to latex but my own hand-made ascii drawing when exporting to
> ascii/latin1/utf8.


I've been thinking on your request, and today this appeared on the
list which is quite similar:


It seems as if block settings can be lisp function calls rather than a
fixed string.

So, for example:

** Test conditional export

#+source: test_output
#+begin_src octave :results value vector :exports (if (and (boundp 'htmlp) 
htmlp) "none" "results" )

#+results: test_output
| 0.3982018019389448 | 0.3879818701032038 |
| 0.8053847746148466 | 0.3333630867175288 |

Will export nothing to HTML, and the resulting output to other

Values for 'exports' can be 'both', 'none', 'code' or 'results'; and
there are export flags latexp, htmlp, asciip, docbookp.

I tested the above example, and it "mostly" works. Sometimes not, and
I don't yet know why.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]