Skip to content
Prev 173899 / 398503 Next

R-code in html help pages: syntax highlighting

hadley wickham wrote:
That did cross my mind earlier this evening, it just seems a bit too 
easy to last all summer, but maybe I am missing something difficult. I 
will start to play with this over the next few days, and make up my mind.

One of the problem I might run into is performance, if we want this to 
treat all Rd files, we are going to want something very efficient, and 
it might not be enough to build on top of codetools (which uses 
recursion at the R level) , but could make sense to provide a C level 
implementation.

This could lead to interesting things as:
- syntax highlighting in sweave (or decumar)
- pretty printing in the console (using ansi characters)
- syntax highlighting in R help files, potentially with hyperlinks

I have requested creation of a project on r-forge. Anyone else want to 
play with this ?

Romain