After inspecting the LaTeX generated for my org-mode file, I figured out that the code blocks are exported with the verbatim
environment. Are there any way to tell org-mode to export code blocks using the minted
environment for the appropriated language?
Asked
Active
Viewed 7,642 times
15

Jeff
- 537
- 4
- 13
-
possibly see http://emacs.stackexchange.com/questions/20839/exporting-code-blocks-to-pdf-via-latex/20841#20841 – JeanPierre Oct 21 '16 at 06:49
1 Answers
24
You will need to tell Org to
- Use minted for listings
- Include minted in the default package list
- Change the compilation switches to accommodate for minted:
(setq org-latex-listings 'minted org-latex-packages-alist '(("" "minted")) org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))

wasamasa
- 21,803
- 1
- 65
- 97