From: James Britt Date: 2005-10-11T01:23:37+09:00 Subject: Re: [ANN] Ruby Code & Style James Edward Gray II wrote: > On Oct 9, 2005, at 11:52 PM, James Britt wrote: > >> The newest on-line resource for serious Ruby information has gone live. > > > I've read, and enjoyed, the first article. > > Requests: > > 1. Could the code font size be increased a bit? CTRL + :) I imagine alternate stylesheets could be added to supply for larger fonts. But the site is generated by an semi-automated publishing process, so I don't know offhand how that would be added or who would be responsible. (There's always mousehole and/or greasemonkey, for the more ambitious out there.) > 2. Any chance of syntax highlighting? Man, some people want everything! Indeed, syntax highlighting would be nice. Are there existing Ruby apps that will take a source file and generate nice colored HTML? (I bet there are; I'm too lazy/busy (blazy?) to look.) The articles are published by a Java app (I think; might only be driven by a JSP but not processed by it) that reads a source article marked up in a Artima-publishing variant of HTML. *Perhaps*, if anyone wants to take a shot, the markup could be pre-processed by a Ruby app that applies syntax coloring only to code within
 or  sections.

It may be possible to also toss in a marker class attribute value:
, or 
 so that 
different code gets different syntax treatment.

(Is there a better way to indicate that some element contains 
preformatted code for a particular programming language?)


James

-- 

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com  - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com  - Playing with Better Toys