emacs-orgmode
[Top][All Lists]

## Re: [Orgmode] Color of exported R code results using LaTeX listings

 From: Eric Schulte Subject: Re: [Orgmode] Color of exported R code results using LaTeX listings Date: Fri, 17 Sep 2010 08:24:19 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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

> 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)
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
`