Shiyuan <gshy2...@gmail.com> 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


Reply via email to