3. Text Processing
3.1. Document Preparation
- o ED
-
Interactive context editor.
Random access to all lines of a file.
- O
-
Find lines by number or pattern.
Patterns may include:
specified characters,
don't care characters,
choices among characters,
repetitions of these constructs,
beginning of line,
end of line.
- O
-
Add, delete, change, copy, move or join lines.
- O
-
Permute or split contents of a line.
- O
-
Replace one or all instances of a pattern within a line.
- O
-
Combine or split files.
- O
-
Escape to Shell (command language) during editing.
- O
-
Do any of above operations on
every pattern-selected line in a given range.
- O
-
Optional encryption for extra security.
- o PTX
-
Make a permuted (key word in context) index.
- o SPELL
-
Look for spelling errors by comparing each word in a
document against a word list.
- O
-
25,000-word list includes proper names.
- O
-
Handles common prefixes and suffixes.
- O
-
Collects words to help tailor local spelling lists.
- o LOOK
-
Search for words in dictionary that begin with specified prefix.
- o TYPO
-
Look for spelling errors by a statistical technique;
not limited to English.
- o CRYPT
-
Encrypt and decrypt files for security.
3.2. Document Formatting
- o ROFF
-
A typesetting program for terminals.
Easy for nontechnical people to learn, and good
for simple documents.
Input consists of data lines intermixed with control lines,
such as
ROFF is deemed to be obsolete;
it is intended only for casual use.
- O
-
Justification of either or both margins.
- O
-
Automatic hyphenation.
- O
-
Generalized running heads and feet, with even-odd page
capability, numbering, etc.
- O
-
Definable macros for frequently used
control sequences (no substitutable arguments).
- O
-
All 4 margins and page size dynamically adjustable.
- O
-
Hanging indents and one-line indents.
- O
-
Absolute and relative parameter settings.
- O
-
Optional legal-style numbering of output lines.
- O
-
Multiple file capability.
- O
-
Not usable as a filter.
- o TROFF
-
- o NROFF
-
Advanced typesetting.
TROFF drives a Graphic Systems phototypesetter;
NROFF drives ascii terminals of all types.
This summary was typeset using TROFF.
TROFF and NROFF style is similar to ROFF, but they are capable of much more elaborate
feats of formatting,
when appropriately programmed.
TROFF and NROFF accept the same input language.
- O
-
All ROFF capabilities available or definable.
- O
-
Completely definable page format keyed to dynamically planted
``interrupts'' at specified lines.
- O
-
Maintains several separately definable typesetting environments (e.g., one for
body text, one for footnotes, and one for unusually elaborate
headings).
- O
-
Arbitrary number of output pools can be combined at will.
- O
-
Macros with substitutable arguments, and macros invocable
in mid-line.
- O
-
Computation and printing of numerical quantities.
- O
-
Conditional execution of macros.
- O
-
Tabular layout facility.
- O
-
Positions expressible in inches, centimeters, ems, points,
machine units
or arithmetic combinations thereof.
- O
-
Access to character-width computation for unusually difficult
layout problems.
- O
-
Overstrikes, built-up brackets, horizontal and vertical line drawing.
- O
-
Dynamic relative or absolute positioning and size selection,
globally or at the character level.
- O
-
Can exploit the characteristics of the terminal being used,
for approximating special characters, reverse motions,
proportional spacing, etc.
The Graphic Systems typesetter has a
vocabulary of several 102-character fonts (4 simultaneously)
in 15 sizes.
TROFF provides
terminal output for rough sampling of the product.
NROFF will produce multicolumn output on terminals capable of reverse line feed,
or through the postprocessor COL.
High programming skill is required to exploit the formatting
capabilities of TROFF and NROFF, although unskilled personnel can easily be trained
to enter documents according to canned formats
such as those provided by MS, below.
TROFF and EQN are essentially identical to NROFF and NEQN
so it is usually possible to define interchangeable
formats to produce
approximate proof copy on terminals
before actual typesetting.
The preprocessors MS, TBL, and REFER are fully compatible
with TROFF and NROFF.
- o MS
-
A standardized manuscript layout package
for use with NROFF/TROFF.
This document was formatted with MS.
- O
-
Page numbers and draft dates.
- O
-
Automatically numbered subheads.
- O
-
Footnotes.
- O
-
Single or double column.
- O
-
Paragraphing, display and indentation.
- O
-
Numbered equations.
- o EQN
-
A mathematical typesetting preprocessor for TROFF.
Translates easily readable formulas, either in-line or displayed, into
detailed typesetting instructions.
Formulas are written in a style like this:
-
sigma sup 2 ~=~ 1 over N sum from i=1 to N ( x sub i - x bar ) sup 2
which produces:
- O
-
Automatic calculation of size changes for subscripts, sub-subscripts,
etc.
- O
-
Full vocabulary of Greek letters and special symbols, such as `gamma', `GAMMA', `integral'.
- O
-
Automatic calculation of large bracket sizes.
- O
-
Vertical ``piling'' of formulae for matrices, conditional
alternatives, etc.
- O
-
Integrals, sums, etc., with arbitrarily complex limits.
- O
-
Diacriticals: dots, double dots, hats, bars, etc.
- O
-
Easily learned by nonprogrammers and mathematical typists.
- o NEQN
-
A version of EQN for NROFF;
accepts the same input language.
Prepares formulas for display on
any terminal that NROFF knows about,
for example, those based on Diablo printing mechanism.
- O
-
Same facilities as EQN within graphical capability of
terminal.
- o TBL
-
A preprocessor for NROFF/TROFF
that translates simple descriptions of table layouts
and contents into detailed typesetting instructions.
- O
-
Computes column widths.
- O
-
Handles left- and right-justified columns,
centered columns and decimal-point
alignment.
- O
-
Places column titles.
- O
-
Table entries can be text,
which is adjusted to fit.
- O
-
Can box all or parts of table.
- o REFER
-
Fills in bibliographic citations in a document
from a data base (not supplied).
- O
-
References may be printed in any style,
as they occur or collected at the end.
- O
-
May be numbered sequentially, by name of author, etc.
- o TC
-
Simulate Graphic Systems typesetter on Tektronix 4014 scope.
Useful for checking TROFF page layout before typesetting.
- o GREEK
-
Fancy printing on Diablo-mechanism terminals
like DASI-300 and DASI-450,
and on Tektronix 4014.
- O
-
Gives half-line forward and reverse motions.
- O
-
Approximates Greek letters and other special characters
by overstriking.
- o COL
-
Canonicalize files with reverse line feeds
for one-pass printing.
- o DEROFF
-
Remove all TROFF commands from input.
- o CHECKEQ
-
Check document for possible errors in EQN usage.