GNU a2ps language support

Current sheets.map

It is the list of rules to decide what style sheet to use.

Sumary of current style sheets

There is a package which contains them all. Its index (sum of the style sheets version number) is 89.320, and the highest requirement is a2ps version 4.13. Links point to their detailed exposure.

Detailed list of current style sheets

Links point to their files.

  • 68000 version 1.3.

    It requires a2ps version 4.9. It inherits from: cpp.ssh.

    Althought designed at the origin for the 68k's assembler, this style sheet seems to handle rather well other dialects.

  • a2ps configuration file version 1.3.

    It requires a2ps version 4.13.

    Meant to print files such as `a2ps.cfg', or `.a2ps/a2psrc', etc.

  • a2ps style sheet version 1.2.

    It requires a2ps version 4.9.

    Second level of highligthing (option `-g')) substitutes the LaTeX symbols.

  • Ada version 1.3.

    It requires a2ps version 4.13.

    This style sheets cover Ada 95. If you feel the need for Ada 83, you'll have to design another style sheet.

  • ASN.1 version 1.1.

    Written by Philippe Coucaud. It requires a2ps version 4.10.

    ASN.1 (Abstract Syntax Notation One) is used to define the protocol data units (PDUs) of all application layer protocols to date.

  • Autoconf version 1.1.

    It requires a2ps version 4.13. It inherits from: sh.ssh.

    Suitable for both configure.in and library m4 files.

  • AWK version 1.0.

    Written by Edward Arthur. It requires a2ps version 4.9.

    This style is devoted to the AWK pattern scanning and processing language. It is supposed to support classic awk, nawk and gawk.

  • B version 1.1.

    Written by Philippe Coucaud. It requires a2ps version 4.13.

    B is a formal specification method mostly used to describe critical systems. It is based on the mathematical sets theory.

  • BC version 0.1.

    It requires a2ps version 4.13.

    bc is an arbitrary precision calculator language.

  • Bourne Shell version 1.7.

    It requires a2ps version 4.13. It inherits from: shell.ssh.

    Some classical program names, or builtin, are highlighted in the second level of pretty-printing.

  • C version 1.6.

    It requires a2ps version 4.13. It inherits from: cpp.ssh.

    This style does not highlight the function definitions. Another style which highlights them, GNUish C, is provided (gnuc.ssh). It works only if you respect some syntactic conventions.

  • C Shell version 1.1.

    Written by Jim Diamond. It inherits from: shell.ssh.

    Some classical program names, and/or builtins, are highlighted in the second level of pretty-printing.

  • C++ version 1.6.

    It requires a2ps version 4.13. It inherits from: c.ssh.

    Should handle all known variations of C++. Most declarations (classes etc.) are not highlighted as they should be. Please, step forward!

  • CAML version 1.0.

    It inherits from: ocaml.ssh.

    This style is obsolete: use OCaml instead.

  • ChangeLog version 1.2.

    It requires a2ps version 4.13.

    This style covers the usual ChangeLog files.

  • Claire version 1.2.

    It requires a2ps version 4.9.

    Claire is a high-level functional and object-oriented language with advanced rule processing capabilities. It is intended to allow the programmer to express complex algorithms with fewer lines and in an elegant and readable manner. To provide a high degree of expressivity, Claire uses:

    • A very rich type system including type intervals and second-order types (with dual static/dynamic typing),
    • Parametric classes and methods,
    • An object-oriented logic with set extensions,
    • Dynamic versioning that supports easy exploration of search spaces.
    To achieve its goal of readability, Claire uses
    • set-based programming with an intuitive syntax,
    • simple-minded object-oriented programming,
    • truly polymorphic and parametric functional programming,
    • a powerful-yet-readable extension of DATALOG to express logical conditions,
    • an entity-relation approach with explicit relations, inverses, unknown values and relational
    • operations.
    More information on claire can be found on claire home page.

  • Common Lisp version 1.3.

    Written by Juliusz Chroboczek. It requires a2ps version 4.13.

    It is not very clear what should be considered as a `keyword' in Common Lisp. I like binders, control structures and declarations to be highlighted, but not assignments. Names of defstructs are not highlighted because this would not work with defstruct options.

  • Coq Vernacular version 1.0.

    This style is devoted to the Coq v 5.10 vernacular language.

  • CORBA IDL version 0.1.

    Written by Bob Phillips. It requires a2ps version 4.13.

    A first attempt at a style sheet for OMG CORBA IDL. I believe I captured all the keywords for CORBA 2.2 IDL. I also stole code from gnuc.ssh to print the method names in bold face. I'm not sure I quite like my own choices for Keyword_strong and Keyword, so I'm looking for feedback. Note that, as with gnuc.ssh, for a method name to be noted as such, the left parenthesis associated with the argument list for the method must appear on the same line as the method name.

  • CPP version 1.0.

    It requires a2ps version 4.13.

    C traditional preprocessor handling, mostly meant to be inherited.

  • dc_shell version 0.2.

    Written by Philippe Le Van.

    Synopsys Design Compiler is a synthesis tool used by electronic companies for the design of their chips. This sheet is very incomplete, we have a lot of keywords to add, eventually options to highlight... The Label_strong style is used for commands which change the design.

  • Eiffel version 1.1.

    It requires a2ps version 4.9.

    Eiffel is an object oriented language that also includes a comprehensive approach to software construction: a method. The language itself is not just a programming language but also covers analysis, design and implementation. Heavy highlight uses symbols to represent common math operators.

  • Emacs Lisp version 2.1.

    Written by Didier Verna. It requires a2ps version 4.13.

    This style sheet includes support for some extensions dumped with XEmacs.

  • Encapsulated PostScript version 1.1.

    It requires a2ps version 4.13. It inherits from: ps.ssh.

    Illegal PostScript operators are highlighted as Errors.

  • Extended Tcl version 1.0.

    Written by Phil Hollenback. It requires a2ps version 4.10. It inherits from: tcl.ssh.

    Extensions to plain Tcl.

  • Fortran version 2.0.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.10. It inherits from: for90kwds.ssh.

    There are several Fortran dialects, depending whether, on the one hand, you use Fortran 77 or Fortran 90/95, and, on the other hand, Fixed form comments, or Free form comments. The style sheets for77kwds and for90kwds implements keywords only, while the style sheets for-fixed and for-free implements comments only. This style sheet tries to support any of the various flavors (Fortran 77/90/95, fixed or free form). For more specific uses, you should use either:

    • for77-fixed, for Fortran 77 fixed form,
    • for77-free, for Fortran 77 free form,
    • for90-fixed, for Fortran 90/95 fixed form,
    • for90-free, for Fortran 90/95 free form.

  • Fortran 77 Fixed version 0.1.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.10. It inherits from: for77kwds.ssh, for-fixed.ssh.

    Dedicated to Fortran 77 in fixed form, i.e., comments are lines starting with c, C, or *, and only those lines are comments.

  • Fortran 77 Free version 0.1.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.10. It inherits from: for77kwds.ssh, for-free.ssh.

    Dedicated to Fortran 77 in free form, i.e., comments are introduced by ! anywhere on the line, and nothing else is a comment.

  • Fortran 77 Keywords version 0.60.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.13.

    This sheet implements only Fortran 77 keywords, and avoids implementing comments support. This is to allow for implementation of either fixed or free source form. See the documentation of the style sheet fortran for more details.

  • Fortran 90 Fixed version 0.1.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.10. It inherits from: for90kwds.ssh, for-fixed.ssh.

    Dedicated to Fortran 90/95 in fixed form, i.e., comments are lines starting with c, C, or *, and only those lines are comments.

  • Fortran 90 Free version 0.1.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.10. It inherits from: for90kwds.ssh, for-free.ssh.

    Dedicated to Fortran 90/95 in free form, i.e., comments are introduced by ! anywhere on the line, and nothing else is a comment.

  • Fortran 90 Keywords version 0.52.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.13. It inherits from: for77kwds.ssh.

    This sheet implements the superset which Fortran 90 and Fortran 95 provide over Fortran 77. See the documentation of the style sheet fortran for more details.

  • Fortran Fixed version 0.21.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.10.

    Implements comments of Fortran in fixed form, i.e., comments are lines starting with c, C, or *, and only those lines are comments. No other highlighting is done. See the documentation of the style sheet fortran for more details.

  • Fortran Free version 0.2.

    Written by Denis Girou, Alexander Mai. It requires a2ps version 4.10.

    Dedicated to Fortran in free form, i.e., comments are introduced by ! anywhere on the line, and nothing else is a comment.

  • GNUish C version 1.3.

    It requires a2ps version 4.13. It inherits from: c.ssh.

    Declaration of functions are highlighted only' if you start the function name in the first column, and it is followed by an opening parenthesis. In other words, if you write

    int main (void)
    
    it won't work. Write:
    int
    main (void)
    

  • GNUMakefile version 0.4.

    Written by Alexander Mai. It requires a2ps version 4.13. It inherits from: make.ssh.

    Special tokens of GNUmakefiles and non terminal declarations are highlighted.

  • Haskell version 1.3.

    Written by Ilya Beylin. It requires a2ps version 4.13.

    Haskell: non-strict functional programming language http::/www.haskell.org/

  • HTML version 1.1.

    Written by Wesley J. Chun. It requires a2ps version 4.13.

    This style is meant to pretty print HTML source files, not to simulate its interpretation (i.e., `foo' does not print `foo' in bold). If you really meant to print the result of the HTML file interpreted', then you should turn the delegations on, and make sure `a2ps' has HTML delegations.

  • IDL version 1.1.

    Written by Robert S. Mallozzi, Manfred Schwarb. It requires a2ps version 4.12.

    Style sheet for IDL 5.2 (Interactive Data Language). Obsolete routines are not supported. http://www.rsinc.com.

  • InstallShield 5 version 1.0.

    Written by Alex. It requires a2ps version 4.9. It inherits from: cpp.ssh.

    InstallShield5 _TM_ RUL script.

  • Java version 1.3.

    Written by Steve Alexander. It requires a2ps version 4.13.

    Documentation comments are mapped to strong comments, and any other comment is plain comment.

  • JavaScript version 1.1.

    Written by Scott Pakin. It requires a2ps version 4.13.

    Keywords used are everything listed in the Client-Side JavaScript Reference 1.3, plus "undefined" (why isn't that listed?) and "prototype". I omitted the semi-standard a2ps optional operators for equality, because JavaScript's use of both strict- and non-strict equality might ambiguate the output. Finally, regular expressions are formatted like strings.

  • LACE version 1.0.

    It requires a2ps version 4.9.

    This is meant for the Eiffel equivalent of the Makefiles.

  • Lex version 1.3.

    It requires a2ps version 4.13. It inherits from: c.ssh.

    In addition to the C constructs, it highlights the declaration of states, and some special `%' commands.

  • Lout version 1.0.

    Written by Jean-Baptiste Nivoit. It requires a2ps version 4.12.

    This is the style for Lout files.

  • Mail Folder version 1.14.

    It requires a2ps version 4.13.

    To use from elm and others, it is better to specify `-g -Email', since the file sent to printer is no longer truly a mail folder. This style also suits to news. `--strip' options are also useful (they strip "useless" headers). Whenever the changes of encoding are clear, a2ps sets itself the encoding for the parts concerned. Tag 1 is the subject, and Tag 2 the author of the mail/news. Note: This style sheet is _very_ difficult to write. Please don't report behavior you don't like. Just send me improvements, or write a Bison parser for mails.

  • Makefile version 1.3.

    It requires a2ps version 4.13. It inherits from: sh.ssh.

    Special tokens, and non terminal declarations are highlighted.

  • Management Information Base version 1.1.

    Written by Kelly Wiles. It requires a2ps version 4.9. It inherits from: cpp.ssh.

    The MIB file is of ASN.1 syntax.

  • Maple version 1.0.

    Written by Richard J Mathar. It requires a2ps version 4.12.

    Some classical program names, and/or builtins, are highlighted in the second level of pretty-printing.

  • MATLAB 4 version 1.2.

    Written by Marco De la Cruz. It requires a2ps version 4.9.

    Note that comments in the code should have a space after the %.

  • Modula 2 version 1.0.

    Written by Peter Bartke. It requires a2ps version 4.9.

  • Modula 3 version 1.1.

    It requires a2ps version 4.9.

    Modula-3 is a member of the Pascal family of languages. Designed in the late 1980s at Digital Equipment Corporation and Olivetti, Modula-3 corrects many of the deficiencies of Pascal and Modula-2 for practical software engineering. In particular, Modula-3 keeps the simplicity of type safety of the earlier languages, while providing new facilities for exception handling, concurrency, object-oriented programming, and automatic garbage collection. Modula-3 is both a practical implementation language for large software projects and an excellent teaching language. This sheet was designed based on Modula 3 home page.

  • o2c version 1.1.

    It requires a2ps version 4.9. It inherits from: c.ssh.

  • Oberon version 1.3.

    It requires a2ps version 4.9.

    Created by N. Wirth, Oberon is the successor of the Pascal and Modula-2 family of programming languages. It was specifically designed for systems programming, and was used to create the Oberon system in cooperation with J. Gutknecht. A few years later, the Oberon language was extended with additional object-oriented features to result in the programming language Oberon-2. Implementation of the sheet based on The Oberon Reference Site.

  • Objective C version 1.2.

    Written by Paul Shum. It requires a2ps version 4.9. It inherits from: c.ssh.

  • OCaml version 1.0.

    Written by Markus Mott.

    This style should also suit other versions of ML (caml light, SML etc.).

  • OCaml Yacc version 1.0.

    Written by Jean-Baptiste Nivoit. It requires a2ps version 4.12. It inherits from: ocaml.ssh.

    Should handle CAML Special Light parser files.

  • Octave version 1.0.

    Written by C.P. Earls. It requires a2ps version 4.9.

  • Oracle parameter file version 1.0.

    Written by Pierre Mareschal. It requires a2ps version 4.9.

    For init.ora parameter files.

  • Oracle PL/SQL version 1.0.

    Written by Pierre Mareschal.

    This style is to be checked.

  • Oracle SQL version 1.0.

    Written by Pierre Mareschal.

    a2ps-sql Pretty Printer Version 1.0.0 beta - 18-MAR-97 For comments, support for -- /*..*/ and //. This style is to be checked.

  • Oracle SQL-PL/SQL-SQL*Plus version 1.0.

    Written by Pierre Mareschal.

    18-MAR-97 For comments, support for -- /*..*/ and //. This style is to be checked.

  • Pascal version 1.9.

    It requires a2ps version 4.13.

    The standard Pascal is covered by this style. But some extension have been added too, hence modern Pascal programs should be correctly handled. Heavy highlighting maps mathematical symbols to their typographic equivalents.

  • Perl version 2.10.

    Written by Denis Girou. It requires a2ps version 4.13.

    As most interpreted languages, Perl is very free on its syntax, what leads to significant problems for a pretty printer. Please, be kind with our try. Any improvement is most welcome.

  • PostScript version 1.4.

    It requires a2ps version 4.13.

    Only some keywords are highlighted, because otherwise listings are quickly becoming a big bold spot.

  • PostScript Printer Description version 1.0.

    It requires a2ps version 4.13.

    Support for Adobe's PPD files.

  • Pov-Ray version 1.0.

    Written by Jean-Baptiste Nivoit. It requires a2ps version 4.13.

    Should handle Persistence Of Vision input files.

  • PreScript version 2.0.

    It requires a2ps version 4.9. It inherits from: symbols.ssh.

    This style defines commands in the canonic syntax of a2ps. It is meant to be used either as an input language, and to highlight the table of contents etc. It can be a good choice of destination language for people who want to produce text to print (e.g. pretty-printing, automated documentation etc.) but who definitely do not want to learn PostScript, nor to require the use of LaTeX.

  • PreTeX version 1.0.

    It requires a2ps version 4.9. It inherits from: symbols.ssh.

    This style sheets provides LaTeX-like commands to format text. It is an alternative to the PreScript style sheet, in which formating commands are specified in a more a2ps related syntax. It provides by the use of LaTeX like commands, a way to describe the pages that this program should produce.

  • Prolog version 1.1.

    Help is needed on this sheet.

  • Promela version 1.5.

    There is no way for this program to highlight send and receive primitives.

  • Python version 1.2.

    It requires a2ps version 4.9.

    Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python web site, and can be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation. The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C). Python is also suitable as an extension language for customizable applications.

  • Reference Card version 1.1.

    It requires a2ps version 4.13.

    This style sheet is meant to process help messages generated by Unix applications. It highlights the options (-short or --long), and their arguments. Normal use of this style sheet is through the shell script card (part of the a2ps package), but a typical hand-driven use is:

    program --help | a2ps -Ecard
    

  • REXX version 0.22.

    Written by Alexander Mai. It requires a2ps version 4.10.

    This style sheet supports REXX. You can get information about REXX from the REXX Language Association.

  • Sather version 1.0.

    It requires a2ps version 4.9.

    Sather is an object oriented language designed to be simple, efficient, safe, flexible and non-proprietary. One way of placing it in the `space of languages' is to say that it aims to be as efficient as C, C++, or Fortran, as elegant as and safer than Eiffel, and support higher-order functions and iteration abstraction as well as Common Lisp, CLU or Scheme. Implementation of the sheet based on the Sather home page. Heavy highlighting uses symbols for common mathematical operators.

  • Scheme version 1.2.

    It requires a2ps version 4.9.

    This style sheet is looking for a maintainer and/or comments.

  • SDL-88 version 1.0.

    Written by Jean-Philippe Cottin.

    --strip-level=2 is very useful: it cancels the graphical information left by graphic editors. Only the pure specification is then printed.

  • Sed version 1.0.

    It requires a2ps version 4.13.

    Comments and labels are highlighted. Other ideas are welcome! A lot of work is still needed.

  • Shell version 1.0.

    It requires a2ps version 4.13.

    This style sheet is not meant to be used directly, but rather an as ancestor for shell style sheets.

  • SQL 92 version 1.0.

    Written by Pierre Mareschal.

    18-MAR-97 This style is to be checked.

  • Standard ML version 1.1.

    Written by Franklin Chen, Daniel Wang.

    This style sheet takes advantage of the Symbol font to replace many ASCII operators with their natural graphical representation. This is enabled only at heavy highlighting.

  • Symbols version 1.0.

    It requires a2ps version 4.9.

    This style sheet should be a precursor for any style sheet which uses LaTeX like symbols.

  • TC Shell version 1.1.

    Written by Jim Diamond. It requires a2ps version 4.9. It inherits from: csh.ssh.

    C shell with file name completion and command line editing.

  • TeX version 1.11.

    Written by Denis Girou. It requires a2ps version 4.13. It inherits from: symbols.ssh.

    This is the style for (La)TeX files. It's mainly useful for people who develop (La)TeX packages. With `-g', common mathematical symbols are represented graphically.

  • Texinfo version 1.0.

    It requires a2ps version 4.13.

    Heavy highlighting prints the nodes on separate pages which title is the name of the node.

  • TeXScript version 1.0.

    It requires a2ps version 4.9. It inherits from: pre.ssh, pretex.ssh.

    TeXScript is the new name of what used to be called PreScript. New PreScript has pure a2ps names, PreTeX has pure TeX names, and TeXScript mixes both.

  • Tiger version 0.1.

    It requires a2ps version 4.10.

    Tiger is a toy language that serves as example of the book Modern Compiler Implementation by Andrew W. Appel.

  • tk version 1.2.

    Written by Larry W. Virden. It inherits from: tcl.ssh.

    Since everything, or almost, is a string, what is printed is not always what you would like.

  • Tool Command Language version 1.2.

    Written by Larry W. Virden.

    Since everything, or almost, is a string, what is printed is not always what you would like.

  • Unified Diff version 1.2.

    It requires a2ps version 4.13.

    This style is meant to be used onto the output unidiffs, that is to say output from `diff -u'. Typical use of this style is:

    diff -u old new | a2ps -Eudiff
    
    The prologue diff helps to highlight the differences (`a2ps -Ewdiff --prologue=diff').

  • Unity version 1.0.

    Written by Jean-Philippe Cottin.

    The graphic conversion of the symbols (option `-g') is nice.

  • VERILOG version 1.0.

    Written by Edward Arthur. It requires a2ps version 4.9.

    This style is devoted to the VERILOG hardware description language.

  • VHDL version 1.4.

    Written by Thomas Parmelan. It requires a2ps version 4.13.

    Non-textual operators are not highlighted. Some logical operators are printed as graphical symbols in the second level of pretty-printing.

  • Visual Basic for Applications version 1.0.

    Written by Dirk Eddelbuettel. It requires a2ps version 4.10.

  • Visual Tcl version 1.0.

    Written by Phil Hollenback. It requires a2ps version 4.10. It inherits from: tclx.ssh.

    All the Vtcl keywords that aren't in Tcl or TclX.

  • VRML version 1.0.

    Written by Nadine Richard. It requires a2ps version 4.12.

    According to Grammar Definition Version 2.0 ISO/IEC CD 14772.

  • wdiff version 1.0.

    This style is meant to be used onto the output of Franc,ois Pinard's program wdiff. wdiff is a utility that underlines the differences of words between to files. Where diff make only the difference between lines that have changed, wdiff reports words that have changed inside the lines. Typical use of this style is:

    wdiff old new | a2ps -Ewdiff
    
    wdiff can be found in usual GNU repositories. The prologue diff helps to highlight the differences (`a2ps -Ewdiff --prologue=diff').

  • XS version 0.1.

    Written by Kestutis Kupciunas. It requires a2ps version 4.13. It inherits from: gnuc.ssh.

    This style covers Perl XS language.

  • Yacc version 1.3.

    It requires a2ps version 4.13. It inherits from: c.ssh.

    Special tokens, and non terminal declarations are highlighted.

  • Z Shell version 1.3.

    It inherits from: sh.ssh.

    Zsh is a UNIX command interpreter (shell) usable as an interactive login shell and as a shell script command processor. Of the standard shells, zsh most closely resembles ksh but includes many enhancements. Zsh has comand line editing, builtin spelling correction, programmable command completion, shell functions (with autoloading), a history mechanism, and a host of other features. This style sheet highlights some classical program names and builtins in the second level of pretty-printing.