Code Highlights in WordPress

March 26, 2010

(This article was first published on stotastic » R, and kindly contributed to R-bloggers)

I’ve come across a very useful plugin for WordPress which highlights code in posts using GeSHi called WP-Syntax. This plugin is easy to use and adds highlights simply by putting the appropriate tags around code blocks. For instance, we can make the following R code much more readable by using WP-Syntax.

## Generate 100 standard normal random draws
x <- rnorm(100,0,1)

A patch is avaliable which includes R code highlights, something which isn’t available in the default WP-Syntax version.

To leave a comment for the author, please follow the link and comment on his blog: stotastic » R. offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.