Use a2ps to print source codes on scires and linterms
|
P H Y S I C S
|
About a2ps
a2ps - formats an ascii file for printing on a postscript printer.
Information about GNU a2ps can be found at
www.gnu.org/software/a2ps/a2ps.html.
Use a2ps on sires
Here is one of the option combinations for printing source codes (C or other programming languages)
on scires:
a2ps -a -o -l -2 -n -c file_names
Options:
-
-a
-
Use alternative paper size. In general defined to be US letter.
-
-o
-
Save the postscript into a file a2ps.ps.
-
-l
-
Print files in landscape mode.
-
-2
-
Print two pages per physical page.
-
-n
-
Output lines are preceded by line numbers, numbered sequentially from 1.
-
-c
-
Compact mode for a sequence of files.
This option allows the printing of two files in the same physical page:
last page of the first file in the left (or up) side and first page of
the second file in the right (or down) side.
This option is valid only for twin-page mode (two pages per physical page).
The above command generates a Postscript file called a2ps.ps.
You can use lpr command to send this a2ps.ps file to physics department Postscript printers
to print it out. (See Print on Physics Department printers).
Use man a2ps on scires to get more options.
Use a2ps on Linterms
On Debian/Linux Machines, the command has different syntax:
a2ps -o a2ps.ps -C -A file_names
Options:
-
-o a2ps.ps
-
Save the postscript into a file a2ps.ps.
-
-C
-
Alias for --line-numbers=5. Precede each 5 lines with its line number.
-
-A
-
allow two files on the same sheet.
Use man a2ps on linterms to get more options.
|