TF is a descendant of the ROFF text formatter with several enchancements and repairs. In particular, it allows almost unlimited nesting of macro expansions (text registers), 32 character register names, and handles the operation of escaped new-line characters properly.
TF accepts the syntax of nearly all ROFF commands with the following exceptions:
Tabs are used to separate fields. Field 0, the field before the first tab character, is output beginning in column 1. The ".ta" request specifies the positions of each of the remaining fields. This request has the following form.
.ta <format_item> [<format_item>]*
Acceptable format items include numbers, signed numbers, and the letters "L", "C", and "R" (upper or lower case).
An unsigned number in ".ta" indicates an absolute column position. For example, the pair "8 16" refer to column 8 and column 16 on the output line. Signed numbers indicate relative column positions. For example, the pair "8 +4" refer columns 8 and 12.
An "L" indicates left-alignment of a field; the column used for this alignment is given by the closest absolute or relative position to the LEFT of the "L". Similarly, an "R" indicates right-alignment of a field; the column used is given by the closest absolute or relative position to the RIGHT of the "R".
A "C" indicates that a field should be centred between two columns. The left column will be the closest absolute or relative position on the LEFT of the "C" and the right column will be the closest absolute or relative position on the RIGHT of the "C".
In most cases, every field will require a letter indicating whether the field should be left-aligned, right-aligned, or centred. If two column positions are adjacent on the ".ta" request, there is assumed to be an inaccesible gutter between them which will be filled with non-fillable blanks.
If the first format item for ".ta" is a letter, a "1" will be implicitly assumed to precede that letter. If the last format item is a letter, TF will implicitly assume that the letter is followed by an unsigned number equal to the current line length. Thus if the current line length is 60, ".ta C" is equivalent to ".ta 1 C 60".
Examples:
.ta 10 20 30
Unlike roff, all that happens is that an unfillable gutter is created from columns 11 to 30. No tabs stops are set.
.ta 10 L C R 65
indicates that the first field is left-aligned in column 10, the second is centred between 10 and 65, and the third is right-aligned in column 65. Note that the "C" does NOT need numbers immediately surrounding it; it uses the numbers CLOSEST to it, even if those numbers are also used by another letter. Note that it is necessary to have the correct number of tab characters to reach each field. That is, each format "letter" defines the existence of a tab stop.
It is possible to set multiple tab stops in a column. If fields overlap because of the way stops are set, they will overstrike each other on output.
.ab .ad .bm .na .nc .tm .un .va-z .v% .v# .ya-z .y% .y# .n0-2
.zt R remove text register (zap text)
This request has been added so that macros may be defined, then deleted when no longer needed. This feature can also be useful in removing items from the macro list that are no longer needed for processing the output. Use of the ".zt" request can speed up processing by reducing the length of the macro list (kept as a top down linked list).
.if E L
can be used for conditional processing. The lines following the ".if" will be processed only if the numeric expression E is non-zero; otherwise, TF will ignore everything until it finds an ".en" with a matching label L.
.sq
can be used to squeeze lines onto the current page (in order to avoid widows). It is equivalent to
.m3 -<ls> .br .m3 +<ls>
where <ls> is used to represent the current line spacing (e.g. 1 for single spacing).
(%amon) -- contains the current month name, e.g. "January" (%wday) -- contains the current week day, e.g. "Thursday"
.an (reg) 2 .an reg 2
This only applies in situations where the name is positional in requests. Parentheses are still compulsory for register names used in insertion constructs, e.g. ^(reg).
.fs '----'''
Copyright © 1996, Thinkage Ltd.