Welcome to Org Babel reference card. It contains the reference documentation that describes how to perform code execution within Org mode documents using Org BabelĀ 8.
In a nutshell, Org Babel is like Sweave (for reproducible research (See section 2)) but it takes a large number of possible languages (C, Java, Python, Ruby, R, …) and Org mode can produce HTML as well as PDF.
Literate Programming
Literate programming (LP) offers 2 classical operations:
-
Tangle: Extract the source code blocks and generate real working code files for further compilation or execution, eventually outside of Emacs.
-
Weave: Export the whole Org file as literate, human-readable documentation (generally in HTML or LaTeX).
Reproducible Research
Above those, Org Babel adds in situ code evaluation:
- during interactive use (in the Org buffer itself),
- during tangle, and/or
- during weave (code blocks with
:exports
set toresults
orboth
)
This allows you to insert in your Org document:
- all data (that can reasonably be included),
- all code you used, and
- the full set of outputs you got,
following the principles of reproducible research (RR).