On Wed, Jul 28 2010, Rainer M Krug wrote: > I have a .org file (lets call it basic.org), which creates me a report > from a simulation (of a variable x, saved from R) - it works fine for > export to html and pdf. > > Now I want to create a report (all.org), which should include the report > from basic.org 10 times, but basic.report should be created from > different simulations (X1, X2, X3, ..., X10). > > How can I acieve this, without having to copy - paste the .org file in > 10 times? I would like to have a kind of dynamic lining, so that I can > > a) specify the name of the variable to be analysed > b) the all.org is using basic.org to create the "all" report, so that > when I change basic.org, the report based on all.org is also changed.
To start, you probably want to use the #+SETUPFILE and #+INCLUDE
directives [fn:1] [fn:2]. An untested Babel-based dynamic solution
might look something like
--8<---------------cut here---------------start------------->8---
#+BEGIN_SRC perl :results value org :var $n=10 $file=basic.org
# I've never actually used per with babel,
# so don't know how the :var headers work exactly
for (my $i = 0; $i < $n; $i++) {
print "#+INCLUDE: $file\n";
}
#+END_SRC
--8<---------------cut here---------------end--------------->8---
Hope that helps! Let me know what you come up with.
/au
Footnotes:
[fn:1] [[info:org:Export%20options][Export options]]
[fn:2] [[info:org:Include%20files][Include files]]
--
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc
pgpVQUrBZdszB.pgp
Description: PGP signature
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. [email protected] http://lists.gnu.org/mailman/listinfo/emacs-orgmode
