I'm running Orgmode 8.2.10 with emacs 24.4 on a Win 7 machine.
I've installed python, pygment and minted and added the following code to my
(setq org-export-latex-listings 'minted org-latex-packages-alist '(("" "minted")) org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
For some unknown reason, when exporting to latex (and consequently to pdf), the minted pkg is loaded in the preamble of the tex file but in the body of that same tex file pkg
listings and its corresponding cmds are used. As a result the final pdf shows no formatting of, say, a short python code-block enclosed in
#+END_SRC in the org file.
minted works because if I manually correct the tex file and recompile it with pdflatex it yields the code block correctly.
Why isn't the latex export of the org-file using the
minted command/environment in the body of the document?
I managed somehow to set
listings as the go-to package that handles code blocks enclosed within
#+END_SRC in an *.org file. I did that by using the GUI of emacs not the
.emacs conf file (will study that file at a later moment). Menu Org > Customize > Browse Org Group then patiently finding the Group
Org Export >
LaTeX Listings and setting this variable to
minted instead of leaving it as
listings. Saved for future sessions, and clicked Apply and Save. I see I can set Options (such as background color of code) under
Org Latex Minted Options. Here's a screenshot: