15

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?

1

1 Answer 1

24

You will need to tell Org to

  1. Use minted for listings
  2. Include minted in the default package list
  3. 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"))
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.