Tal Galili
2010-Sep-09 08:02 UTC
[R] Help request: highlighting R code on WordPress.com blogs
Hello dear R help members (and also Yihui and Romain), There are currently 28 R bloggers (out of the 117 R-bloggers<http://www.r-bloggers.com/>I know of) that are using wordpress.com for publishing their R code (and I suspect this number will increase with time). WordPress.com doesn't support R syntax highlighting, nor can it be embedded from other services (like gist git<http://gettinggeneticsdone.blogspot.com/2010/09/embed-rstats-code-with-syntax.html> ) After contacting the WordPress.com vip manager, he instructed me that they will add R support if a relevant "brush" will be created according to this document: http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/custom.html Since this is what they use on wordpress.com (see: http://en.support.wordpress.com/code/posting-source-code/). Creating this brush is beyond my ability at this point, I am writing to *ask if any of you can/wishes to make this brush *for the community. Something I thought might be relevant is the code Yihui Xie recently wrote<http://yihui.name/en/2010/08/auto-completion-in-notepad-for-r-script/>for creating a NPPtoR code brush ( http://yihui.name/en/wp-content/uploads/2010/08/Npp_R_Auto_Completion.r) If such a brush will be created, I'll push to have it included in wordpress.com and to try and inform the current R bloggers using it. Best, Tal ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- [[alternative HTML version deleted]]
Yihui Xie
2010-Sep-09 19:01 UTC
[R] Help request: highlighting R code on WordPress.com blogs
Thanks, Tal. It does not look too difficult to write such a "brush", which is actually a JS file. However, I have a concern that R has thousands of functions (in base R only), so it might not worth including all of them in the brush, which is the way that they implemented the highlighting script for Java and VB (they didn't define the list of functions because there are too many). Then what we need to do is just to insert a few keywords like TRUE/FALSE/for/while in the JS. I would like to contribute 10 minutes on this if nobody will pick up this job. Regards, Yihui -- Yihui Xie <xieyihui at gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Sep 9, 2010 at 3:02 AM, Tal Galili <tal.galili at gmail.com> wrote:> Hello dear R help members (and also Yihui and Romain), > There are currently 28 R bloggers (out of the 117 R-bloggers I know of) that > are using wordpress.com for publishing their R code (and I suspect this > number will increase with time). > WordPress.com doesn't support R syntax highlighting, nor can it > be?embedded?from other services (like gist git) > After contacting the WordPress.com vip manager, he instructed me that they > will add R support if a relevant "brush" will be created?according?to this > document: > http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/custom.html > Since this is what they use on wordpress.com (see: > http://en.support.wordpress.com/code/posting-source-code/). > Creating this brush is beyond my ability at this point, I am writing to ask > if any of you can/wishes to make this brush for the community. > Something I thought might be relevant is?the code Yihui Xie recently wrote > for creating a NPPtoR code brush > (http://yihui.name/en/wp-content/uploads/2010/08/Npp_R_Auto_Completion.r) > > If such a brush will be created, I'll push to have it included in > wordpress.com and to try and inform the current R bloggers using it. > > Best, > Tal > > ----------------Contact > Details:------------------------------------------------------- > Contact me: Tal.Galili at gmail.com |? 972-52-7275845 > Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | > www.r-statistics.com (English) > ---------------------------------------------------------------------------------------------- > > >
D Kelly O'Day
2010-Sep-10 03:40 UTC
[R] Help request: highlighting R code on WordPress.com blogs
Tali I am one of your estimated 29 Wordpress bloggers. Thanks for your RBloggers site!! I use Wordpress.com's site for my blog. I use a simple method to highlight my R script in Wordpress, example http://chartsgraphs.wordpress.com/2010/07/17/time-series-regression-of-temperature-anomaly-data-1-%E2%80%93-don%E2%80%99t-use-ols/#more-3390 here . I use <pre> Rscript </pre> to set up my R script blocks. I purchased Wordpress' CSS service and customized the <pre> </pre> tags to add a text box and pale yellow color scheme. I use SnagIt to make images of the console results. -- View this message in context: http://r.789695.n4.nabble.com/Help-request-highlighting-R-code-on-WordPress-com-blogs-tp2532433p2533842.html Sent from the R help mailing list archive at Nabble.com.