How to print source code from the command line

Ken Shaffer Kenneth_C_Shaffer at
Fri Jan 2 15:11:30 PST 2015

a2ps gives you individual control of features, but shortcuts are
available for giving you a nice output.  The -M medium business I use to
set up the print margins for my output, and the -2 is a "2 up" shortcut
for printing two pages per sheet, doing all the fiddly things like
lines/sheet and columns automatically.  The only customization I used
was the -C for my line number every 5 lines, which I find less intrusive
than a line number every line.  Use the -o filename to output the
postscript to a file, and look at it with evince before printing if you
want.  As to where these predefineds are set up, I'd start looking in
the /etc/a2ps*.cfg files (The -MLetterdj margins are explicit in the
On Fri, 2015-01-02 at 12:25 -0800, Alex Kleider wrote:
> On 2015-01-01 17:25, Ken Shaffer wrote:
> > My favorite a2ps output is:
> > a2ps -C -MLetterdj -2
> > which gives me a tiny line number every 5 lines, and is 2 up,
> > (on a deskjet device, change for your printer).  All the other headers,
> > footers, and boarders are standard.
> > Ken
> excerpt from
> man a2ps =>
> ...
>        -M, --medium=NAME
>                use output medium NAME
> ...
>         -1, -2, ..., -9
>                predefined font sizes and layouts for 1.. 9 virtuals
> ...
> Where and how are the "1.. 9 virtuals" "predefined"?
> ..and what is the output medium?  ?specifies a printer?
> Can you shed some light, please?
> thks,
> Alex

More information about the sf-lug mailing list