emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Steven Delean <steven.delean@adelaide.edu.au>
To: emacs-orgmode@gnu.org
Subject: Re: Color of exported R code results using LaTeX listings
Date: Fri, 17 Sep 2010 17:58:51 +0930	[thread overview]
Message-ID: <1284712131.2732.35.camel@sduofa-desktop> (raw)
In-Reply-To: <4C932002.6070105@gmail.com>

Hi Rainer,

Yes, you will need to provide arguments to the \lstset listings variable
(i.e. add these arguments to a #+BEAMER_HEADER_EXTRA: line). Below are
the subset of arguments that I am using so far, though greater
customisation is available (see listings.pdf
www.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf).

\lstset{
  keywordstyle=\color{blue},
  commentstyle=\color{red},
  stringstyle=\color{green},
  basicstyle=\ttfamily\small,
  columns=fullflexible,
  basewidth={0.5em,0.4em}
}

Cheers,
Steve


On Fri, 2010-09-17 at 10:00 +0200, Rainer M Krug wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 17/09/10 09:31, Steven Delean wrote:
> > 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.
> 
> Hi
> 
> This is not an answer to your question, but rather a question to you:
> I added your settings to my .emacs file, and I get fontification in the
> pdf output, but no color. Do I need any additional settings to get
> coloring of the source code?
> 
> Cheers,
> 
> Rainer
> 
> > 
> > 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
> 
> 
> - -- 
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
> 
> Centre of Excellence for Invasion Biology
> Natural Sciences Building
> Office Suite 2039
> Stellenbosch University
> Main Campus, Merriman Avenue
> Stellenbosch
> South Africa
> 
> Tel:        +33 - (0)9 53 10 27 44
> Cell:       +27 - (0)8 39 47 90 42
> Fax (SA):   +27 - (0)8 65 16 27 82
> Fax (D) :   +49 - (0)3 21 21 25 22 44
> Fax (FR):   +33 - (0)9 58 10 27 44
> email:      Rainer@krugs.de
> 
> Skype:      RMkrug
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkyTIAIACgkQoYgNqgF2egrfiwCeNk5+mduTj/HamQs9lAQG5CEE
> zeIAn2kc+F+yL9XGyQu771zEKyFSxxin
> =/jMz
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> 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

  reply	other threads:[~2010-09-17  8:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-17  7:31 Color of exported R code results using LaTeX listings Steven Delean
2010-09-17  8:00 ` Rainer M Krug
2010-09-17  8:28   ` Steven Delean [this message]
2010-09-17  8:52     ` Sébastien Vauban
2010-09-17  9:13       ` Rainer M Krug
2010-09-17 13:14         ` Steven Delean
2010-09-17 13:20           ` Rainer M Krug
2010-09-17 13:30             ` Sébastien Vauban
2010-09-17 14:15               ` Rainer M Krug
2010-09-17  9:05     ` Rainer M Krug
2011-01-04 10:06       ` Bastien
2010-09-17 12:24 ` Eric Schulte
2010-09-18  2:39   ` Steven Delean
2010-09-18  7:10     ` Sébastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284712131.2732.35.camel@sduofa-desktop \
    --to=steven.delean@adelaide.edu.au \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).