Or see https://github.com/yihui/knitr-examples/blob/master/015-listings.Rnw for a minimal example.
Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Nov 1, 2012 at 1:23 PM, Frank Harrell <f.harr...@vanderbilt.edu> wrote: > The knitr package makes this relatively easy to do. See for example > http://biostat.mc.vanderbilt.edu/KnitrHowto > > Frank > > > Marius Hofert-3 wrote >> Dear expeRts, >> >> What's a 'good' (nice-looking, easy-to-read) setup for the LaTeX package >> 'listings' to display R code? >> >> The two versions below are partly inspired by the settings of the package >> SweaveListingUtils and >> http://r.789695.n4.nabble.com/R-How-to-format-R-code-in-LaTex-documents-td816055.html >> >> Any suggestions, comments, or improvements are welcome. >> >> Cheers, >> >> Marius ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.