home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
simtel
/
sigm
/
vols000
/
vol081
/
systp.tex
< prev
next >
Wrap
Text File
|
1984-04-29
|
46KB
|
1,039 lines
\ec ~
~ch Text Processing
The program TP accepts a file containing text and commands and creates
a file containing formatted text.
TP accepts a file that contains text and "embedded" commands and creates
a new file containing formatted text.
TP relieves you of the chore of selecting appropriate places for
line breaks and page breaks and it has a number of other features
that simplify the task of text preparation.
~se Invoking TP
TP is invoked from the operating system by a command of the form
~bd TP name ~ed
in which "name" is a file name.
TP will read text from a file called "name.TEX" and will write to a file
called "name.DOC".
For this reason, it is simplest to call your text files "name.TEX".
If your text file has an extension other than "TEX", then type the
command
~bd TP name.ext ~ed
where "ext" is the extension of your file.
~pa TP will also accept two file names that denote the input and output files
respectively.
For example, the command
~bd TP MANUAL B:MANUAL ~ed
will read from the file MANUAL.TEX on the current system disk and write to the
file B:MANUAL.DOC.
~pa After TP has finished, you will have two files:
"name.TEX" contains your original text and "name.DOC" contains the formatted
text.
These files are referred to as the "source text" and the "formatted document"
in this manual.
~pa TP may also create other files.
If you have requested a table of contents, there will be a file called
"name.CON" containing it.
If you have made cross-references, there will be a file called "name.REF"
containing them.
Do not delete this file: it will be used next time TP is run to correct
forward references.
~se Printing the Formatted Text
There are two ways of printing a file created by TP.
First, you can use the command
~bd PRINT name.DOC T ~ed
to print the entire file, or the command
~bd PRINT name.DOC Tm,n ~ed
to print pages m through n inclusive.
Unfortunately there is a bug in PRINT and this command does not work;
therefore use the command
~bd PIP LST:=name.DOC ~ed
Make sure that the printer is switched on before entering this command.
~se TP Conventions
The output file generated by TP will differ from the input file that you
created in the following respects.
~mr list
~si
~li Line breaks will be adjusted so that all lines are as close as
possible to 78 characters long.
The paper is 8.5 inches wide and 78 characters at 12 characters per inch
occupy 6.5 inches; thus there is a 1 inch margin to the left and right
of the text.
~sp 2
(The line length of 78 characters and the pitch of 12 characters per
inch are parameters which may be adjusted to your particular
requirements.
See Section ~rr s lay for further details.)
~li Page breaks will be inserted so that there is a 1 inch margin at
the top and bottom of each page.
TP can also print running headers and footers
and a page number at any position in a header or a footer.
~li An extra blank will be inserted at the end of each sentence if necessary,
so that sentences are separated by two blanks.
~li Embedded layout commands will have disappeared and the format of the
text will have been changed accordingly.
~li This manual frequently refers to "blank lines" in the output file.
In all cases, blank lines are counted by the number of <RETURNS> required
to create them.
One <RETURN> creates zero blank lines, two <RETURN>s create one blank line,
etc.
~el
~pa Most of the embedded commands are of the form
~bd \ letter letter ~ed
For example, \PA is used to start a paragraph and \SE to start a
section.
The "\" must be preceded by a blank.
If it is not followed by two letters TP assumes that a command was not
intended and copies the string containing "\" to the output file without
changing it.
~pa Embedded commands can occur anywhere in the text, provided that
they are either placed at the beginning of a line or are preceded
by a blank.
The way in which a command is terminated depends on the particular
command.
Although the rules may seem complicated, common sense will usually give
the correct answer.
~si
~li Many commands have no parameters and require no particular termination,
although it is best to follow them with one or more blanks for readability.
These commands are:
\BD, \BF, \BK, \ED, \EF, \EK, \EL, \EP, \LI, \PA, \RB, \SB, \ZR.
~li Some commands may be followed by one or more numbers.
The numbers should be separated by blanks, _not commas.
If the numbers are omitted, TP assumes that zero is intended.
If the symbol "=" is used instead of a number, TP uses the default value of
the parameter.
If a number is preceded by "+" or "-", TP adds or subtracts its value from the
default value.
For example, the command "\SM`10" sets the left margin to 10 columns; the
command "\SM`+5" sets the margin to its default value plus five.
~sp 2 One precaution should be observed with these commands: if no number is
given, but the next text symbol on the line is a number, TP will read that
number as a parameter.
The best way to avoid this problem is to play safe and follow all commands
with a line break.
The commands that may be followed by one number are:
\GP, \LS, \SI, \SM, \SP, \TS.
The commands that may be followed by several numbers are:
\CC, \DL, \HL, \IL, \MV, \PL, \SL, \VL.
~li Some commands are followed by a string of text which may be a title, a
comment, or a filename.
When it encounters one of these commands, TP will continue reading text
until the end of the line.
The text must not contain embedded commands, but it can contain the editing
characters grave accent and underscore, explained below.
The commands that may be followed by text are:
\CE, \CH, \CO, \FL, \IC, \NU, \SE, \SS, \SU, \TC, \TL, \UL.
~li The remaining commands are followed by text of specified length, and so
TP knows exactly where the command ends.
These commands need no termination, and in some cases must not be terminated.
For example, if you use the cross-reference feature at the end of a sentence,
you will want to see something like "... see page 97." in the text, with no
space between the page number and the period.
You can achieve this by leaving no space between the cross-reference command
\RR and the period: your source text would contain "...
see page \rr p ref.".
The commands in this category are: \EC, \MR, \OV, \RM, \RR.
~el
~pa Although all embedded commands quoted in the manual are written in
upper case letters, TP will accept commands in either upper or lower case
letters.
~pa Certain characters have a special effect.
The grave accent is used to provide extra spaces, "-" (hyphen) is
used to concatenate words, and "_" is used for underlining.
These are described below: see Sections ~rr s hblk, ~rr s conc, and ~rr s us.
~pa Section ~rr s lay below describes general methods for controlling layout.
Section ~rr s misc on page ~rr p misc describes methods for obtaining various
effects.
Section ~rr s prin on page ~rr p prin explains how TP can embed special
printer control codes in formatted documents.
Section ~rr s all on page ~rr p all describes each TP command in detail.
~se Layout Control
~mr lay
~ss Horizontal Layout
Horizontal layout is controlled by the command \HL, which must be followed
by two numbers.
~pa The first number determines the amount of space between the left side of
the paper and the beginning of the text.
Its default value is 6, meaning 6 characters or 0.5" at 12 characters per
inch.
The leftmost position of the printer is about half an inch from the left
edge of the paper, and so a margin of 6 ensures that the text will begin
one inch from the edge of the paper.
~pa The second number defines the largest number of characters that can be
printed on one line.
Its default value is 78, which is 6.5" at 12 characters per inch.
~pa For example, the command ~bd \HL 5 65 ~ed
would set the left margin to 5 characters and the line length to 65
characters -- suitable values for 10 characters per inch printing.
~pa Either of these numbers may be replaced by "=", meaning "use the default
value" or preceded by "+" or "-" to give a relative value.
For example, the command
~bd \HL +5 = ~ed
adds 5 to the current value of the first margin and sets the line width
to its default value.
~pa Do not confuse the "first margin" established by this command with
the subsequent indentation produced by the "set margin" command \SM.
~pa There are also specialized commands for defining horizontal layout
parameters separately.
See the commands \DL, \IL, \PL, and \SL.
~ss Vertical Layout
Vertical layout is controlled by the command \VL, which must be followed
by four numbers.
~pa The first number determines the number of blank lines between the
heading at the top of the page and the first line of text; its default
value is 3.
~pa The second number determines the number of lines on a page; its default
value is 52.
Note that the "number of lines" is not the number of lines of text: if the
number of lines is 52 and the line spacing is 2, then at most 26 lines of text
will be printed on a page.
~pa The third number determines the position of the footer (if any) with
respect to the first line of text; its default value is 55.
~pa The fourth and last number determines the number of blank lines before the
first line of a chapter; its default value is 20.
~pa Any of these numbers may be replaced by "=", meaning "use the default
value" or preceded by "+" or "-" to give a relative value.
For example, the command
~bd \VL +3 = = 10 ~ed
adds 3 to the current value of the first parameter, sets the second and
third parameters to their default values, and sets the last parameter to 10.
~pa The command \LS controls line spacing; it must be followed by a single
number, and the value of this number must be 1, 2, or 3.
The default value is 2 (double spacing).
This command also changes the spacing between paragraphs,
the spacing of section and subsection headings, the spacing before and
after displayed text, and the spacing of numbered lists.
~pa There are also specialized commands for defining vertical layout
parameters separately.
See the commands \DL, \IL, \PL, and \SL.
~ss Arbitrary Layouts
TP does most of the work of formatting the text for you.
There will inevitably be occasions, however, in which the format that it
chooses is unsuitable.
You can produce arbitrary layouts by switching TP into "retain blank" mode.
~pa TP normally runs in "suppress blank" mode.
When it is in this mode you do not have much control over the layout
of the formatted text because TP is doing most of the work for you.
If you want to do the layout yourself, you can switch TP into
"retain blank" mode.
In this mode, each blank and line break that you enter will be copied
to the formatted text and consequently the layout of your input
will be precisely maintained.
~pa The command \RB switches TP into "retain blank" mode and the
command \SB switches it back into "suppress blank" mode.
Use these commands as follows.
~bd \RB ...`text in which layout is to be maintained ...`\SB ~ed
There is no limit to the amount of text that can appear in
"retain blank" mode.
If you do not want a block of text entered in retain blank mode
to be split between pages, you can use the "keep" commands described below.
~mr hblk
~pa In its usual "suppress blank" mode, TP will reduce multiple blanks and
tabs to a single blank, except at the end of a sentence.
It may also insert a line break wherever there is a blank in the input text.
Both of these effects may be over-ridden by judicious use of the grave accent.
The grave accent acts as a "hard blank" character in TP input files.
~pa For a reason that will soon be apparent, it is impossible to print
a grave accent with TP, and in this section the character "'"
(apostrophe) will be used to denote the grave accent.
~pa A grave accent in the input file is processed by TP in the same
way as any other character, but it is converted to a blank before
being written to the output file.
This fact can be exploited in three ways.
~si
~li To create white space in the formatted text, type a row of grave
accents of the required length.
~li Consider the formatting of "Dr.`Pepper".
TP sees the "." after "Dr" and assumes that it denotes the end of a
sentence: thus it will leave two blanks after "Dr.", which is not
what you want.
If, however, you write "Dr.'Pepper", TP will not process the "."
because it does not occur at the end of a word; the "'" is converted
to a blank, and "Dr.`Pepper" is formatted correctly.
~li Sometimes you do not want TP to break a line at a particular
place.
For example, you might want to write an equation such as "X`=`Y"
in the text without a line break.
To achieve this, use a grave accent instead of a space on each side of
"=", thus: "X'='Y".
Since TP processes the grave accents as non-blank characters, it will
not introduce a line break within the equation.
~el
~se Achieving Other Effects
~mr misc
This section is organized by topic.
That is, it tells you which TP commands are applicable for the various things
that you might want to do.
The commands are not specified in detail here: for detailed specifications,
see Section ~rr s all on page ~rr p all.
~ss Pagination
TP paginates automatically but you do have a certain amount of control
over paging.
To end the current page, use the command \EP.
~pa To change or set the number of the current page, use the command
\GP.
This command has two forms.
~bd \GP <number> ~ed
sets the number of the current page to the value of <number>.
~bd \GP ? ~ed
causes TP to ask you for the page number during text processing,
unless the page number is already known, in which case the command
has no effect.
~pa The number of the current page may be printed in either the
running header or the running footer: simply insert the character
"#" in either the header or the footer, and it will be translated
into the current page number during processing.
~ss Headers and Footers
A "running header" is printed at the top of each page of text, and a
"running footer" is printed at the bottom of each page.
Use \TL followed by the text of the header, or \FL followed
by the text of the footer to obtain these.
For example:
~bd
\TL Oh!`What a Useless Manual
~sp
\FL Copyright Jungle Enterprises 1982``````````````````#
~ed
The symbol "#" in the footer in this example will appear in the
processed document as the page number.
~pa There are no default headers and footers; if you do not specify a header
or a footer, TP will leave the corresponding areas blank.
~ss Chapters
Use the command ~bd \CH <title> ~ed to start a chapter.
TP will start the chapter on a new page, increment the chapter number,
and make <title> the running title.
The first line of the chapter will be preceded by some extra blank lines:
see \VL.
It is not necessary to use the chapter command if your text is not
divided into chapters.
~ss Starting a Section
Use the command ~bd \SE section title ~ed to start a section.
The effect of this command is to insert some blank lines, print the
section number and title, leave some more blank lines, and then start
a new paragraph.
The number of blank lines before and after the title is controlled by
the command \SL.
For example the command
~bd \SL 6 4 ~ed
tells TP to put 6 blank lines before a section title and 4 blank lines
after it.
These values may subsequently be changed by the command \LS which changes
line spacing.
~pa If TP has almost completed formatting a page when it encounters
an \SE or \SS command, it moves to the top of the next page before
printing the section title.
~pa Use the command ~bd \SS subsection title ~ed to start a subsection.
The effect of this command is the same as for the command SE,
the only difference being in the numbering.
The number of a section is C.X, where C is the current chapter number
and X is the current section number.
The number of a subsection is C.X.Y, where Y is the current subsection
number.
TP does the numbering itself; thus you can re-order sections without
having to re-number them.
~pa If you do not want numbered sections, use the command \SU; for example:
~bd \SU This is an Unnumbered Section Title ~ed
~ss Paragraphing
Use the command ~bd \PA ~ed at the beginning of a paragraph.
The effect of this command is to insert some blank lines and indent
the first line of the paragraph.
The number of blank lines between paragraphs
and the amount of indentation are controlled by the command \PL.
~pa TP will start a paragraph at the top of a page if this is necessary
to avoid a "widow" line.
It always starts chapters, sections, and subsections with a new paragraph.
~ss Underlining
~mr us
If you type "_" immediately before a word, the word will be underlined
in the formatted text.
~pa TP usually underlines all characters except the punctuation symbols
",", ".", ";", ":", "?", "!", and "-".
The command \UL, followed by a list of characters, tells TP that
these characters, in addition to the characters listed above, are
to be underlined.
For example, if you want punctuation marks to be underlined, use the command
~bd \UL .,:;?!- ~ed
The command \NU, followed by a list of characters,
tells TP not to underline these characters.
For example, if you do not want "&" underlined, use the command
~bd \NU & ~ed
~nu "
~pa If you want TP to underline the blanks between words, use the grave
accent: the text "_underlined'words" produces the output _"underlined`words".
If you want to underline part of a word, use the concatenation character "-":
the text "under-`_lined" produces the output "under- _lined".
~pa Underlining does not work properly with proportionally spaced printing.
~ss Concatenation
~mr conc
If a word ends with a hyphen, TP will concatenate this word and the next word.
For example, "hyp-`hen" is formatted as "hyphen".
This can be used, for example, to underline part of a word, as above.
~ss Tabs
The effect of tab characters is unpredictable in TP's normal "suppress
blank" (\SB) mode and it is probably best not to use tabs.
In "retain blank" (\RB) mode tabs are set at every eighth column by default.
Use the command \TS to alter the tab spacing.
For example ~bd \TS 10 ~ed sets the tab spacing to 10.
~pa The tab spacing used by the editor ED is normally at 8 character
positions; thus the effect of this command is not visible during
editing.
You can change the editor's tab settings if you want to: see the editor
command ET on page ~rr p tabs.
~ss Centered Lines
Use the command
~bd \CE <text> ~ed
to print a line of text centered between the left and right margins.
For example, the command
~bd \CE This line is centered ~ed
produces the following in the output file:
~sp 2 ~ce This line is centered
~ss Displays
~mr disp
A "display" is a block of indented text; displays are typically used for
quotations, examples, programs, etc.
Use the commands \BD (begin display) and \ED (end display) as follows:
~bd \BD ...`displayed text ...`\ED ~ed
There can be any number of lines of displayed text.
~pa The layout of displays is controlled by the commands \LS and \DL.
~ss Keeps
~mr keep
A "keep" is a block of text that must not be split between pages.
Use the commands \BK (begin keep) and \EK (end keep) as follows:
~bd \BK ...`text to be "kept" ...`\EK ~ed
To prevent TP splitting a display between two pages, use the commands:
~bd \BD \BK ...`displayed text ...`\EK \ED ~ed
~pa A "floating keep" is similar to a keep except that the contents
of a floating keep are stored if there is not sufficient space on
the current page for them, and normal text processing continues.
Use \BF to start a floating keep and \EF to end it.
The floating keep may appear either earlier or later in the formatted
document than it does in the source text.
There are three possibilities.
~si
~li When the \BF command is encountered, the line buffer used by TP will
not usually be full.
If there is room for the floating keep, it will be inserted immediately,
and the half empty line will be filled from text following the keep and
then printed; in this case the keep will appear in the formatted document
_before it is called, but never more than one line before.
~li If the line buffer is full when \BF is encountered, the floating keep
will be inserted exactly where you expect it.
~li If there is not enough room on the page for the text of the keep, it
will be inserted at the top of the next page.
~el
~pa The text of floating keeps is stored in memory until there is sufficient
space on the page to print them.
TP may run out of memory space if several large floating keeps must be
stored simultaneously.
You can avoid this problem by including the text of floating keeps as close
as possible to the place where you think that they should be printed.
Do not put a whole lot of large floating keeps at the beginning of the
file in the hope that TP will put one at the top of each page: it is more
likely to run out of space.
Each line of text requires 248 bytes of dynamic storage; this amount can be
reduced by changing the value of the constant _maxlinelen and recompiling TP.
~ss Lists of Numbered Items
~mr item
Itemized lists occur in several places in this manual.
They are generated by the commands \SI (set item number), \LI (list
item), and \EL (end list).
~bd
\SI
~sp \LI ...`text of first item ...
~sp \LI ...`text of second item ...
~sp ...
~sp \LI ...`text of last item ...
~sp \EL
~sp
~ed
The effect that this produces can be seen in several parts of this Manual:
see for example Section ~rr s list on page ~rr p list.
~ss Overlaying Characters
Two characters can be superimposed using the command \OV.
For example, the command ~bd \OV /= ~ed
may produce something that looks like a "not equal" sign.
This command will not work in proportionally spaced text.
~ss Table of Contents
TP will write a table of contents to a file called "name.COM" if
you include the command \TC near the beginning of the file.
This command has two forms.
The effect of ~bd \TC <title> ~ed
is to create a table of contents file with the page heading <title>.
Entries in the table of contents do not have page numbers.
The command ~bd \TC # <title> ~ed has the same effect except that each entry
in the table of contents has a page number beside it.
~pa Titles, chapter names, section headers, and subsection headers
are listed in the table of contents; footers are not listed.
~ss Including Files
The command
~bd \IC <filename> ~ed
tells TP to read from the named file.
The file may contain embedded commands and is processed in exactly the same
way as the file named in the TP invocation.
The included file may also contain \IC commands, and so in general TP can
process a tree-structured document.
It is often convenient to split up a long document into sections or chapters
and to read each chapter in turn from a "top-level" file; this manual is
organized in this way.
~ss Cross Referencing
~mr xref
TP can make cross-references both forwards and backwards.
Your formatted document can include references such as "Section ~rr s xref
begins on page ~rr p xref" although you do not know the number of the
section referred or the page number on which it will appear when you are
creating the source text.
Chapter numbers, section numbers, subsection numbers, item numbers,
and page numbers can all be cross-referenced.
~pa Use the command \MR to create the reference.
This command has the form
~bd \MR <mnemonic> ~ed
in which <mnemonic> is a string of up to 4 letters and digits.
The mnemonic should uniquely identify the topic to be cross-referenced.
~pa Use the command \RR to retrieve the cross-reference.
This command has the form
~bd \RR <letter> <mnemonic> ~ed
where <letter> is one of "C" (chapter), "I" (item), "P" (page),
or "S" (section).
For example, to cross-reference the word "elephant" you would include this
in the text:
~bd ... elephant \MR elep ... ~ed ~rm (1)
At the point where you wanted to refer to "elephant" you would include
this in the text:
~bd ...`big animals (see page \RR P elep) ... ~ed ~rm (2)
In the formatted text, (1) would not be visible (the word "elephant" would
be there, of course), but at (2) you would see:
~bd ... big animals (see page 97) ... ~ed
The page number was printed because \RR" was followed by "P"; you could
refer to the chapter, section, etc., using one of the other letters.
~pa The first thing that TP does when it is invoked is to look for a file
of cross-references.
As it is reading the source text, it refers to and updates this file, and
at the end of the source text it writes a new version on the disk.
If you process the source text once only, backward references will appear
correctly, but forward references will all be of the form "see page 0".
You can correct them by processing the text again.
It is usually unnecessary to run TP twice, however, because most files
will be processed several times during revision cycles, and if the last
set of revisions is not too drastic you can assume that all the
cross-references will be correct.
~pa You can examine the cross-reference file if you want to.
If the name of your source text file is "name.TEX", the name of the
cross-reference file will be "name.REF".
Each line of "name.REF" contains the mnemonic; the current value of the page
number, chapter number, section number, subsection number, and item number;
and the number of times the entry was referenced.
Some of these numbers may be zero, in which case they will not be printed
in the formatted document.
If the reference count is zero, the mnemonic is useless and may be removed
from the source text.
~pa Cross-referencing does not work for multi-file texts.
It does work provided that TP processes one file only; that file may
contain \IC commands including other files, and the included files
may themselves contain \IC commands, to any depth.
~se Printer Control
~mr prin
TP is a device independent program: the formatted documents that it generates
can be sent to any device that recognizes carriage return, line feed, and
form feed characters.
TP will, however, insert special printer codes into the formatted document
if you want it to do so.
The command \CC, followed by a list of numbers, will insert the corresponding
ASCII codes into the output file.
The codes are inserted into the output file as soon as \CC is used; they are
not put into the line buffer.
Consequently \CC can be used only to control global effects, such as
"use boldface throughout", but it cannot be used for local effects
such as "put this word in boldface".
~pa The descriptions that follow apply to the I.D.S.`460 "Paper Tiger"
printer.
~pa Printer pitch (the number of characters per inch) is controlled as
follows:
~bk ~bd ~rb
29 10 c.p.i.
30 12 c.p.i.
31 16.5 c.p.i.
~ed ~ek ~sb
Note that TP does not understand the effect of these commands and will not
automatically change the line length to suit the pitch.
When you use one of the above commands, use \HL to select suitable layout
parameters.
~pa The codes 1, 2, 6, and 16 select bold face, normal weight, fixed spacing,
and proportional spacing, respectively.
~pa The printer normally prints 6 lines per inch.
The spacing can be changed by a \CC command of the form: ~bd \CC 27 66 n ~ed
where n is the vertical advance required in units of 1/48".
For example, the command
~bd \CC 27 66 6 ~ed
sets the line spacing to 6/48" (8 lines per inch).
~pa See Chapter ~rr c prcd (page ~rr p prcd) for a complete
description of the printer codes.
~se Summary of TP Commands
~mr all
In the explanations below, imperative verbs refer to what TP does
automatically, not what you have to do for it.
~bk ~sp 3 \BD: Begin a display
~bd
End the current line; leave some blank lines; and
start indenting by 10 characters.
The display is ended by the command \ED.
The commands \BD and \ED act as brackets around the displayed text.
~sp 2 Displays may be nested:
~bd \BD ...`\BD ...`\ED ...`\ED ~ed
~sp 2 If you do not want a display split between pages, use the command
sequence ~bd \BD \BK ...`displayed text ...`\EK \ED ~ed
~sp 2 See \DL and \LS.
~ek ~bk ~ed \BF: Begin a floating keep
~bd
End the current line; ensure that all text between \BF and the
subsequent \EF is on the same page.
The floating keep is ended by the command \EF.
The commands \BF and \EF act as brackets around the "floating" text.
~sp 2 TP will store the the text between \BF and \EF until there is
enough space to print it contiguously.
The kept text will appear either at the point
where the commands are used, or at the top of the next page.
~ek ~bk ~ed \BK: Begin a keep
~bd
End the current line. Ensure that all text between \BK and
the subsequent \EK is on the same page.
The keep is ended by \EK.
The commands \BK and \EK act as brackets around the "kept" text.
~ek ~bk ~ed \CC: Control codes for the printer
~bd
Send the numbers following \CC directly to the printer.
Source files that contain \CC commands are device dependent; TP warns you
of this fact by displaying a message when it has processed the source text.
See Section ~rr s prin on page ~rr p prin for a complete explanation
of this command and its use with the I.D.S.`460 "Paper Tiger" printer,
and see Chapter ~rr c prcd on page ~rr p prcd for a complete list of
printer control codes.
~ek ~bk ~ed \CE <text>: Print one line centered between the margins
~bd
~ek ~bk ~ed \CH <title>: Start chapter
~bd End the current page; increment the chapter number; write the chapter
title at the top of the new page.
~sp 2 The text of the title is copied into the running title buffer, and
will appear at the top of each page.
The same buffer is used by the command \TL, and consequently these
two commands cannot be used in conjunction.
~sp 2 The text of <title> must not contain embedded commands but it may
contain the editing characters grave accent and underscore.
~sp 2 The chapter title will be written to the table of contents
file if there is one.
~sp2 See \TL.
~ek ~bk ~ed \CO <comment>: Comment
~bd
This command is entirely ignored by TP.
It is used for incorporating remarks that should not appear in the
formatted text, such as date, author, purpose, etc.
~ek ~bk ~ed \DL <before> <after> <spacing> <indent> <width>:
Set display layout
~bd A "display" is a block of indented text, used for equations, quotations,
etc.
The five numeric parameters of this command determine: the number of blank
lines <before> the display (default = 3); the number of blank lines <after>
the display (default = 3); the line spacing within the display (default =
the current line spacing); the number of columns by which the display is
<indent>ed (default = 10 spaces); and the width of the displayed text,
measured from the left margin (default = current line width).
~sp 2 Nested displays have the same layout as top level displays.
~ek ~bk ~ed \EC <char>: Set escape character
~bd The "escape character" is the character used in front of a TP command.
It is usually \", but it can be changed to an arbitrary character by
this command.
For example, if you wanted to use "@" as the escape character, you would
enter the command
~bd \- EC @ ~ed
~ek ~bk ~ed \ED: End a display ~bd See \BD.
~ek ~bk ~ed \EF: End a floating keep ~bd See \BF.
~ek ~bk ~ed \EK: End a keep ~bd See \BK.
~ek ~bk ~ed \EL: End a list of numbered items ~bd See \SI and \LI.
~ek ~bk ~ed \EP: End current page
~bd Text following this command will be printed at the beginning of the
next page.
TP ignores this command if it occurs inside a keep or a floating keep.
~ek ~bk ~ed \FL <footer>: Set a running footer
~bd Text following \FL on the same line will be printed at the bottom of
each page of the document.
"#" will be replaced by the number of the current page.
~sp 2 The text of <footer> must not contain embedded commands but it may
contain the editing characters grave accent and underscore.
~sp 2 Footers are not written to the table of contents.
~ek ~bk ~ed \GP <number> or \GP ?: Get page number
~bd Set the page number to <number>.
~sp 2 Large documents should be stored in several small files.
If these files are formatted separately, the page numbers will be
wrong unless they are explicitly set using this command.
~sp 2 If you do not know the number of the first page of a document, use
the form \GP ?.
When TP encounters this command it displays "Enter page number" on the
screen, and you can type the number that you want to appear on the
first page.
~sp 2 If the page number has already been set, the command will be
ignored.
Thus you can format a book consisting of several chapters one
chapter at a time (in which case you specify the first page of each
chapter as it is formatted) or all at once (in which case TP numbers
the pages automatically).
~ed ~ek ~bk \HL <margin> <width>: Set horizontal layout parameters
~bd \HL must be followed by two numbers.
The numbers define the width of the left margin and the width of the
text respectively.
In each case the unit is one character position.
The default values are <margin>`=`6 and <width>`=`78.
~sp 2 See \VL.
~ed ~ek ~bk \IC <filename>: Include a file
~bd TP will process the text in the named file and then return and continue
processing from the current file.
The file of included text may itself contain \IC commands.
All parameters (e.g.`blank suppression, indentation, margin settings)
are global and affect the text in the included file.
~ed ~ek ~bk \IL <before> <after> <indent> <increment> : Set numbered list
layout
~bd This command defines the layout of a numbered list.
The four parameters determine the number of blank lines <before> an item,
the number of blank lines <after> an item, the <indent>ation of the item
number, and the <increment>al indentation for the item.
The numbered list in Section ~rr s list uses the default values, which are
those that would be set by the command
~bd \- IL 3 3 5 6 ~ed
~ed ~ek ~bk \IM <margin>: Set immediate margin
~bd Set the left margin to <margin> and tab to this position, starting a new
line if necessary.
This command is useful for "hanging indentations".
It cannot be used within a display.
~sp 2 See \SM.
~ed ~ek ~bk \LI: Start a list item
~bd A "list" is a collection of indented and numbered items.
TP performs the indentation and numbering automatically.
Introduce a list with the command \SI; this sets the number
of the first item and the indentation.
Introduce each item, including the first, with \LI.
After the last item, terminate the list with \EL.
~sp 2 The margin setting used by these commands is also used by the commands
\IM and \SM; thus \LI, \IM, and \SM cannot be used in conjunction.
~sp 2 See \EL, \IL, and \SI.
~ed ~ek ~bk \LS <number>: Set line spacing
~bd Set the line spacing to the value of <number>.
The default value is 2 (double spacing).
The largest permitted value is 3.
~sp 2 This command also sets other vertical spacing parameters as follows.
~sp 2 ~rb
```````````````````````````Line`spacing`=`1````Line`spacing`=`2
In text:
Lines between paragraphs````````2```````````````````4
Lines before heading````````````3```````````````````6
Lines after heading`````````````2```````````````````4
Lines before display````````````2```````````````````3
Lines after display`````````````2```````````````````3
Lines before item in list```````2```````````````````3
Lines after an item in list`````2```````````````````3
`
In table of contents:
Lines between chapter headings``2```````````````````4
Lines between section headings``1```````````````````2
~sb
~ed ~ek ~bk \MR <mnemonic> : Make a cross-reference
~bd This records the position in the text of an item that is to be
cross-referenced.
The mnemonic consists of up to four letters and digits.
Cross-referencing is described in Section ~rr s xref on page ~rr p xref.
~ed ~ek ~bk \MV <para> <subsec> <sec>: Set minumum values
~bd If TP encounters the command \PA and the number of lines remaining
on the page is less than or equal to the current value of <para>,
TP will start a new page.
The same applies to the commands \SS and \SE and the values of <subsec>
and <sec>.
These values are initially set to 4, 8, and 8 respectively.
The command \MV can be used to change them.
For example, after
~bd \MV = = 12 ~ed
TP would start a new page before a section if otherwise the section
would start within 12 lines of the bottom of the page.
~ed ~ek ~bk \NU <string>: Remove characters from underline set
~bd The command \NU is followed by a string of characters which
will not subsequently be underlined.
The string is terminated by the end of the line containing the command.
~sp 2 See \UL.
~ed ~ek ~bk \OV <char> <char>: Overlay the next two characters
~bd The two characters following \OV are superimposed.
This command does not work reliably in proportionally spaced text.
~ed ~ek ~bk \PA: Start paragrpah
~bd Leave some blank lines and indent the next line.
~sp 2 See \PL.
~ed ~ek ~bk \PL <spacing> <indent> : Set paragraph layout
~bd This command controls the <spacing> between paragraphs and the
amount of <indent>ation at the beginning of each paragraph.
The default values are <spacing>`=`4 and <indent>`=`5.
~ed ~ek ~bk \RB: Set retain blank mode
~bd Following this command, each space and line break that you enter will
be copied to the output file.
Use retain blank mode for preserving exact layout where this is simpler than
using formatting commands.
~sp 2 See \SB.
~ed ~ek ~bk \RM: Right margin
~bd
Put the next word flush right.
This command can only be used for a single word, and it is used
for equation numbers, etc.
Note that words linked by grave accents are considered by TP to be
single words.
~ed ~ek ~bk \RR <letter> <mnemonic> : Retrieve cross-reference
~bd When TP encounters this command, it inserts in the text the position
of the \MR command that defined the mnemonic.
The <letter> determines the way in which the position is displayed:
"C" gives a chapetr number, "I" gives an item number, "P" gives a page
number, and "S" gives a section number.
Cross-referencing is described in Section ~rr s xref on page ~rr p xref.
~ed ~ek ~bk \SB: Set suppress blank mode
~bd This is the default mode for TP.
In this mode TP may replace a blank by several blanks or a line
break, and it will reduce strings of blanks and tabs to a single blank.
~sp 2 See \RB.
~ed ~ek ~bk \SE <section title>: Start a new section
~bd TP will write the chapter number unless it is zero, the section number,
and the section title.
The section heading will be preceded and followed by white space.
All numbering is automatic.
TP starts a section with a new paragraph.
The section heading is written to the contents file if there is one.
Example: ~bd \SE Introduction to Text Processing ~ed
~sp 2 See \SL.
~ed ~ek ~bk \SI <number>: Set item number
~bd This command is used to introduce an itemized list and to set the number
of the first item.
The value of <number> should be one less than the number of the first
item.
If <number> is omitted, it is taken to be 0, and the number of the first
item is 1.
~ed ~ek ~bk \SL <before> <after>: Set section heading layout
~bd This command controls the amount of white space surrounding a section
or subsection heading.
<before> is the number of blank lines that will be printed before
the heading, and <after> is the number of blank lines that will be
printed between the heading and the first paragraph of the section or
subsection.
The default values are <before>`=`6 and <after>`=`4.
~ed ~ek ~bk \SM <number>: Set margin
~bd The width of the left margin, which is usually zero, will be set to
<number>.
This command is used for indenting text in cases where a display is not
appropriate.
The margin is also used for creating numbered lists and displays;
therefore do not use this command in conjunction with \SI, \LI, \EL,
or \BD.
~sp 2 The symbols "+" and "-" may be used with \SM in the usual way.
The command ~bd \SM +5 ~ed
means "move the margin right 5 character positions".
The command ~bd \SM = ~ed means "set the margin to the current
column".
~sp 2 See \IM.
~ed ~ek ~bk \SP <number>: Space
~bd
This command breaks the current line and inserts <number>-1 blank
lines into the text.
For example, "\SP`2" creates one blank line.
"\SP`0" is equivalent to "\SP`1".
~sp 2 Think of the parameter as the number of times that you would hit
<RETURN> if you were typing: two returns are needed to create one blank line.
~ed ~ek ~bk \SS <subsection title>: Start a subsection
~bd TP leaves some white space, prints the subsection title, leaves some
more white space, and starts the subsection text with a new
paragraph.
This command is similar to \SE except that the number consists of
the current chapter number, the current section number, and the
current subsection number.
The subsection header is written to the contents file if there is one.
~ed ~ek ~bk \SU: Start an unnumbered section
~bd This command has the same effect as \SE and \SS, but no section
number is associated with the section title and no entry is made in the
table of contents.
~ed ~ek ~bk \TC <title>: Create a table of contents
~bd If this command is used near the beginning of the input text,
TP will create a table of contents in a file called "name.CON"
(assuming that it is reading from "name.TEX").
The contents file will contain <title> at the top of each page,
and the text of each title, chapter heading, section heading, and
subsection heading in the main text.
The line spacing in the table of contents will be the same as the line
spacing in the text at the point where the \TC command occurs.
~sp 2 The text of <title> must not contain embedded commands but it may
contain the editing characters grave accent and underscore.
~ed ~ek ~bk \TL <title>: Set a running title
~bd The text in <title> will be printed at the top of each page.
This command is incompatible with the command \CH which also sets
a running title.
~sp 2 The text of <title> must not contain embedded commands but it may
contain the editing characters grave accent and underscore.
~ed ~ek ~bk \TS <number>: Set tab spacing
~bd Tabs are at every eighth column by default.
This command is used to change the number of columns between tab positions.
Tabs cannot be placed at arbitrary positions.
~ed ~ek ~bk \UL <string>: Add characters to the underline set
~bd \UL must be followed by a string of characters; subsequently TP will
underline these characters.
The string is terminated by the end of the line containing the \UL command.
For example, if you wanted digits underlined, you would use the command
~bd \UL 0123456789 ~ed
TP will underline grave accents (see Section ~rr s hblk on page
~rr p hblk) but it will never underline a normal blank character.
~ed ~ek ~bk \VL <leadin> <lines> <footer> <chap>:
Set vertical layout parameters
~bd \VL must be followed by four numbers.
These numbers define the space between the running header and the first
line of text, the number of text lines on a page, the position of
the running footer, and the number of blank lines before the first line of a
chapter, respectively.
The default values are <leadin>`=`3, <lines>`=`52, <footer>`=`55, and
<chap>`=`20.
These values give 1 inch margins above and below the text at 6 lines per inch.
~ed ~ek ~bk \ZR: Show cross-references
~bd The mnemonic of every \MR command following \ZR will be printed
in the left margin.
This is useful during document development if you use many cross-references
and can't remember what you called them.
~ed ~ek
~se Default Values
TP is set up to create double-spaced text at 12 characters per inch,
using the parameters listed below.
The values of these parameters can be changed by the commands shown on
the right.
~rb ~bk ~ss Horizontal Layout Parameters
~sp
Left margin 6 HL
Width of text 78 HL
Paragraph indentation 5 PL
Tab separation 8 TS
Display indentation 10 DL
Display width 78 DL
Indentation for numbered lists 5 IL
Additional indentation for list items 6 IL
~ek
~bk ~ss Vertical Layout Parameters
~sp
Line spacing 2 LS
Paragraph spacing 4 PL, LS
Space between heading and top line of text 3 VL
Number of text lines on page 52 VL
Position of footer, relative to first line 55 VL
Lines before first line of a chapter 20 VL
Lines before subheading 6 SL, LS
Lines after subheading 4 SL, LS
Lines before a display 3 DL, LS
Lines after a display 3 DL, LS
Lins spacing within a display 2 DL
Lines before a list item 3 IL, LS
Lines after a list 3 IL, LS
Minimum value for paragraph 4 MV
Minimum value for a subsection 8 MV
Minimum value for a section 8 MV
~ek ~sb ~ec \