.\" @(#)a2ps.man.1 4.2 3/20/93 .\" .TH A2PS 1L "20 March 1993" .UC 4 .SH NAME a2ps \- formats an ascii file for printing on a postscript printer .SH SYNOPSIS .B a2ps [ .B global options ] [ .B positional options ] [ .I file1 [ [ .B positional options ] ] .I file2 \fP... ] .SH DESCRIPTION .I a2ps formats each named file for printing in a postscript printer; if no file is given, .I a2ps reads from the standard input. The output is sent to lpr or to stdout. The format used is nice and compact: normally two pages on each physical page, borders surrounding pages, headers with useful information (page number, printing date, file name or supplied header), line numbering, etc. This is very useful for making archive listings of programs. .PP Global options offered by .I a2ps are the following: .TP 0.6i .B -? Print usage information. .TP 0.6i .B -b Force printing binary files. By default, binary files printing is stopped before second page (see -nb option). .TP 0.6i .B -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 twinpage mode (two pages per physical page). .TP 0.6i .B -f Fold lines too large to be printed inside the borders (default option). Max line size depends on format and font size used and whether line numbering has been suppressed. .TP 0.6i .B -h Print usage information. .TP 0.6i .B -I\fIfile\fP Use the specified file as the postscript prologue for a2ps. .TP 0.6i .B -i Interpret TAB, BS and FF characters (default option). TAB is replaced by enough spaces to reach next tab stop while BS and FF have their meanings. .TP 0.6i .B -nb Don't print binary files (default option). To detect such a file we make use of a very simple heuristic: if the first page of the file contains at less 75% of non-printing characters, it's a binary file. First page is always printed. .TP 0.6i .B -nc Don't use compact mode for a sequence of files. The beginning of each file will be printed in a new physical page. .TP 0.6i .B -nf Truncate lines too large (don't fold). .TP 0.6i .B -nH Don't print page headers. .TP 0.6i .B -ni Don't interpret TAB, BS and FF characters. They will be printed according to -v option. .TP 0.6i .B -nP Send output to stdout. Default is to send output directly to the printer .TP 0.6i .B -nr Sheet numbering (see -r option) must be continue for all files (don't reset on new file). Default option. .TP 0.6i .B -nv Replace non-printing characters by a space. .TP 0.6i .B -n8 Don't print non ascii characters as ISO Latin 1 characters (see -8 option). .TP 0.6i .B -P\fIprinter\fP Send output to the named printer. The default option is send to the default printer. .TP 0.6i .B -r Reset sheet numbering for each new file. Sheet numbering is used to number physical pages (sheets) as they are printed. Page numbering numbers the logical pages, of which there are usually two per physical page (i.e. unless -p or -w is specified). .TP 0.6i .B -s1 Print output in one-sided mode (only one side of each sheet). The default option depends on the installation. .TP 0.6i .B -s2 Print output in two-sided mode (front and backside of each sheet). Default option depends on the installation. .TP 0.6i .B -t\fInum\fP Set TAB size to \fInum\fR (default 8). This option is ignored if \fB-ni\fR is specified (see below). .TP 0.6i .B -v Replace non-printing characters so that they are visible and easy to identify (default option). Control characters (ascii codes lower than 0x20) are printed like ^X for ctrl-x; the delete character (hex 0x3f) is printed as ^?. Non ascii characters (with the high bit set) are printed as M- (for meta) followed by the character of the low 7 bits. TAB, BS and FF are handled like non-printing characters if -ni option was taken. .TP 0.6i .B -8 Print non ascii characters (with the high bit set) as ISO Latin 1 characters. By default, these characters are printed as M- (for meta) followed by the character of the low 7 bits. .PP Positional options are applied to all files that will be found in the rest of the command line. The .I -H option is the only exception: it is applied only to the next file. Positional options offered by .I a2ps are the following: .TP 0.6i .B -1 Print only one page per physical page (single page mode). .TP 0.6i .B -2 Print two pages per physical page (twinpage mode), side by side or up-down, depending on the printing mode (landscape or portrait). .TP 0.6i .B -#\fInum\fP To get multiple copies of output, where .I num is the number of copies desired of each file named. By default, you get only one copy. .TP 0.6i .B -d Print the current date and time at the bottom of the page (default option). This option is affected by the no surrounding border and the no header options. .TP 0.6i .B -F\fInum\fP Changes font size to this value. Default values for font size are 6.8 in landscape mode, 6.4 in twinpage portrait mode and 9.0 in single page portrait mode. Try other sizes if you think that these values are too small (or big). .TP 0.6i .B -B Print using bold font. .TP 0.6i .B -H\fItext\fP Use this .I text instead of the file name in the page headers for printing next (and only next) file. Additional -H directives can be mixed in with the filenames. .TP 0.6i .B -l Print files in landscape mode (default option). This option may not be used with the -p option. .TP 0.6i .B -l\fInum\fP Set the lines per page for printing. The font size is automatically scaled up to fill in the whole page. This is useful for printing preformatted documents which have a fixed number of lines per page. The scaling of the font size will be suppressed if this option is used with option \fB-f\fPnum. The minimum number of lines per page is set at 40 and maximum is at 160. If a number less than 40 is supplied, scaling will be turned off and a warning message is printed on the terminal. .TP 0.6i .B -m Understand UNIX manual output ie: 66 lines per page, no line numbering and possible \fIbolding\fP and \fIunderlining\fP sequences. The understanding of \fIbolding\fP and \fIunderlining\fP is there by default even if -m is not specified. .TP 0.6i .B -n Output lines are preceded by line numbers, numbered sequentially from 1. .TP 0.6i .B -nd Don't print the current date and time in the footer. .TP 0.6i .B -nn Don't number output lines (default option). .TP 0.6i .B -ns Don't print page surrounding borders. .TP 0.6i .B -nB Don't print using bold font. .TP 0.6i .B -nu Don't print filename at bottom of page. Default is to print the filename, centered, at the bottom of the page. .TP 0.6i .B -nL Don't print user login ID at top of page. Default is to print the user's login ID in the upper right corner of the page. (available for Unix systems only) .TP 0.6i .B -p Print files in portrait mode (horizontal pages). The default option is to use landscape mode. .TP 0.6i .B -s Print page surrounding borders (default option). .SH USAGE .PP .I a2ps generates postcript to its standard output. The user could redirect this output to a file, pipe it directly to a print command (like lpr), or to another filter for further processing. By default, a2ps pipes directly the output to the print command (see -P option). .ti +0.5i a2ps -nP file1 > file2 .ti +0.5i a2ps -nP -p file1 | psnup -n4 | lpr -l -Pps .PP Don't forget .B -l option in .I lpr , if you want that .I lpr interprets your postscript program rather than merely printing it as ascii text. .PP This filter must be used only with text files. Avoid specially output from TeX, troff or any other such text formatters. .SH "SEE ALSO" lpr(1) .SH AUTHORS Evan Kirshenbaum (evan@csli) for the initial version. .br Miguel Santana (santana@imag.fr) for versions 1.0, 2.0, 3.0, 4.0, 4.1 and 4.2. .SH CONTRIBUTORS Oscar Nierstrasz (oscar@cui.uucp) .br Tim Clark (T.Clark@warwick.ac.uk) .br Henk Tullemans (tullemans@apolloway.prl.philips.nl) .br Johan Vromans (jv@mh.nl) .br Craig Stevenson (craig.r.stevenson@att.com) .br John Macdonald (jmm@eci386.uucp) .br Huub van de Wetering (wstahw@lso.win.tue.nl) .br erikt@cs.umu.se .br wstahw@lso.win.tue.nl .br mai@wolfen.cc.uow.oz .br Johan Garpendahl (garp@isy.liu.se) .br John Interrante (interran@uluru.stanford.edu) .br Larry Barbieri (lbarbieri@ll.mit.edu) .br Chris Adamo (adamo@ll.mit.edu)