modified wp-codebox to highlight R code as in Pretty-R

December 5, 2012
By

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

I found wp-codebox could highlight R code two years ago. This plugin is based on GeSHi to highlight source code internally.

Now there are many ways to highlight R syntax in the website. Pretty-R provided by Inside-R is a popular tool in the community.

I like the color style of Pretty-R more than which provided by GeSHi. GeSHi also links functions to the online manuals; this feature is very helpful for those not familiar with R. But I found many of the keywords are not linked properly.

I modified wp-codebox, to color the functions as in Pretty-R, and link the documents back to inside-R. The external link works fine and syntax now highlighted just exactly like the Pretty-R as you can refer to my previous post.

The modified file can be downloaded from github.

Related Posts

To leave a comment for the author, please follow the link and comment on his blog: YGC » R.

R-bloggers.com 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...

Comments are closed.