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")) Also, thank you for reminding me of the `apropos`. On Fri, Jun 27, 2014 at 11:38 AM, Grant Rettke wrote: > Just ran apropos and it looks like org-latex-listings might be the one. > Grant Rettke | ACM, ASA, FSF, IEEE, SIAM > gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ > “Wisdom begins in wonder.” --Socrates > ((λ (x) (x x)) (λ (x) (x x))) > “Life has become immeasurably better since I have been forced to stop > taking it seriously.” --Thompson > > > On Fri, Jun 27, 2014 at 12:23 PM, Shiyuan wrote: > > Hi, > > I have a R code src block in a org file. When exported to html, the R > > code is correctly syntax highlighted. But when exported to pdf(latex), > the R > > code is not highlighted. I found this thread > > https://lists.gnu.org/archive/html/emacs-orgmode/2010-07/msg00379.html > > which suggests setting the variable org-export-latex-listings. This > variable > > seems no longer exist in Org 8.2.6. What variables shall I set so that > the > > R code is syntax highlighted when exported to pdf in Org mode 8.2.6? > Thanks. > > > > Shiyuan >