emacs/var/elfeed/db/data/c0/c02614fc6e55275e1aba2d01635d63db99345304
2022-01-03 12:49:32 -06:00

1 line
1.3 KiB
Plaintext

<!-- SC_OFF --><div class="md"><p>I&#39;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&#39;t even show up and after few searching i found this .</p> <pre><code>\begin{minted}[]{common-lisp} (defun Fib (n) (if (&lt; 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&#39;s my emacs config.</p> <pre><code>;; Code Highlight (require &#39;ox-latex) (setq org-latex-listings &#39;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 --> &#32; submitted by &#32; <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> &#32; <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>