Joseph Vidal-Rosset <joseph.vidal.ros...@gmail.com> writes: > Thanks Eric. > > I have tested this solution that works with imagemagick and html export. I > have added these lines in my init.el : > > ; Include the latex-exporter > (require 'ox-latex) > ;; Add minted to the defaults packages to include when exporting. > ;(add-to-list 'org-latex-packages-alist '("" "minted")) > ;; Tell the latex export to use the minted package for source > ;; code coloration. > (setq org-latex-listings 'minted) > ;; Let the exporter use the -shell-escape option to let latex > ;; execute external programs. > ;; This obviously and can be dangerous to activate! > (setq org-latex-pdf-process > '("xelatex -shell-escape -interaction nonstopmode -output-directory %o > %f")) > > and it works. > > But now it does not work in my Gnus if I want to include some png > images of proofs... I have to deleted these "dangerous lines"... > > I do not understand why I need minted and shell-escape... >
I don't know why you need minted (I have not followed the conversation), but to use minted you *need* -shell-escape: minted requires running an external program (pygments), but tex does not like doing that for security reasons - the -shell-escape option gives tex permission to run such an external program. Nick