summaryrefslogtreecommitdiff
path: root/lisp/init-babel.el
blob: 2df25d364de0f9bde2cb1186c0c8542ee3fd6c22 (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
;; 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
      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)