From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Color of exported R code results using LaTeX listings Date: Fri, 17 Sep 2010 08:24:19 -0400 Message-ID: <87k4mk5uji.fsf@gmail.com> References: <1284708719.2732.28.camel@sduofa-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=60415 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwbfO-0007Gp-KC for emacs-orgmode@gnu.org; Fri, 17 Sep 2010 10:11:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwbfI-0007Sm-Qn for emacs-orgmode@gnu.org; Fri, 17 Sep 2010 10:11:54 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:34615) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwbfI-0007Sc-OM for emacs-orgmode@gnu.org; Fri, 17 Sep 2010 10:11:48 -0400 Received: by gwj16 with SMTP id 16so1135006gwj.0 for ; Fri, 17 Sep 2010 07:11:48 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Steven Delean Cc: emacs-orgmode@gnu.org Hi Steven, If your R blocks are outputting actual R code, then you can use the "code" argument to the :results header argument to have the output exported as R code under listings instead of within verbatim blocks. --8<---------------cut here---------------start------------->8--- #+begin_src R :results code 8 #+end_src #+results: #+BEGIN_SRC R 8 #+END_SRC --8<---------------cut here---------------end--------------->8--- Alternately if your output is some other language you could use the ":results latex" header argument and explicitly provide the listings wrapper yourself. Hope this Helps -- Eric Steven Delean writes: > Hi everyone, > > I am using org-mode to make a beamer presentation that includes blocks > of R code and wish to export the source code and results to pdf in > color (using the listings package). > > The source code block syntax is highlighted successfully, but the > output results of the executed R code are not colored at all. > > The results are presented in \begin{verbatim}...\end{verbatim}, > whereas the source code is presented within > \begin{lstlisting}...\end{lstlisting}. I can affect changes to the > fontsize and color of the source code using \lstset in the .org > document header, but not the results output from evaluating the code. > > Is there some way I can export these results in color? > > Thanks for any suggestions, > > Regards, > Steve > > PS I have the follwing in my .emacs > (require 'org-latex) > (setq org-export-latex-listings t) > (add-to-list 'org-export-latex-packages-alist '("" "listings")) > (add-to-list 'org-export-latex-packages-alist '("" "color")) > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode