From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: R src block not highlighted in pdf Date: Fri, 27 Jun 2014 18:37:41 -0400 Message-ID: <87vbrmou6i.fsf@alphaville.bos.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0emR-0000Xe-4K for emacs-orgmode@gnu.org; Fri, 27 Jun 2014 18:38:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0emJ-0002NF-6y for emacs-orgmode@gnu.org; Fri, 27 Jun 2014 18:38:03 -0400 Received: from plane.gmane.org ([80.91.229.3]:58462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0emJ-0002N2-0i for emacs-orgmode@gnu.org; Fri, 27 Jun 2014 18:37:55 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X0emI-0001BL-1G for emacs-orgmode@gnu.org; Sat, 28 Jun 2014 00:37:54 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Jun 2014 00:37:54 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Jun 2014 00:37:54 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Shiyuan 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