Syntax Highlighter Test Post

I am trying to figure out how to use three things:
  1. Alex Gorbatchev's SyntaxHighlighter
  2. Yihui Xie's custom R-Brush for highlighting R
  3. Google Codes' website for hosting the javaScripts
test.func <- function(r) {
    return(pi * r^2)
}
test.func(1)

It is proving difficult so far.

So I got it using Alex's code direct from his website. I have tried changing the starting line number and highlighting a single line. Also I added a grey border on the expanded box and got a title to appear.

I think I should be able to get the code to pop out into its own plain text box, making it easy to copy and paste into the R editor. I gather this has been deprecated and you use a simple double-click, copy - paste.

Next challenge is to get it from the google-code website so I can design my own color scheme!

Well, so far I have the javascripts running from google-code, but every time I add the cascading style sheets, it stops working - I bet it is something to do with relative directory structures.

No, not directory, I think it MIME type. Apparently Google code serves up the file as plain-text not as CSS, so my template doesn't interpret it correctly. Trying to figure out how to set the MIME type correctly on Google code.

I tried using Google Docs - didn't work. So, after down loading Tortoise Subversion client and using it to upload files with the correct mime settings, everything is being driven off Google-Code. However, I get the strong impression that Google is not happy about this use of Google Code - I have to look into their suggestions for hosting javascript, css, etc.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Get widget