Shiyuan <gshy2014@gmail.com> writes:Not sure what version of listings I have, but I get the same behaviour:
> 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"))
>
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