1 #+OPTIONS: H:3 num:nil toc:3 \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:nil skip:nil d:(HIDE) tags:not-in-toc
2 #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate hideblocks
3 #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
4 #+TAGS: Write(w) Update(u) Fix(f) Check(c) noexport(n)
5 #+TITLE: Babel: Languages
6 #+AUTHOR: Eric Schulte, Dan Davison, Tom Dye
7 #+EMAIL: schulte.eric at gmail dot com, davison at stats dot ox dot ac dot uk, tsd at tsdye dot com
9 #+STYLE: <style type="text/css">#outline-container-langs{ clear:both; }</style>
10 #+STYLE: <style type="text/css">#outline-container-syntax{ clear:both; }</style>
11 #+STYLE: <style type="text/css">#table-of-contents{ max-width:100%; }</style>
13 #+LINK_HOME: http://orgmode.org/worg/
16 <div id="subtitle" style="float: center; text-align: center;">
17 <p>executable source code blocks in org-mode</p>
19 <div id="logo2" style="float: center; text-align: center; max-width: 340px;
20 font-size: 8pt; margin: auto;">
22 <img src="../../images/babel/babelfish.png" alt="Babel Fish"/>
24 The Babel Fish is small, yellow, and simultaneously translates
25 from one spoken language to another.
28 – The Hitchhiker's Guide to the Galaxy, Douglas Adams
39 #+Caption: Babel has support for the following languages.
40 | Language | Documentation | Identifier | Requirements |
41 |----------------+----------------------+-----------------+---------------------------------------------|
42 | Asymptote | ob-doc-asymptote | asymptote | [[http://asymptote.sourceforge.net/][asymptote]], [[http://asymptote.sourceforge.net/doc/Editing-modes.html][asy-mode]] |
43 | Awk | ob-doc-awk | awk | Awk |
44 | C | [[file:languages/ob-doc-C.org][ob-doc-C]] | c | none |
45 | C++ | [[file:languages/ob-doc-C.org][ob-doc-C]] | cpp | none |
46 | Calc | [ob-doc-calc | calc | none |
47 | Clojure | [[file:languages/ob-doc-clojure.org][ob-doc-clojure]] | clojure | [[http://clojure.org/][clojure]], [[http://www.emacswiki.org/emacs/clojure-mode.el][clojure-mode]], [[http://common-lisp.net/project/slime/][slime]], [[http://clojure.codestuffs.com/][swank-clojure]] |
48 | CSS | ob-doc-css | css | none |
49 | Ditaa | ob-doc-ditaa | ditaa | [[http://ditaa.org/ditaa/][ditaa]] (bundled with Org-mode) |
50 | Dot (Graphviz) | ob-doc-dot | dot | [[http://www.graphviz.org/][dot]] |
51 | Emacs Lisp | ob-doc-emacs-lisp | emacs-lisp | none |
52 | Fomus | ob-doc-fomus | fomus (contrib) | [[http://fomus.sourceforge.net/][fomus (music notation)]] |
53 | Fortran | ob-doc-fortran | F90 | fortran |
54 | Gnuplot | [[file:languages/ob-doc-gnuplot.org][ob-doc-gnuplot]] | gnuplot | [[http://www.gnuplot.info/][gnuplot]], [[http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html][gnuplot-mode]] |
55 | Haskell | ob-doc-haskell | haskell | [[http://www.haskell.org/][haskell]], [[http://projects.haskell.org/haskellmode-emacs/][haskell-mode]], [[http://www.haskell.org/haskellwiki/Haskell_mode_for_Emacs#inf-haskell.el:_the_best_thing_since_the_breadknife][inf-haskell]], [[http://people.cs.uu.nl/andres/lhs2tex/][lhs2tex]] |
56 | Java | ob-doc-java | java | java |
57 | Javascript | ob-doc-js | js | [[http://nodejs.org/][node.js]] |
58 | LaTeX | [[file:languages/ob-doc-LaTeX.org][ob-doc-latex]] | latex | [[http://www.latex-project.org/][latex]], [[http://www.gnu.org/software/auctex/][auctex]], [[http://www.gnu.org/software/auctex/reftex.html][reftex]] |
59 | Ledger | [[file:languages/ob-doc-ledger.org][ob-doc-ledger]] | ledger | [[http://wiki.github.com/jwiegley/ledger/][ledger]] |
60 | Lilypond | [[file:languages/ob-doc-lilypond.org][ob-doc-lilypond]] | ly | [[http://lilypond.org/][lilypond music notation]] |
61 | Lisp | ob-lisp | lisp | [[http://common-lisp.net/project/slime/][slime]] |
62 | Matlab | [[file:languages/ob-doc-octave-matlab.org][ob-doc-octave-matlab]] | matlab | matlab, [[http://sourceforge.net/projects/matlab-emacs/][matlab.el]] |
63 | Maxima | ob-doc-maxima | max | maxima |
64 | Mscgen | [[file:languages/ob-doc-mscgen.org][ob-doc-mscgen]] | mscgen | [[http://www.mcternan.me.uk/mscgen/][Mscgen]] |
65 | Objective Caml | ob-doc-ocaml | ocaml | [[http://caml.inria.fr/][ocaml]], [[http://www-rocq.inria.fr/~acohen/tuareg/][tuareg-mode]] |
66 | Octave | [[file:languages/ob-doc-octave-matlab.org][ob-doc-octave-matlab]] | octave | octave |
67 | Org | ob-doc-org | org | none |
68 | OZ | [[file:languages/ob-doc-oz.org][ob-doc-oz]] | oz (contrib) | [[http://www.mozart-oz.org/][Mozart]] which includes a major mode |
69 | Perl | ob-doc-perl | perl | [[http://www.perl.org/][perl]], [[http://www.emacswiki.org/emacs/CPerlMode][cperl-mode]] (optional) |
70 | Picolisp | ob-doc-picolisp | l (contrib) | Picolisp |
71 | PlantUML | ob-doc-plantuml | plantuml | |
72 | Python | ob-doc-python | python | [[http://www.python.org/][python]], [[https://launchpad.net/python-mode][python-mode]] (optional) |
73 | R | [[file:languages/ob-doc-R.org][ob-doc-R]] | R | [[http://www.r-project.org/][R]], [[http://ess.r-project.org/][ess-mode]] |
74 | Ruby | ob-doc-ruby | ruby | [[http://www.ruby-lang.org/][ruby]], [[http://www.ruby-lang.org/][irb]], [[http://github.com/eschulte/rinari/raw/master/util/ruby-mode.el][ruby-mode]], [[http://github.com/eschulte/rinari/raw/master/util/inf-ruby.el][inf-ruby mode]] |
75 | Sass | ob-doc-sass | sass | [[http://sass-lang.com/][sass]], [[http://github.com/nex3/haml/blob/master/extra/sass-mode.el][sass-mode]] |
76 | Scheme | ob-doc-scheme | scheme | none |
77 | Shen | ob-doc-shen | shen | shen |
78 | shell | ob-doc-sh | sh | a shell |
79 | SQL | ob-doc-sql | sql | none |
80 | Sqlite | ob-sqlite | sqlite | none |
82 * Configure active languages
86 To add support for a particular language to your Babel installation
87 first make sure that the requirements of the language are met, then
88 you may customize the =org-babel-load-languages= variable, update the
89 variable's value manually by adding[fn:1]
91 to it's definition. A line like the following to explicitly /remove/
92 support for a language.
95 Here is an example manual configuration of this variable, which
96 enables support for =R=, and disables support for =emacs-lisp=.
97 #+begin_src emacs-lisp :exports code
98 ;; active Babel languages
99 (org-babel-do-load-languages
100 'org-babel-load-languages
106 * Develop support for new languages
110 The core Babel functions (viewing, export, tangling, etc...) are
111 language agnostic and will work even for languages that are not
112 explicitly supported. Explicit language-specific support is required
113 only for evaluation of code blocks in a language.
115 Babel is designed to be easily extended to support new languages.
116 Language support is added by defining language-specific functions
117 using a simple naming convention. The full suite of possible language
118 specific functions need not be implemented all at once, but rather it
119 is possible (and encouraged) to develop language-specific
120 functionality in an incremental fashion -- Babel will make use of
121 those functions which are available, and will fail gracefully when
122 functionality has not yet been implemented.
124 There is a short Emacs Lisp template ([[http://repo.or.cz/w/Worg.git/blob/HEAD:/org-contrib/babel/ob-template.el][ob-template.el]]) which can be
125 used as a starting point for implementing support for new languages.
126 Developers are encouraged to read the [[file:~/src/worg/org-contribute.org][Org-mode contribution
127 instructions]] in the hopes that the language support can be included
128 into the Org-mode core.
132 [fn:1] languages in the contrib directory are marked with "(contrib)"
133 in the "Identifier" section above are not loadable through the
134 =org-babel-do-load-languages= variable, but rather must be
135 explicitly required (e.g. =(require 'ob-oz)=) after the contrib
136 directory has been added to you load path.