changes to Org-babel documentation

This commit is contained in:
Eric Schulte 2009-08-05 08:02:25 -06:00
parent cf0be4465b
commit 692efeac68
5 changed files with 68 additions and 17 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -1,6 +1,6 @@
#+title: The Library of Babel #+title: The Library of Babel
#+SEQ_TODO: TODO PROPOSED | DONE DEFERRED REJECTED #+SEQ_TODO: TODO PROPOSED | DONE DEFERRED REJECTED
#+OPTIONS: H:3 num:nil toc:t #+OPTIONS: H:3 num:nil toc:2 \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
#+STARTUP: odd hideblocks #+STARTUP: odd hideblocks
#+begin_html #+begin_html
@ -13,12 +13,28 @@
<div id="logo"> <div id="logo">
<p> <p>
<img src="images/library-of-babel.png" alt="images/tower-of-babel.png" /> <img src="images/library-of-babel.png" alt="images/tower-of-babel.png" />
<div id="attr">from <a href="http://asymptotia.com/category/books/">asymptotia</a></div> <div id="attr">
from <a href="http://www.poetryfoundation.org/harriet/2008/01/random-poetry-02/">poetryfoundation.org</a>
</div>
</p> </p>
</div> </div>
#+end_html #+end_html
* Introduction
The Library of Babel is an extensible collection of ready-made and
easily-shortcut-callable source-code blocks for handling common
tasks. Org-babel comes pre-populated with the source-code blocks
located in this file. It is possible to add source-code blocks from
any org-mode file to the library by calling
#+srcname: add-file-to-lob
#+begin_src emacs-lisp
(org-babel-lob-ingest "path/to/file.org")
#+end_src
* Plotting code * Plotting code
** R
Plot column 2 (y axis) against column 1 (x axis). Columns 3 and beyond, if present, are ignored. Plot column 2 (y axis) against column 1 (x axis). Columns 3 and beyond, if present, are ignored.
#+srcname: R-plot(data=R-plot-example-data) #+srcname: R-plot(data=R-plot-example-data)
@ -38,7 +54,9 @@ plot(data)
#+resname: R-plot(data=R-plot-example-data) #+resname: R-plot(data=R-plot-example-data)
: nil : nil
* Etc ** Gnuplot
* Misc
#+srcname: python-identity(a=1) #+srcname: python-identity(a=1)
#+begin_src python #+begin_src python
a a

View File

@ -15,7 +15,10 @@
<div id="logo"> <div id="logo">
<p> <p>
<img src="images/tower-of-babel.png" alt="images/tower-of-babel.png" /> <img src="images/tower-of-babel.png" alt="images/tower-of-babel.png" />
<div id="attr">from <a href="http://www.flickr.com/photos/23379658@N05/" title=""><b>Martijn Streefkerk</b></a></div> <div id="attr">
from
<a href="http://www.flickr.com/photos/23379658@N05/" title=""><b>Martijn Streefkerk</b></a>
</div>
</p> </p>
</div> </div>
#+end_html #+end_html
@ -25,6 +28,16 @@
support]] for blocks of source code examples in the org-mode core. support]] for blocks of source code examples in the org-mode core.
1. source code execution 1. source code execution
2. arguments to source code blocks 2. arguments to source code blocks
3. exportation of source code blocks to files (literate programming)
* Getting started
Add the following lines to your .emacs, replacing the path as
appropriate. A good place to check that things are up and running
would the examples in [[* Basic org-babel functionality][Basic org-babel functionality]].
#+begin_src emacs-lisp
(add-to-list 'load-path "/path/to/org-babel/lisp")
(require 'org-babel-init)
#+end_src
* Basic org-babel functionality * Basic org-babel functionality
*** Source code execution *** Source code execution
@ -85,10 +98,14 @@ c(5, 10)
* A meta-programming language for org-mode * A meta-programming language for org-mode
* Spreadsheet plugins for org-mode in any language * Spreadsheet plugins for org-mode in any language
* Library of Babel * Library of Babel
Org-babel support saving of source-code blocks in a library from which What about those source code blocks which are so useful you want to
they can be call in any org-mode file. This library is called the have them available in every org-mode buffer?
[[file:library-of-babel.org][Library of Babel]]. It is possible to add source-code blocks from any
org-mode file to the library by calling The [[file:library-of-babel.org][Library of Babel]] is an extensible collection of ready-made and
easily-shortcut-callable source-code blocks for handling common
tasks. Org-babel comes pre-populated with the source-code blocks
located in the [[file:library-of-babel.org][library-of-babel.org]] file. It is possible to add
source-code blocks from any org-mode file to the library by calling
#+srcname: add-file-to-lob #+srcname: add-file-to-lob
#+begin_src emacs-lisp #+begin_src emacs-lisp

View File

@ -1,13 +1,24 @@
#+TITLE: org-babel --- facilitating communication between programming languages and people #+TITLE: org-babel --- facilitating communication between programming languages and people
#+SEQ_TODO: PROPOSED TODO STARTED | DONE DEFERRED REJECTED #+SEQ_TODO: PROPOSED TODO STARTED | DONE DEFERRED REJECTED
#+OPTIONS: H:3 num:nil toc:t #+OPTIONS: H:3 num:nil toc:2 \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
#+STARTUP: oddeven hideblocks #+STARTUP: oddeven hideblocks
Through Org-Babel Org-Mode can communicate with programming languages. #+begin_html
Code contained in source-code blocks can be evaluated and data can <div id="subtitle">
pass seamlessly between different programming languages, Org-Mode <p>executable source code blocks in org-mode</p>
constructs (tables, file links, example text) and interactive comint </div>
buffers. <div id="logo">
<p>
<img src="images/tower-of-babel.png" alt="images/tower-of-babel.png" />
<div id="attr">from <a href="http://www.flickr.com/photos/23379658@N05/" title=""><b>Martijn Streefkerk</b></a></div>
</p>
</div>
#+end_html
Org-Babel makes source-code blocks in Org-Mode executable and allows
data to pass seamlessly between different programming languages,
Org-Mode constructs (tables, file links, example text) and interactive
comint buffers.
In this document: In this document:
- The [[* Introduction][Introduction]] :: provides a brief overview of the design and use - The [[* Introduction][Introduction]] :: provides a brief overview of the design and use

View File

@ -1,5 +1,7 @@
#+TITLE: Tools for publishing Org-babel documentation #+TITLE: Tools for publishing Org-babel documentation
#+OPTIONS: toc:nil num:nil ^:nil #+OPTIONS: toc:t h:3 num:nil ^:nil
This file contains the code required to export the documentation of Org-babel.
* org-babel-documentation Project * org-babel-documentation Project
@ -25,6 +27,9 @@ publishing. Publish a project with =C-c C-e X=.
* org-babel-documentation stylesheet * org-babel-documentation stylesheet
Calling =org-babel-tangle= in this file will export the css file for
the Org-babel documentation.
#+begin_src css :tangle doc/stylesheet #+begin_src css :tangle doc/stylesheet
#logo { #logo {
float:right; float:right;