title: How to Print Rails Source Code?
body: <p>I'd like to read the Rails 3 source code on printed paper (and preferably in color).</p>
  
  <p>For example, <a href="http://pdos.csail.mit.edu/6.828/2009/xv6-book/index.html" rel="nofollow noreferrer">xv6</a> did a nice job printing their <a href="http://pdos.csail.mit.edu/6.828/2009/src/xv6.pdf" rel="nofollow noreferrer">code</a>. It even has line numbers and an index. The only thing I would like to add is syntax highlighting.</p>
  
  <p>Anyone know how any of this is possible?
  Here are two possibilities I found:
  1. The Listings Package (could this also generate other formats besides PDF, like HTML?)
  <a href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf" rel="nofollow noreferrer">ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf</a> o
  2. Highlight (does it do indexing?)
  <a href="http://www.andre-simon.de/" rel="nofollow noreferrer">http://www.andre-simon.de/</a></p>
  
  <p>We could even add a rake task, print, that generates an up-to-date PDF.</p>