From: Juan Pechiar <juan@pechiar.com>
To: Ezequiel Birman <stormwatch@espiga4.com.ar>
Cc: emacs-orgmode@gnu.org
Subject: Re: conditional export based on target
Date: Sat, 23 Oct 2010 21:46:08 -0200 [thread overview]
Message-ID: <20101023234608.GD14385@soloJazz.com> (raw)
In-Reply-To: <m3ocb6d403.fsf@david.espiga4.com.ar>
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.
Hi,
I've been thinking on your request, and today this appeared on the
list which is quite similar:
http://lists.gnu.org/archive/html/emacs-orgmode/2010-10/msg01106.html
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" )
rand(2)
#+end_src
#+results: test_output
| 0.3982018019389448 | 0.3879818701032038 |
| 0.8053847746148466 | 0.3333630867175288 |
------------------------------------------------------------
Will export nothing to HTML, and the resulting output to other
formats.
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.
BR
.j.
next prev parent reply other threads:[~2010-10-23 23:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 4:24 conditional export based on target Ezequiel Birman
2010-10-23 23:46 ` Juan Pechiar [this message]
2010-11-02 19:41 ` Ezequiel Birman
2010-11-02 23:37 ` Juan Pechiar
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101023234608.GD14385@soloJazz.com \
--to=juan@pechiar.com \
--cc=emacs-orgmode@gnu.org \
--cc=stormwatch@espiga4.com.ar \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.