Department of Computing Imperial College
Text and graphics viewing and processing

There are a number of document processing facilities available. They are generally used to produce postscript documents for printing.

Text processing

enscript
Enscript converts text files to Postscript language format for printing. It is particularly useful for printing source listings to a postscript printer in a neat compact format. For example, the following command will print a file in two coloumns, with headings on the top of each page. The page will be printed in landscape format.

	enscript -2Gr -P<printer name> <files> 
The enscript command is particularly useful when double-sided laser printing is available, allowing you to dramatically reduce the amount of paper used. Enscript is part of the Transcript Postscript Utilities Suite.

latex
The LaTeX language is described in LaTeX-A Document Preparation System by Leslie Lamport, published by Addison-Wesley (held in our Technical Library). LaTeX is a TeX macro package, not a modification to the TeX source program, so all the capabilities described in tex are present.

The LaTeX macros encourage writers to think about the content of their documents, rather than the form. The ideal, not always realized, is to have no formatting commands (like ``switch to italic'' or ``skip 2 picas'') in the document at all; instead, everything is done intensionally: ``emphasize'', ``start a section''.

tex
TeX formats the interspersed text and commands contained in the named files and outputs a typesetter independent file (called DVI which is short for DeVice Independent). TeX capabilities and language are described in The TeXbook by Donald E. Knuth, published by Addison-Wesley (held in our Technical Library).

Document Viewing Utilities

xdvi
Xdvi is a program which runs under the X window system. It is used to preview DVI files, such as are produced by TeX.

This program has the capability of showing the file shrunken by various (integer) factors, and also has a ``magnifying glass'' which allows one to see a small part of the unshrunk image momentarily.

ghostview
The ghostview program provides an X11 user interface for the ghostscript interpreter. Ghostview and ghostscript function as two cooperating programs. Ghostview creates the viewing window and ghostscript draws in it.

Graphics viewing and conversion

xv
xv is an interactive image display for the X Window System. It can do the following;

ppm
This is the portable pixmap file format, it is a lowest common demoninator colour image file format. It is extremely useful for changing the format of an image.
pbm
The portable bitmap format is a lowest common denominator monochrome file format. It was originally designed to make it reasonable to mail bitmaps between different types of machines using the typical stupid network mailers we have today. Now it serves as the common language of a large family of bitmap conversion filters.
pgm
The portable graymap format is a lowest common denominator grayscale file format.
pnm
The pnm programs operate on portable bitmaps, graymaps, and pixmaps, produced by the pbm, pgm, and ppm segments.
Then using the complete suite of ppm, pbm, pgm and pnm utilities it should be possible to change a picture from any format to any format. They can be used in conjuction with xwd or xv to grab screen images.

© CSG / 30-aug-00 / help@doc.ic.ac.uk