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/
20 Note: Many languages in this table still require documentation. A
21 template is provided [[http://orgmode.org/w/?p=worg.git;a=blob;f=org-contrib/babel/languages/ob-doc-template.org;hb=HEAD][in the worg git repository]] for the addition of
22 language documentation.
24 #+Caption: Babel has support for the following languages.
25 | Language | Identifier | Documentation | Requirements |
26 |----------------+-----------------+----------------------+---------------------------------------------|
27 | Asymptote | asymptote | [[file:languages/ob-doc-asymptote.org][ob-doc-asymptote]] | [[http://asymptote.sourceforge.net/][asymptote]], [[http://asymptote.sourceforge.net/doc/Editing-modes.html][asy-mode]] |
28 | Awk | awk | [[file:languages/ob-doc-awk.org][ob-doc-awk]] | awk |
29 | C | c | [[file:languages/ob-doc-C.org][ob-doc-C]] | none |
30 | C++ | cpp | [[file:languages/ob-doc-C.org][ob-doc-C]] | none |
31 | Calc | calc | | none |
32 | Clojure | clojure | [[file:languages/ob-doc-clojure.org][ob-doc-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]] |
33 | CSS | css | | none |
34 | Ditaa | ditaa | [[file:languages/ob-doc-ditaa.org][ob-doc-ditaa]] | [[http://ditaa.org/ditaa/][ditaa]] (bundled with Org-mode) |
35 | Dot (Graphviz) | dot | [[file:languages/ob-doc-dot.org][og-doc-dot]] | [[http://www.graphviz.org/][dot]] |
36 | Emacs Lisp | emacs-lisp | | none |
37 | Eukleides | eukleides | [[file:languages/ob-doc-eukleides.org][ob-doc-eukleides]] | [[http://eukleides.org/][eukleides]] |
38 | Fomus | fomus (contrib) | | [[http://fomus.sourceforge.net/][fomus (music notation)]] |
39 | Fortran | F90 | | fortran |
40 | Gnuplot | gnuplot | [[file:languages/ob-doc-gnuplot.org][ob-doc-gnuplot]] | [[http://www.gnuplot.info/][gnuplot]], [[http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html][gnuplot-mode]] |
41 | 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]] |
42 | Java | java | | java |
43 | Javascript | js | | [[http://nodejs.org/][node.js]] |
44 | LaTeX | latex | [[file:languages/ob-doc-LaTeX.org][ob-doc-latex]] | [[http://www.latex-project.org/][latex]], [[http://www.gnu.org/software/auctex/][auctex]], [[http://www.gnu.org/software/auctex/reftex.html][reftex]] |
45 | Ledger | ledger | [[file:languages/ob-doc-ledger.org][ob-doc-ledger]] | [[http://wiki.github.com/jwiegley/ledger/][ledger]] |
46 | Lilypond | ly | [[file:languages/ob-doc-lilypond.org][ob-doc-lilypond]] | [[http://lilypond.org/][lilypond music notation]] |
47 | Lisp | lisp | | [[http://common-lisp.net/project/slime/][slime]] |
48 | Mathomatic | mathomatic | [[file:languages/ob-doc-mathomatic.org][ob-doc-mathomatic]] | [[http:www.mathomatic.org][Mathomatic]] |
49 | Matlab | matlab | [[file:languages/ob-doc-octave-matlab.org][ob-doc-octave-matlab]] | matlab, [[http://sourceforge.net/projects/matlab-emacs/][matlab.el]] |
50 | Maxima | max | | maxima |
51 | Mscgen | mscgen | [[file:languages/ob-doc-mscgen.org][ob-doc-mscgen]] | [[http://www.mcternan.me.uk/mscgen/][Mscgen]] |
52 | Objective Caml | ocaml | | [[http://caml.inria.fr/][ocaml]], [[http://www-rocq.inria.fr/~acohen/tuareg/][tuareg-mode]] |
53 | Octave | octave | [[file:languages/ob-doc-octave-matlab.org][ob-doc-octave-matlab]] | octave |
54 | Org | org | | none |
55 | OZ | oz (contrib) | [[file:languages/ob-doc-oz.org][ob-doc-oz]] | [[http://www.mozart-oz.org/][Mozart]] which includes a major mode |
56 | Perl | perl | | [[http://www.perl.org/][perl]], [[http://www.emacswiki.org/emacs/CPerlMode][cperl-mode]] (optional) |
57 | Picolisp | picolisp | [[file:languages/ob-doc-picolisp.org][ob-doc-picolisp]] | [[http://picolisp.com/5000/!wiki?home][PicoLisp]] |
58 | PlantUML | plantuml | | |
59 | Python | python | | [[http://www.python.org/][python]], [[https://launchpad.net/python-mode][python-mode]] (optional) |
60 | R | R | [[file:languages/ob-doc-R.org][ob-doc-R]] | [[http://www.r-project.org/][R]], [[http://ess.r-project.org/][ess-mode]], [[http://cran.r-project.org/web/packages/tikzDevice/index.html][tikzDevice]] |
61 | 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]] |
62 | Sass | sass | | [[http://sass-lang.com/][sass]], [[http://github.com/nex3/haml/blob/master/extra/sass-mode.el][sass-mode]] |
63 | Scheme | scheme | | none |
64 | Shen | shen | | shen |
65 | shell | sh | | a shell |
66 | SQL | sql | | none |
67 | Sqlite | sqlite | | none |
68 | Tcl | tcl | [[file:languages/ob-doc-tcl.org][ob-doc-tcl]] | [[http://www.tcl.tk/][tclsh]] |
71 * Configure active languages
75 To add support for a particular language to your Babel installation
76 first make sure that the requirements of the language are met, then
77 you may customize the =org-babel-load-languages= variable, update the
78 variable's value manually by adding[fn:1]
80 to its definition. A line like the following to explicitly /remove/
81 support for a language.
84 Here is an example manual configuration of this variable, which
85 enables support for =R=, and disables support for =emacs-lisp=.
86 #+begin_src emacs-lisp :exports code
87 ;; active Babel languages
88 (org-babel-do-load-languages
89 'org-babel-load-languages
95 * Develop support for new languages
99 The core Babel functions (viewing, export, tangling, etc...) are
100 language agnostic and will work even for languages that are not
101 explicitly supported. Explicit language-specific support is required
102 only for evaluation of code blocks in a language.
104 Babel is designed to be easily extended to support new languages.
105 Language support is added by defining language-specific functions
106 using a simple naming convention. The full suite of possible language
107 specific functions need not be implemented all at once, but rather it
108 is possible (and encouraged) to develop language-specific
109 functionality in an incremental fashion -- Babel will make use of
110 those functions which are available, and will fail gracefully when
111 functionality has not yet been implemented.
113 There is a short Emacs Lisp template ([[http://orgmode.org/w/worg.git/blob/HEAD:/org-contrib/babel/ob-template.el][ob-template.el]]) which can be used as
114 a starting point for implementing support for new languages. Developers
115 are encouraged to read the [[file:~/install/git/worg/org-contribute.org][Org-mode contribution instructions]] in the hope
116 that the language support can be included into the Org-mode core.
120 [fn:1] languages in the contrib directory are marked with "(contrib)"
121 in the "Identifier" section above are not loadable through the
122 =org-babel-do-load-languages= variable, but rather must be
123 explicitly required (e.g. =(require 'ob-oz)=) after the contrib
124 directory has been added to you load path.