1 line
1.3 KiB
Plaintext
1 line
1.3 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>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 .</p> <pre><code>\begin{minted}[]{common-lisp} (defun Fib (n) (if (< n 2) n (+ (Fib (- n 1)) (Fib (- n 2))))) \end{minted} </code></pre> <p>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 .</p> <p>here's my emacs config.</p> <pre><code>;; Code Highlight (require 'ox-latex) (setq org-latex-listings 'minted) </code></pre> <p>and in <a href="https://test.org/">test.org</a></p> <pre><code>#+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [letterpaper] #+LATEX_HEADER: \usepackage{minted} #+OPTIONS: toc:t </code></pre> <p>When removing [] it then compiles like expected with code block and syntax highlighting.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Ybenel"> /u/Ybenel </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/pmpi40/help_how_to_get_rid_of_when_exporting_org_to_latex/">[link]</a></span>   <span><a href="https://www.reddit.com/r/orgmode/comments/pmpi40/help_how_to_get_rid_of_when_exporting_org_to_latex/">[comments]</a></span> |