Contents of the FORMAT.DOC file
.cm text format program: documentation
.cm Source: format.doc
.cm Version: June 3, 1981.
.he text format program: user guide
.fo " page #
.pl 66 page length for regular computer paper
This document tells you how to use format,
a text formatting program.
Format is a transliteration of the text formatting
program described in the book
by Brian W. Kernighan and P. J. Plauger.
This book is published by Addison-Wesley, 1976.
I recommend that you buy a copy of Software Tools
if you intend to make heavy use of this program.
The format program accepts a file of text
interspersed with formatting commands.
The format program produces an output file
which contains the formatted text.
The output file can then be printed using an
editor or the CP/M type command.
Format commands are instructions to the format
program telling the program how to arrange text
on a page.
Any line which begins with a period in the first
column is assumed to be a command line.
Format commands all consist of two letters which
immediately follow the beginning period.
Unknown commands, as well as commands in upper case,
are also ignored.
I use .cm to indicate comment lines.
I also translate commands to upper case if I want
to temporarily disable a command.
Most commands can accept arguments.
If the argument is preceded by a plus or minus sign
then the argument changes an internal value by some
Otherwise, the internal value is set to the value
of the argument.
For example, the command .ls 2
sets the line spacing to 2,
while the command .ls +2 increases the line spacing
by 2 lines.
Here is a list of the format commands.
I am assuming that you have some experience using
similar text formatters because the description
of what these commands do is sketchy.
If you have doubts, read Software Tools.
command break? default action
.bp yes n=+1 begin page # n
.br yes cause break
.ce n yes n=1 center next n lines
.fi yes start fill mode
.fo no empty footer title
.he no empty header title
.in n no n=0 indent n spaces
.ls n no n=1 set line spacing=n
.nf yes stop fill mode
.pl n no n=66 set page length=n
.rm n no n=60 set right margin=n
.sp n yes n=1 space down n lines
.ti n yes n=0 temp indent n spaces
.ul n no n=1 underline next n lines
A break stops the filling of the current line.
Breaks are needed between paragraphs.
Lines containing nothing but blanks
always cause one blank line to be output.
A line which starts with a tab or blank
causes the temporary indent setting to be set
to the number of beginning spaces on that line.
Note that this feature overrides any .ti setting
How to run this program
To run this program just type format while in
The format program will ask for a list
of input files, one file at a time.
The format program will format each file
and append the output to the file out.txt.
The file out.txt is erased before the output from the
first file is sent to it.
Exit the format program by typing carriage return
when asked for an input file.