Emacs Orgmode Minted Setup

How to setup orgmode pdf export with minted on Arch Linux

Guowei Lv

1 minute read

Install minted package

https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages

Install Pygments

https://pygments.org/

Configure Emacs

(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"
        "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))

Remove cached minted* dirs

This is the step that unblocked me.

Prevent src block line too long

(setq org-latex-minted-options '(("breaklines" "true")
                                 ("breakanywhere" "true")))
comments powered by Disqus