I'm preparing a presentation and I'm getting using tangle to show code /and/
produce working code examples -- this is really cool.

It is possible to define a "template" and pass code blocks to it?
For example: (Using pseudo-org-babel-code for brevity)

#+template
header code
<<code_that_is_passed_to_me>>
footer code

#+example1 :render #+template with 1111111
1111111111

#+example2 :render #+template with 222222
222222222

The tangled output would be:

header code
11111111111
footer code

header code
2222222222
footer code

I'm already able to use org-babel like below, but I have to
put a <<footer>> and a <<header>> in each code block.

Here's my existing setup:
#+header
header code

#+footer
footer code

#+example1
<<header>>    <-- I have to specify these <<header>> and <<footer>> in
each code block
11111111111
<<footer>>

#+example2
<<header>>
2222222222
<<footer>>

Thanks again for org-babel -- I'll post my presentation when I get it done.

--Nate

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to