Thank you for the pointers. I got minted-pygments working using the
following setup:
(setq org-latex-listings 'minted)
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o
%f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
%f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
%f"))
On Fri, Jun 27, 2014 at 3:37 PM, Nick Dokos <[email protected]> wrote:
> Shiyuan <[email protected]> writes:
>
> > I use the following setting. The keywords are correctly recognized and
> are in bold face, but not in color. Are there any other
> > steps for colors.
> >
> > (require 'ox-latex)
> > (add-to-list 'org-latex-packages-alist '("" "listings"))
> > (add-to-list 'org-latex-packages-alist '("" "color"))
> >
>
> Not sure what version of listings I have, but I get the same behaviour:
> bold face but no color. You have to modify the settings. For example:
>
> \lstset{ %
> ...
> commentstyle=\color{green}, % comment style
> ...}
>
> will colour comments green. See the listings manual for more details:
>
> http://mirror.hmc.edu/ctan/macros/latex/contrib/listings/listings.pdf
>
> You might want to try pygments and minted instead. It's a bit fiddly
> to set up but does give you colour out of the box.
>
> Nick
>
>
>