How to Print Rails Source Code?
I'd like to read the Rails 3 source code on printed paper (and preferably in color).
For example, xv6 did a nice job printing their code. It even has line numbers and an index. The only thing I would like to add is syntax highlighting.
Anyone know how any of thi开发者_如何转开发s is possible? Here are two possibilities I found: 1. The Listings Package (could this also generate other formats besides PDF, like HTML?) ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf o 2. Highlight (does it do indexing?) http://www.andre-simon.de/
We could even add a rake task, print, that generates an up-to-date PDF.
I recomend you use highlight to turn the code into LaTeX and then use Listings to make it into a PDF, then print!
精彩评论