summaryrefslogtreecommitdiff
path: root/lisp/init-babel.el
blob: 561419d1c8fc8a0e3ae36f70d322302f52f1ffef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
;; Set up babel languages.
(org-babel-do-load-languages
 'org-babel-load-languages
 '((sh . t)
   (python . t)
   (R . t)
   (emacs-lisp . t)
   (latex . t)))

;; Don't ask for confirmation before running code.
(setq org-confirm-babel-evaluate nil)

;; Babel minted latex export
;; Modified from
;; http://orgmode.org/worg/org-tutorials/org-latex-export.html.
(setq org-export-latex-listings 'minted)
(setq org-export-latex-custom-lang-environments
      '((R "rcode")
        (sh "shcode")
        (python "pythoncode")))

(setq org-latex-to-pdf-process
      '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
        "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
        "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))

(provide 'init-babel)