tbl(1BSD) (BSD System Compatibility) tbl(1BSD)
NAME
tbl - (BSD) format tables for nroff or troff
SYNOPSIS
/usr/ucb/tbl [-me] [-ms] [-TX] [file] . . .
DESCRIPTION
The tbl command is a preprocessor for formatting tables for
nroff or troff. The input files are copied to the standard
output, except that lines between .TS and .TE command lines
are assumed to describe tables and are reformatted.
If no arguments are given, tbl reads the standard input, so
tbl may be used as a filter. When tbl is used with eqn or
neqn the tbl command should be first, to minimize the volume
of data passed through pipes.
-me This option copies the -me macro package to the
front of the output file.
-ms This option copies the -ms macro package to the
front of the output file.
-TX This option produces output that does not have
fractional line motions in it.
Options
The following options must be placed immediately after the .TS
line. Each option must be separated by a space, tab or comma
and must end with a semicolon.
center centers the table (default is left-justified)
expand makes the table as wide as current line length
box encloses the table in a box
allbox encloses each data entry of the table in a box
tab(x) separates data entries by using x instead of tab
Format
The format section of the table specifies the layout of the
columns. Each line in the format section corresponds to one
line of table data except the last line, which corresponds to
all succeeding data lines. Each line contains a key-letter
Copyright 1994 Novell, Inc. Page 1
tbl(1BSD) (BSD System Compatibility) tbl(1BSD)
for each column of the table. A dot (.) indicates the end of
key letters.
l specifies a left-justified column entry
r specifies a right-justified column entry
c specifies a centered column entry
n specifies a numerical column entry
s specifies a spanned heading
w(n) w following a key-letter specifies a column width
EXAMPLE
Data entries are usually separated by pressing the TAB key,
but in the following examples, a colon (:) is used as the tab
character.
Input
.TS
center tab(:);
c s s
c c s
c c c
l n n.
Household Population
Town:Households
:Number:Size
Bedminster:789:3.26
Bernards Twp.:3087:3.74
Bernardsville:2018:3.30
.TE
Output
Household Population
Town Households
Number Size
Bedminster 789 3.26
Bernards Twp. 3087 3.74
Bernardsville 2018 3.30
Copyright 1994 Novell, Inc. Page 2
tbl(1BSD) (BSD System Compatibility) tbl(1BSD)
To include a block of text as a data entry, precede it by T{
and follow it by T} as in the following example:
Input
.TS
center allbox tab(:);
c s s
c c c
l lw(1.5i) lw(1.5i).
New York Area Rocks
Era:Formation:Age (years)
Mesozoic:T{
Newark Basin, including
Stockton, Lockatong, and
Brunswick formations; also
Watchungs and Palisades.
T}:200 million
Cenozoic:Coastal Plain:T{
On Long Island 30,000 years;
Cretaceous sediments redeposited
by recent glaciation.
T}
.TE
Output
______________________________________________
| New York Area Rocks |
|_________|_________________|_________________|
| Era | Formation | Age (years) |
|_________|_________________|_________________|
| Mesozoic| Newark Basin, | 200 million |
| | including | |
| | Stockton, | |
| | Lockatong, and | |
| | Brunswick | |
| | formations; | |
| | also Watchungs | |
| | and Palisades. | |
|_________|_________________|_________________|
| Cenozoic| Coastal Plain | On Long Island |
| | | 30,000 years; |
| | | Cretaceous |
| | | sediments |
|_________|_________________|_________________|
Copyright 1994 Novell, Inc. Page 3
tbl(1BSD) (BSD System Compatibility) tbl(1BSD)
| | | r|deposited by
| | | r|cent
| | | g|aciation.
|_________|_________________|_________________|
REFERENCES
eqn(1BSD), nroff(1BSD), troff(1BSD)
Copyright 1994 Novell, Inc. Page 4