pretty printing Ruby code

M

Martin Pirker

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
 
R

Richard Conroy

[Note: parts of this message were removed to make it a legal post.]

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
 
V

Vicente Bosch Campos

Hi,

I use Latex with the listings package.

#include the package
\usepackage{listings} =20

#set some nice print options and indicate the file
\lstset{basicstyle=3D\footnotesize,language=3DRuby}
\lstset{linewidth=3D500pt}
\lstset{numbers=3Dleft, stepnumber=3D1}
\lstset{commentstyle=3D\color{blue}, =
stringstyle=3D\color{green},showspaces=3Dfalse}
\lstset{keywordstyle=3D\color{red}\bfseries\emph}
\lstset{frame=3DtrBL,frameround=3Dtttt}
=
\lstinputlisting[caption=3Dchromosome.rb,label=3Dlst:lowertri]{./bin/rn_pr=
actice.rb}

Kind regards,
V.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top