PowerAda a2ps

From OC Systems Wiki!
Jump to: navigation, search


NAME

a2ps - ASCII to PostScript converter with pretty-printing capabilities.

SYNOPSIS

a2ps [OPTIONS] [FILES]

DESCRIPTION

a2ps formats named ASCII files for printing in a PostScript printer; if no file is given, a2ps reads from the standard input. The output may be sent to a printer or to the standard output or saved into a file.

The format used is 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, pretty-printing, symbol substitution etc. This is very useful for making archive listings of programs.

OPTIONS

Mandatory arguments to long options are mandatory for short options too. Long options marked with * require a yes/no argument, corresponding short options stand for `yes'.

Options which Perform Tasks (exit successfully):

-V, --version
Display version.
--help
Display this help.
--copyright
Display Copyright and copying conditions.
--guess
Display guessed types of FILES.
--list=topic
Display a report on topic.
where topic can be any non-ambiguous abbreviation of
  • defaults: default settings and parameters,
  • features: short list of supported media, encodings, style sheets etc.
  • delegations, encodings, variables, media, ppd, printers, prologues,style-sheets, user-options: detailed list of the named items.

GLOBAL OPTIONS

-q, --quiet, --silent.
Be really quiet.
-v, --verbose, --Verbose[=LEVEL]
Set verbosity on, or to LEVEL.
-=
User-option=OPTION. Use the user defined shortcut OPTTION.
--debug
Enable debugging features.
--variable=KEY[
VALUE]
Unset or set the macro K to the value V.

Sheets:

-M, --medium=NAME
Use output medium NAME.
-1, -2, ..., -9
Predefined layouts for 1, ..., 9 virtual pages.
--columns=NUM
Number of columns per sheet (NUM > 0).
--rows=NUM
Number of rows per sheet (NUM > 0).
--major=DIRECTION
First fill (DIRECTION=)rows, or columns.
-r landscape
Print in landscape mode.
-R, --portrait
Print in portrait mode.
-j, --borders*
Print borders around columns.
-A, --compact*
Allow two files on the same sheet.
--margin[=NUM]
Define an interior margin of size NUM.

Virtual pages:

--line-numbers=NUM
Precede each NUM lines with its line number.
-C
Alias for --line-numbers=5.
-f, --font-size=SIZE
Use font SIZE (float) for the body text.
-L, --lines-per-page=NUM
Specify how many lines are printed on each page.
-l, --chars-per-line=NUM
Specify how many columns are printed per page.
-m, --catman
Process the file as a man (same as -L66).
-T, --tabsize=NUM
Set tabulator size to NUM.
--non-printable-format=FMT
Specify how non-printable chars are printed.

Headings:

-B, --no-header
No page headers at all.
-b, --header[=TEXT]
Set page header.
-u, --underlay[=TEXT]
Print TEXT under every page.
--center-title[=TEXT]
Set page title to TITLE.
--left-title[=TEXT]
Set left and right page title to TEXT.
--right-title[=TEXT]
--left-footer[=TEXT]
Set sheet footers to TEXT.
--footer[=TEXT]
TEXT may use special $ and % escapes
--right-footer[=TEXT]

Input:

-a, --pages[=RANGE]
Select the pages to print.
-c, --truncate-lines*
Cut long lines.
-i, --interpret*
Interpret tab, bs and ff chars.
--end-of-line=TYPE
Specify the eol char (TYPE: r, n, nr, rn, any).
-X, --encoding=NAME
Use input encoding NAME.
-t, --title=NAME
Set the name of the job.
--stdin=NAME
Set the name of the input file stdin.
--prologue=FILE
Include FILE.pro as PostScript prologue.
--print-anyway*
Force binary printing.
-Z, --delegate*
Delegate files to another application.

Pretty-printing:

-E, --pretty-print[=LANG]
Enable pretty-printing (set style to LANG).
--highlight-level=LEVEL
Set pretty printing highlight LEVEL. LEVEL can be none, normal or heavy.
-g
alias for --highlight-level=heavy.
--strip-level=NUM
Level of comments stripping

Output:

-o, --output=FILE
Leave output to file FILE. If FILE is `-', leave output to stdout.
--version-control=WORD
Override the usual version control.
--suffix=SUFFIX
Override the usual backup suffix.
-P, --printer=NAME
Send output to printer NAME.
-d
send output to the default printer.

PostScript:

--ppd[=KEY]
Automatic PPD selection or set to KEY.
-n, --copies=NUM
Print NUM copies of each page.
-s, --sides=NUM
Number of sheet sides (recto/recto-verso).
-D, --setpagedevice=K[
V]
Pass a page device definition to output.
-S, --statusdict=K[
[:]V]
Pass a statusdict definition to the output.
-k, --page-prefeed
Enable page prefeed.
-K, --no-page-prefeed
Disable page prefeed.

EXIT STATUS

The following exit values are returned:

  • 0 terminated normally.
  • 1 an error occurred.
  • 2 bad argument was given.
  • 3 unknown language was given.

ENVIRONMENT VARIABLES

POWERADA
This must be defined and indicate the powerada/ada95 directory in the PowerAda installation.
POWERADA_BASELINES
Names a baselines file identifying aliases for baseline projects.

EXAMPLES

To print a file doc.txt, type:

 a2ps doc.txt

a2ps sends the file doc.txt to the default printer, writing two columns of text on a single face of the sheet. Indeed, by default a2ps does as if you had given the option `-2', standing for two virtual pages.

Say now that you want to print the C file bar.c, and its header foo.h, on 4 virtual pages, and save it into the file `foobar.ps'. Just type:

a2ps foo.h bar.c -4 -ofoobar.ps

The option `-4' tells a2ps to make four virtual pages: two rows by two columns. The option `-o' (which is the short version of `--output=foobar.ps') specifies the output file. The long options must always be separated by spaces, though short options with no arguments may be grouped. Note too that the options may be before or after the files, it does not matter

SEE ALSO

The full documentation for a2ps is maintained as a Texinfo manual. If the info and a2ps programs are properly installed at your site, the command info a2ps should allow you to access the manual as an hypertext.

AUTHOR

Written by Akim.Demaille@inf.enst.fr and Miguel.Santana@st.com. News, updates and documentation, visit: http://www.inf.enst.fr/~demaille/a2ps/

COPYRIGHT

Copyright c 1988, 89, 90, 91, 92, 93 Miguel Santana Copyright c 1995, 96, 97, 98 Akim Demaille, Miguel Santana This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.