Le GNU a2ps - Features of GNU a2ps 4.13

Le GNU a2ps

Features of GNU a2ps 4.13

General Info

What is GNU a2ps
Features of 4.13
Features of 4.12
Features of 4.10.4
Contributions
Projects Related with a2ps
Ports and Packages
Ports to M$ world
Giving Feedback

Documentation

Manual of 4.12
Manual of 4.10
Manual of 4.8
Glossary
Known Bugs
FAQ
a2ps List Archive

Extensions

Sheets Files
Delegations

Internationalization

a2ps & I18n
Existing Translations
Working on Translation
Guide Line

Development

Download
NEWS

Le GNU a2ps 4.13 offers many new features (see NEWS). The documentation is also available.

The main features of 4.13 are:

  • Pretty Printing. Many languages are supported thanks to style sheets, easy to understand, patch and develop. Regular expressions can be used. Here is an example.

  • Automatic style selection. A stand alone file allows you to define the rules (on the name, or on the result of a call to `file (1)') that automatically select a style sheet.

  • Delegations. This gives you a uniform access to most PostScript producers, such as Netscape (HTML to PostScript), psnup (PostScript to PostScript), groff (roff to PostScript) and may others. Actually anything you want! Here is a good example:

    gargantua demo $ a2ps ogonkify.1 glibc.dvi.gz a2ps.texi -o demo.ps
    [ogonkify.1 (roff, delegated to Groff): 3 pages on 2 sheets]
    [glibc.dvi.gz (gzip, delegated to Gzip): 601 pages on 301 sheets]
    [a2ps.texi (texinfo, delegated to texi2dvi): 81 pages on 41 sheets]
    [Total: 684 pages on 342 sheets] saved into the file `demo.ps'
    There are more details here.
  • (Weak) PPD support. Which means there is automatic fonts downloading. It also means that you can break through the 13 basic Level 1 PostScript fonts, and go to the 35 Level 2 (I hate Times, Palatino is much better :-).

  • Named outputs (printers etc.). Symbolic outputs are much more powerful. For instance you may define `file' to be the symbolic output `> $N.#.', which means that `a2ps foo.c bar.h -P file' will save the PostScript into `foo.ps'. Thanks to Version control a la GNU Emacs, there is no fear to override important files: if `foo.ps' existed, it has been moved as `foo.ps~', or `foo.ps~1~', or destroyed: upon your own choice.

    An example of named outputs is the pseudo printer pdf which uses gs to transform output from a2ps into a PDF document.

    % a2ps -1P pdf article.tex
    [article.tex (tex, delegated to texi2dvi) : 10 pages on 10 sheets]
    [Total : 10 pages sur 10 feuilles] sent to the printer  pdf 
  • Contributions. Some tools are provided with a2ps: Card which prints reference cards of your favorit programs, psmandup which helps you to print Duplex on non Duplex printers, fixps which automatically fixes most common problems in PostScript files, psset which includes special printer requests (eg., Duplex) in any PostScript file, and pdiff which makes pretty contextual diff (to be printed for instance).

  • Encodings. Many encodings are supported, most notably the ISO Latin 2, 3, 4, 5 and 6 are quite well handled, thanks to Ogonkify (by Juliusz Chroboczek).

  • Output Design is customizable (colors, fonts etc.).

  • Native Language Support. a2ps speaks your tongue. Well, if somebody taught it :) Many tongues are yet supported, but you can also contribute (See the translation page).

The NEWS file is:

 * Options:
   - It can no longer happen that --version and --help fail.
   - Fixed the reversed reading of the argument of --truncate.
   - --which, reports the full file name of library files.
   - --glob, globs in the library.
 * Predefined User Options
   - pdf
     `a2ps -=pdf foo' creates foo.pdf.  Uses Adobe Distiller, or
     Ghostscript's ps2pdf.  The fake printer `pdf' is also available.
     Contributed by Manfred Schwarb.
   - simplex and s1
     Forces a2ps to issue a `Simplex' request.  `a2ps -s1' (currently)
     only tells a2ps *not* to issue a Duplex request.
   - display
     Wrapper around the pseudo printer `display' requiring colored
     output, one up.
 * Encodings:
   - ISO 8859-13.
 * Contributions:
   - Ogonkify supports ISO-8859-13 (thanks to Dariusz Ramanauskas).
   - Ogonkify supports the Euro glyph.
   - pdiff and card
     a2ps options are now to be given after `--'.  For instance
       pdiff old new -- -1 -P display
   - fixps
     stops smashing blank lines.
 * Style sheets:
   - asn1.ssh, thanks to Philippe Coucaud.
   - autoconf.ssh
   - awk.ssh, thanks to Edward Arthur.
   - b.ssh, thanks to Philippe Coucaud.
   - bc.ssh
   - cidl.ssh, CORBA IDL, thanks to Bob Phillips.
   - cxx.ssh is the new name for C++ (formerly cpp.ssh).
   - cpp.ssh, CPP.
   - haskell.ssh, thanks to Ilya Beylin.
   - js.ssh, JavaScript, thanks to Scott Pakin.
   - lout.ssh, thanks to Jean-Baptiste Nivoit.
   - maple.ssh, thanks to Richard J Mathar.
   - mly.ssh, CAML Yacc, thanks to Jean-Baptiste Nivoit.
   - ocaml.ssh, thanks to Markus Mottl.
   - pov.ssh, thanks to Jean-Baptiste Nivoit.
   - sed.ssh
   - sml.ssh, Standard ML, thanks to Franklin Chen.
   - shell.ssh, ancestors for *sh.ssh.
   - vba.ssh, Visual Basic for Applications, thanks to Dirk Eddelbuettel.
   - tiger.ssh, related to the toy language of the books
     "Modern Compiler Implementation", by Andrew W. Appel
     http://www.cs.princeton.edu/~appel/modern/
   - xs.ssh, Perl XS, thanks to Kestutis Kupciunas.
 * The syntax of sheets.map is improved
 * Regexp are now `egrep' and `Perl' like, and no longer `Emacs' like.
   Before some characters had to be backslashed to denote the
   operators.  Now, it is just the opposite.  For instance before
   `\\(' and `\\)' used to be the grouping operator and `(' and `)'
   were standing for the characters parentheses; while now it is the
   converse.
   Affected characters are `(', `)', `|', `{', and `}'.
   Make sure to update your own style sheets.
 * Error Signaling
   - Failing compilations of regexp in style sheets now report the filename
     and line where the error occured.
 * Delegations
   - File names with spaces are correctly processed.
   - MetaFont and MetaPost thanks to Scott Pakin.
   - The TeX delegations no longer remove the local DVI file.
 * Number of wrapped lines
   Is reported if the variable `cfg.wrapped' is set (which is the default).
 * Prologues
   - fixed.pro uses only fixed size fonts, in order to preserve the
     indentation.
   - ul.pro underlines where italics are expected.  Meant to print
     formatted man pages.
 * Wrapped lines
   The number of lines which were wrapped is reported.
   Contributed by Scott Pakin.