Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I’ve released version 0.2-0 of highlight to CRAN

This version brings some more additions to the sweave driver that uses highlight to produce nice looking vignettes with color coded R chunks

The driver gains new arguments boxes, bg and border to control the appearance of the code chunks. When boxes is set to TRUE, the R code chunks are surrounded in boxes, and the arguments bg and border control the background color and the color of the box

Also, when the other highlight is available, the driver will also color code example code in any language that highlight supports. To use this, just surorund the code with <&ltlang=foo&gt> for the language foo. For example:

 <<lang=cpp&gt>=
int main(){
return 0 ;
}
@


will output the content of the code chunk as highlighted c++. The Rcpp-modules vignette in the next version of Rcpp uses both these new features. (see the vignette source in r-forge. The vignette is rendered into latex using :

require(highlight)
driver <- HighlightWeaveLatex(boxes = TRUE)
Sweave( 'Rcpp-modules.Rnw', driver = driver )