Mailinglist Archive: opensuse-programming (60 mails)

< Previous Next >
Re: [suse-programming-e] printing in emacs
  • From: "Preston Hagar" <prestonh@xxxxxxxxx>
  • Date: Thu, 8 Jun 2006 09:42:20 -0500
  • Message-id: <8f5897560606080742q3577f8a9xeb1a7ec1adbb1589@xxxxxxxxxxxxxx>
On 6/7/06, John D Lamb <J.D.Lamb@xxxxxxxxxxxxxx> wrote:

Can anybody suggest how I set this up? I'd like pretty-printed pages of
C++ from emacs on SuSE 10.1.



Although this doesn't directly address your issues, I would recommend
looking at a2ps ( http://www.gnu.org/software/a2ps/ ) It is what I always
used when I needed to print out source code in college or even now. It is
very configurable, you can have it put line numbers on the printout for you,
you can have two pages side -by -side and it usually formats C/C++
sourcecode well.

I usually run it as follows:

a2ps -P <printername> -2 --line-numbers=5 file.cpp

this will print file.cpp to printer <printername> with two "pages" per sheet
of paper with line numbers every 5 lines. Anyway, it is one of those
programs I really like a lot and find that many people don't know about.
Just thought I would share.

Preston
< Previous Next >
References