WP-CodeBox: A better R syntax highlighter plugin for WordPress

October 11, 2010
By

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

About 10 months ago, I was looking for a plugin to enable me to highlight R code on my self hosted WordPress blog.
The solution I came up with then was to use the wp-syntax plugin (with the need for some modifications).

Today I was informed of (what I believe is) a better WordPress plugin for R syntax highlighting called WP-CodeBox.  This plugin doesn’t require any modification (as opposed to WP-Syntax), so it can simply be downloaded and installed to the WP as is from the “Add New” section in the plugins menu).

WP-CodeBox provides some nice features (some AJAX based) to the display of the code in the post:

  1. The code box in the post can now be folded (top right of the code box) so the code can be hidden so to not clutter the post (if the code is too long)
  2. The code box is added with another button  (top left of the code box) which allows the reader to see the code in a new window – so to easily enable a copy paste of the code.
  3. The options of the plugin allows automatic row numbering of the code, control over “tab” length and some other features.

Lastly, my thanks goes to guangchuang yu who’s comment on my original post, and he’s post on wp-codebox and R, has introduced me to this better plugin.

p.s: in case you where wondering, there is also a solution for R syntax highlighting for bloggers on WordPress.com.

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

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...

Tags: , , , , , , , , , , ,

Comments are closed.