[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Selective export of Babel code blocks
From: |
suvayu ali |
Subject: |
Re: [O] Selective export of Babel code blocks |
Date: |
Mon, 18 Jun 2012 18:08:02 +0200 |
Hi John,
On Mon, Jun 18, 2012 at 4:53 PM, John Hendy <address@hidden> wrote:
> Doing this got me to thinking how it would be
> quite neat to run code in a block but mark it to be omitted from
> export for these kind of "setup" lines that are necessary for the
> desired graphs but unnecessary for your reader to see over and over
> again.
>
> Thoughts? I'm quite a novice and very possibly missed something that
> can already do this.
Hopefully I understood your question correctly. My solution to "setup"
code blocks is use the noweb syntax. Following is an example with Gnuplot.
#+PROPERTY: noweb yes
#+PROPERTY: results silent
#+BIND: org-confirm-babel-evaluate nil
* Gnuplot source
#+name: preamble
#+begin_src gnuplot
reset
set terminal pdfcairo color size 21cm,14.8cm
set termoption enhanced
set encoding utf8
set termoption font "DejaVuSerif,8"
# ...
#+end_src
#+begin_src gnuplot :noweb yes :var limits=Bpluslimits
<<preamble>>
plot "$limits" using 1:2 title 'Theory' set output
#+end_src
* Table
#+tblname: Bpluslimits
| | Theory |
| | |
|---+---------|
| 1 | 3.6E-14 |
| 2 | 3.6E-14 |
| 3 | 6.3E-13 |
| 4 | 6.3E-13 |
| 5 | 1.7E-14 |
| 6 | 1.7E-14 |
| 7 | |
#+tblfm: $1=(@#-2)
* COMMENT local setup
# Local Variables:
# org-export-allow-BIND: t
# End:
HTH
--
Suvayu
Open source is the future. It sets us free.
- [O] Selective export of Babel code blocks, John Hendy, 2012/06/18
- Re: [O] Selective export of Babel code blocks,
suvayu ali <=
- Re: [O] Selective export of Babel code blocks, Thomas S. Dye, 2012/06/18
- Re: [O] Selective export of Babel code blocks, suvayu ali, 2012/06/18
- Re: [O] Selective export of Babel code blocks, John Hendy, 2012/06/18
- Re: [O] Selective export of Babel code blocks, Andreas Leha, 2012/06/18
- Re: [O] Selective export of Babel code blocks, Thomas S. Dye, 2012/06/18
- Re: [O] Selective export of Babel code blocks, suvayu ali, 2012/06/19
- Re: [O] Selective export of Babel code blocks, John Hendy, 2012/06/19