This document tells you how to use format,a text formatting program.Format is a transliteration of the text formattingprogram described in the bookSoftware Toolsby Brian W. Kernighan and P. J. Plauger.This book is published by Addison-Wesley, 1976.

I recommend that you buy a copy of Software Toolsif 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 filewhich contains the formatted text.The output file can then be printed using aneditor or the CP/M type command.

.ulFormat commands

Format commands are instructions to the formatprogram telling the program how to arrange texton a page.Any line which begins with a period in the firstcolumn is assumed to be a command line.Format commands all consist of two letters whichimmediately 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 wantto temporarily disable a command.

Most commands can accept arguments.If the argument is preceded by a plus or minus signthen the argument changes an internal value by someamount.Otherwise, the internal value is set to the valueof the argument.For example, the command .ls 2sets the line spacing to 2,while the command .ls +2 increases the line spacingby 2 lines.

Here is a list of the format commands.I am assuming that you have some experience usingsimilar text formatters because the descriptionof what these commands do is sketchy.If you have doubts, read Software Tools.

A break stops the filling of the current line.Breaks are needed between paragraphs.

Lines containing nothing but blanksalways cause one blank line to be output.

A line which starts with a tab or blankcauses the temporary indent setting to be setto the number of beginning spaces on that line.Note that this feature overrides any .ti settingin effect.

.ulHow to run this program

To run this program just type format while inCP/M.The format program will ask for a listof input files, one file at a time.The format program will format each fileand append the output to the file out.txt.The file out.txt is erased before the output from thefirst file is sent to it.Exit the format program by typing carriage returnwhen asked for an input file.