prettyp 2.0.2


  • Examples:
    (PostScript)

  • Manual page
    (Postscript)

  • Download

  • Change Log:
    2.0.2: buggy tgrindmac.tex updated
    2.0.1: C comment-block colorization bug fixed (tgrindmac.tex)
    2.0: colour support, and VHDL
    1.2.2: lang: support for ".hh" extensions
    1.2.1: prettyp: debugging off (set -x)
    1.2.0: lang: guess interpreter even if it is followed by flags
    1.1.4: lang: added mapping for .h files
    1.1.3: lang.src was missing
    1.1.2: prettyp: files were not being deleted from /tmp
    1.1.1: prettyp: support for files specified with directory components
    1.1.0: understands Makefiles
    1.0.3: man-page: note about charset limitation bug
    1.0.2: README: note about location of perl
    1.0.1: lang: added python and icn to alist

The prettyp package consists of a suite of programs that generates "pretty" PostScript source code listings using TeX. For a given language, comments are rendered in Times Roman italics, keywords in bold, string literals in Courier (colour output is optional); line-numbers, every 10 lines in a tiny font (line-numbers on every line are optional), and function/ subroutine/ procedure definitions, in a larger font, are displayed along the right margin. Several PostScript examples illustrate the C and Java code; shell, Tcl and Perl scripts and a Makefile.

Language Support

Languages supported by prettyp are: C, C++, FORTRAN77, ISP, Icon, Java, LDL, Emacs Mock Lisp, Model, Modula2, Pascal, Perl, Python, RATFOR, Russell, sh/csh, Tcl, VHDL and yacc grammer. Makefiles and Imakefiles are also recognized.

Support for additional languages can be easily added, see Extending Language Support below.

Requirements

You will need TeX to be installed on your system for this program to work. You will need perl to use the prettyp front-end (specifically, the script lang, that performs automatic language detection).

Platforms

tfontedpr, the program that does all the actual work, has been successfully built on i586 GNU/Linux 2.0.34, SPARC Solaris 2.5.1, 2.6, and SunOS 4.1.4. It should compile without problem for most other Unix platforms.

Extending Language Support

To add pretty print capabilities for other languages, add the language definition to the vgrindefs database and modify the alist in the lang perl script adding a file-extension/interpreter to language mapping.

If you wish to share your language database, email your language definitions and the changes to lang, to the maintainer.

History

The original suite was called tgrind. It used tfontedpr, written by Van Jacobson, which was originally based on BSD 4.2 vfontedpr, written by Bill Joy & Dave Presotto, which used troff. The complete contents of the original tgrind package are included for backwards compatibility.

In December 1998 the tgrind suite was ported to build under GNU/Linux and tested under Solaris, with TeX (Web2C 7.2) 3.14159 by Luis A. Fernandes (maintainer) & Jason M. Naughton at the Department of Electrical and Computer Engineering, Ryerson Polytechnic University. Two helper programs, prettyp and lang were added to facilitate using the tgrind package and the whole package was renamed "prettyp".

In early 2002 Sean Kamath re-wrote prettyp and added colour support to tfontedpr.

Wish List

  • Language support for: zsh, MATLAB
  • 8-bit clean

prettyp / Luis Fernandes / elf@ee.ryerson.ca

Last Modified: Fri Oct 18 14:41:39 2002