Hi Luca Luca Ferrari <fluca1...@gmail.com> writes:
> Thanks, but stil Im not able to figure it out. I've searched thru the > org documentation without any luck. > > Luca To use the minted package as backend (https://www.ctan.org/pkg/minted), I have in my Emacs: (setq org-latex-listings 'minted) (setq org-latex-minted-options '(("frame" "lines") ("linenos=true") ("breaklines"))) You also need to install the Python pigments library on your OS. In Arch (in my case) is the python-pygments package. And you have to make sure that when you export to LaTeX it always compiles with the -shell-escape option. For example: (setq org-latex-pdf-process '("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" "lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" "lualatex -shell-escape -interaction nonstopmode -output-directory %o %f")) Lastly, in Org docs you need of course to load the minted package: #+LaTeX_HEADER: \usepackage{minted} You can see how the highlighting looks like in this post from my blog (in Spanish): under the title there is a button to download the entry in PDF version: https://lunotipia.juanmanuelmacias.com/evitar_funcion_lua.html Finally, you may be interested in this new package that TEC has written: https://www.reddit.com/r/emacs/comments/lbkmmz/the_best_syntax_highlighting_in_a_pdf_youll_see_a/ Best regards, Juan Manuel