[racket] code to HTML

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Fri Mar 18 17:21:29 EDT 2011

If you want to see the code in a Web browser window (not even use 
DrRacket as a helper program launched from the browser for a Racket MIME 
type), then I like Robby's suggestion of how to use Scribble.

You might have to see whether the parts of Scribble you need are fast 
enough to format on-the-fly for a responsive Web interface, or whether 
you need to precompute that.

If all else fails, writing a simple syntax colorer from scratch is a 
small task, so long as you don't need symbol/ident information other 
than a small fixed set of what are "the keywords".  You could make this 
task an extra-credit homework problem for students. :)

Robby Findler wrote at 03/18/2011 03:00 PM:
> Not to be too ludditian, but why not just pull it up in drracket in class?
> If not, I guess you could put together a script that stuck (racketblock ...) around everything or the module-enhanced variant, which makes it into a scribble file and then run scribble --html on that.


Posted on the users mailing list.