I'm trying add syntax highlighting when exporting from org to latex using minted , however when i try to compile it to a pdf , the code block doesn't even show up and after few searching i found this .

\begin{minted}[]{common-lisp} (defun Fib (n) (if (< n 2) n (+ (Fib (- n 1)) (Fib (- n 2))))) \end{minted} 

when running org-latex-export-to-latex for some reason it adds [] which causes it to not to work , i have no idea why is this happening .

here's my emacs config.

;; Code Highlight (require 'ox-latex) (setq org-latex-listings 'minted) 

and in test.org

#+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [letterpaper] #+LATEX_HEADER: \usepackage{minted} #+OPTIONS: toc:t 

When removing [] it then compiles like expected with code block and syntax highlighting.

submitted by /u/Ybenel
[link] [comments]