Hi…
I wonder, what are your solutions for pretty printing Ruby code,
as for printing on real paper, spreading it across a table
and reviewing it and marking it with handwritten notes etc.
Currently I source highlight via enscript and do 4-on-1 like this:
cat bla.ruby |
fold -w 89 |
enscript -Eruby -c -B -h -p- -fCourier10 --margins=15:15:30:30 | pstops
-pa4
“4:[email protected](0.5cm,0.85cm)[email protected](10.16cm,0.85cm)[email protected](0.5cm,14.44cm)[email protected](10.16cm,14.44cm)”
output.ps
…but I guess you have also nice solutions to this problem?
Alternative recommendations welcome!
Martin
On Thu, Mar 3, 2011 at 4:10 PM, Martin P. [email protected]
wrote:
Hi…
I wonder, what are your solutions for pretty printing Ruby code,
as for printing on real paper, spreading it across a table
and reviewing it and marking it with handwritten notes etc.
IIRC this is an area where most editors and IDEs excel at. Netbeans is
what
I used for printing Ruby code before, it doesn’t fuss much about any
language really. Though I imagine most editors that do syntax
highlighting
will have a good print option as well.
regards,
Richard
Hi,
I use Latex with the listings package.
#include the package
\usepackage{listings}
#set some nice print options and indicate the file
\lstset{basicstyle=\footnotesize,language=Ruby}
\lstset{linewidth=500pt}
\lstset{numbers=left, stepnumber=1}
\lstset{commentstyle=\color{blue},
stringstyle=\color{green},showspaces=false}
\lstset{keywordstyle=\color{red}\bfseries\emph}
\lstset{frame=trBL,frameround=tttt}
\lstinputlisting[caption=chromosome.rb,label=lst:lowertri]{./bin/rn_practice.rb}
Kind regards,
V.