A tab character (ASCII char 9, EBCDIC char 5) causes a horizontal movement to the next tab stop (much like it did on a typewriter).
This escape is a non-interpreted tab character. In copy mode (see Copy-in Mode),
\tis the same as a real tab character.
Change tab stop positions. This request takes a series of tab specifiers as arguments (optionally divided into two groups with the letter ‘T’) which indicate where each tab stop is to be (overriding any previous settings).
Tab stops can be specified absolutely, i.e., as the distance from the left margin. For example, the following sets 6 tab stops every one inch..ta 1i 2i 3i 4i 5i 6i
Tab stops can also be specified using a leading ‘+’ which means that the specified tab stop is set relative to the previous tab stop. For example, the following is equivalent to the previous example..ta 1i +1i +1i +1i +1i +1i
gtroffsupports an extended syntax to specify repeat values after the ‘T’ mark (these values are always taken as relative) – this is the usual way to specify tabs set at equal intervals. The following is, yet again, the same as the previous examples. It does even more since it defines an infinite number of tab stops separated by one inch..ta T 1i
Now we are ready to interpret the full syntax given at the beginning: Set tabs at positions n1, n2, ..., nn and then set tabs at nn+r1, nn+r2, ..., nn+rn and then at nn+rn+r1, nn+rn+r2, ..., nn+rn+rn, and so on.
Example: ‘4c +6c T 3c 5c 2c’ is equivalent to ‘4c 10c 13c 18c 20c 23c 28c 30c ...’.
The material in each tab column (i.e., the column between two tab stops) may be justified to the right or left or centered in the column. This is specified by appending ‘R’, ‘L’, or ‘C’ to the tab specifier. The default justification is ‘L’. Example:.ta 1i 2iC 3iR
- The default unit of the
tarequest is ‘m’.
- A tab stop is converted into a non-breakable horizontal movement which can be neither stretched nor squeezed. For example,.ds foo a\tb\tc .ta T 5i \*[foo]
creates a single line which is a bit longer than 10 inches (a string is used to show exactly where the tab characters are). Now consider the following:.ds bar a\tb b\tc .ta T 5i \*[bar]
gtrofffirst converts the tab stops of the line into unbreakable horizontal movements, then splits the line after the second ‘b’ (assuming a sufficiently short line length). Usually, this isn't what the user wants.
- Superfluous tabs (i.e., tab characters which do not correspond to a tab stop) are ignored except the first one which delimits the characters belonging to the last tab stop for right-justifying or centering. Consider the following example.ds Z foo\tbar\tfoo .ds ZZ foo\tbar\tfoobar .ds ZZZ foo\tbar\tfoo\tbar .ta 2i 4iR \*[Z] .br \*[ZZ] .br \*[ZZZ] .br
which produces the following output:foo bar foo foo bar foobar foo bar foobar
The first line right-justifies the second `foo' relative to the tab stop. The second line right-justifies `foobar'. The third line finally right-justifies only `foo' because of the additional tab character which marks the end of the string belonging to the last defined tab stop.
- Tab stops are associated with the current environment (see Environments).
tawithout an argument removes all tab stops.
- The start-up value of
gtroffis ‘T 0.8i’..ds tab-string \n[.tabs] \*[tab-string] ⇒ T120u
gtrofffills the space to the next tab stop with whitespace. This can be changed with the
tcrequest. With no argument
gtroffreverts to using whitespace, which is the default. The value of this tab repetition character is associated with the current environment (see Environments).1
If n is missing or not zero, enable line-tabs mode, or disable it otherwise (the default). In line-tabs mode,
gtroffcomputes tab distances relative to the (current) output line instead of the input line.
For example, the following code:.ds x a\t\c .ds y b\t\c .ds z c .ta 1i 3i \*x \*y \*z
in normal mode, results in the outputa b c
in line-tabs mode, the same code outputsa b c
Line-tabs mode is associated with the current environment. The read-only register
.linetabsis set to 1 if in line-tabs mode, and 0 in normal mode.
 Tab repetition character is a misnomer since it is an output glyph.