3 dfc67f9b 2004-05-16 devnull tbl \- format tables for nroff or troff
4 dfc67f9b 2004-05-16 devnull .SH SYNOPSIS
7 dfc67f9b 2004-05-16 devnull .I file ...
9 dfc67f9b 2004-05-16 devnull .SH DESCRIPTION
11 dfc67f9b 2004-05-16 devnull is a preprocessor for formatting tables for
14 dfc67f9b 2004-05-16 devnull .IR troff (1).
15 dfc67f9b 2004-05-16 devnull The input
17 dfc67f9b 2004-05-16 devnull are copied to the standard output,
18 dfc67f9b 2004-05-16 devnull except for segments of the form
22 dfc67f9b 2004-05-16 devnull .IB options " ;
23 dfc67f9b 2004-05-16 devnull .IB format " .
26 dfc67f9b 2004-05-16 devnull .IB format " .
32 dfc67f9b 2004-05-16 devnull which describe tables
33 dfc67f9b 2004-05-16 devnull and are replaced by
35 dfc67f9b 2004-05-16 devnull requests to lay out the tables.
36 dfc67f9b 2004-05-16 devnull If no arguments are given,
38 dfc67f9b 2004-05-16 devnull reads the standard input.
40 dfc67f9b 2004-05-16 devnull The (optional)
41 dfc67f9b 2004-05-16 devnull .I options
42 dfc67f9b 2004-05-16 devnull line is terminated by a semicolon and contains one or more
45 dfc67f9b 2004-05-16 devnull .TF linesize(n)
47 dfc67f9b 2004-05-16 devnull .B center
48 dfc67f9b 2004-05-16 devnull center the table; default is left-adjust
50 dfc67f9b 2004-05-16 devnull .B expand
51 dfc67f9b 2004-05-16 devnull make table as wide as current line length
55 dfc67f9b 2004-05-16 devnull .B doublebox
56 dfc67f9b 2004-05-16 devnull enclose the table in a box or double box
58 dfc67f9b 2004-05-16 devnull .B allbox
59 dfc67f9b 2004-05-16 devnull enclose every item in a box
61 dfc67f9b 2004-05-16 devnull .BI tab( x )
64 dfc67f9b 2004-05-16 devnull to separate input items; default is tab
66 dfc67f9b 2004-05-16 devnull .BI linesize( n )
67 dfc67f9b 2004-05-16 devnull set rules in
68 dfc67f9b 2004-05-16 devnull .IR n -point
71 dfc67f9b 2004-05-16 devnull .BI delim( xy )
72 dfc67f9b 2004-05-16 devnull recognize
77 dfc67f9b 2004-05-16 devnull .IR eqn (1)
78 dfc67f9b 2004-05-16 devnull delimiters
82 dfc67f9b 2004-05-16 devnull Each line, except the last, of the obligatory
83 dfc67f9b 2004-05-16 devnull .I format
84 dfc67f9b 2004-05-16 devnull describes one row of the table.
85 dfc67f9b 2004-05-16 devnull The last line describes all rows until the next
86 dfc67f9b 2004-05-16 devnull .BR .T& ,
87 dfc67f9b 2004-05-16 devnull where the format changes,
88 dfc67f9b 2004-05-16 devnull or the end of the table at
89 dfc67f9b 2004-05-16 devnull .BR .TE .
90 dfc67f9b 2004-05-16 devnull A format is specified by key letters, one per column, either upper or lower case:
94 dfc67f9b 2004-05-16 devnull Left justify: the default for
95 dfc67f9b 2004-05-16 devnull columns without format keys.
99 dfc67f9b 2004-05-16 devnull Right justify.
105 dfc67f9b 2004-05-16 devnull Numeric: align at decimal point (inferred for integers) or at
106 dfc67f9b 2004-05-16 devnull .LR \e& .
109 dfc67f9b 2004-05-16 devnull Span: extend previous column across this one.
112 dfc67f9b 2004-05-16 devnull Alphabetic: left-aligned within column, widest item centered, indented relative to
117 dfc67f9b 2004-05-16 devnull Vertical span: continue item from previous row into this row.
120 dfc67f9b 2004-05-16 devnull Draw a horizontal rule in this column.
123 dfc67f9b 2004-05-16 devnull Draw a double horizontal rule in this column.
127 dfc67f9b 2004-05-16 devnull Key letters may be followed by modifiers, also either case:
129 dfc67f9b 2004-05-16 devnull .TP \w'\fLF\fIfont\fLXX'u
131 dfc67f9b 2004-05-16 devnull Draw vertical rule between columns.
135 dfc67f9b 2004-05-16 devnull Draw a double vertical rule between columns.
138 dfc67f9b 2004-05-16 devnull Gap between column is
140 dfc67f9b 2004-05-16 devnull ens wide.
141 dfc67f9b 2004-05-16 devnull Default is 3.
143 dfc67f9b 2004-05-16 devnull .BI F font
144 dfc67f9b 2004-05-16 devnull Use specified
145 dfc67f9b 2004-05-16 devnull .IR font .
152 dfc67f9b 2004-05-16 devnull .BR FI .
155 dfc67f9b 2004-05-16 devnull Begin vertically-spanned item at top row of range; default is
156 dfc67f9b 2004-05-16 devnull vertical centering (with
157 dfc67f9b 2004-05-16 devnull .LR ^ ).
160 dfc67f9b 2004-05-16 devnull Use point size
165 dfc67f9b 2004-05-16 devnull .IR n -point
166 dfc67f9b 2004-05-16 devnull vertical spacing in text block; signed
168 dfc67f9b 2004-05-16 devnull means relative change.
170 dfc67f9b 2004-05-16 devnull .BI W( n )
171 dfc67f9b 2004-05-16 devnull Column width as a
172 dfc67f9b 2004-05-16 devnull .I troff
173 dfc67f9b 2004-05-16 devnull width specification.
174 dfc67f9b 2004-05-16 devnull Parens are optional if
176 dfc67f9b 2004-05-16 devnull is a simple integer.
179 dfc67f9b 2004-05-16 devnull Equalize the widths of all columns marked
184 dfc67f9b 2004-05-16 devnull Each line of
186 dfc67f9b 2004-05-16 devnull becomes one row of the table; tabs separate items.
187 dfc67f9b 2004-05-16 devnull Lines beginning with
190 dfc67f9b 2004-05-16 devnull .I troff
191 dfc67f9b 2004-05-16 devnull requests.
192 dfc67f9b 2004-05-16 devnull Certain special data items are recognized:
196 dfc67f9b 2004-05-16 devnull Draw a horizontal rule in this column.
200 dfc67f9b 2004-05-16 devnull Draw a double horizontal rule in this column.
201 dfc67f9b 2004-05-16 devnull A data line consisting of a single
205 dfc67f9b 2004-05-16 devnull draws the rule across the whole table.
208 dfc67f9b 2004-05-16 devnull Draw a rule only as wide as the contents of the column.
210 dfc67f9b 2004-05-16 devnull .BI \eR x
211 dfc67f9b 2004-05-16 devnull Repeat character
213 dfc67f9b 2004-05-16 devnull across the column.
216 dfc67f9b 2004-05-16 devnull Span the previous item in this column down into this row.
219 dfc67f9b 2004-05-16 devnull The item is a text block to be separately formatted
221 dfc67f9b 2004-05-16 devnull .I troff
222 dfc67f9b 2004-05-16 devnull and placed in the table.
223 dfc67f9b 2004-05-16 devnull The block continues to the next line beginning with
224 dfc67f9b 2004-05-16 devnull .BR T} .
225 dfc67f9b 2004-05-16 devnull The remainder of the data line follows at that point.
229 dfc67f9b 2004-05-16 devnull When it is used in a pipeline with
230 dfc67f9b 2004-05-16 devnull .IR eqn ,
233 dfc67f9b 2004-05-16 devnull command should be first, to minimize the volume
234 dfc67f9b 2004-05-16 devnull of data passed through
236 dfc67f9b 2004-05-16 devnull .SH EXAMPLES
237 dfc67f9b 2004-05-16 devnull .ds tb \fR<tab>\fP
238 dfc67f9b 2004-05-16 devnull Let \*(tb
239 dfc67f9b 2004-05-16 devnull represent a tab (which should
240 dfc67f9b 2004-05-16 devnull be typed as a genuine tab).
241 dfc67f9b 2004-05-16 devnull .if t .2C
248 dfc67f9b 2004-05-16 devnull Household Population
249 dfc67f9b 2004-05-16 devnull Town\*(tbHouseholds
250 dfc67f9b 2004-05-16 devnull \*(tbNumber\*(tbSize
251 dfc67f9b 2004-05-16 devnull Bedminster\*(tb789\*(tb3.26
252 dfc67f9b 2004-05-16 devnull Bernards Twp.\*(tb3087\*(tb3.74
253 dfc67f9b 2004-05-16 devnull Bernardsville\*(tb2018\*(tb3.30
255 dfc67f9b 2004-05-16 devnull .if t \{\0
258 dfc67f9b 2004-05-16 devnull .if n .PP
264 dfc67f9b 2004-05-16 devnull Household Population
265 dfc67f9b 2004-05-16 devnull Town Households
266 dfc67f9b 2004-05-16 devnull Number Size
267 dfc67f9b 2004-05-16 devnull Bedminster 789 3.26
268 dfc67f9b 2004-05-16 devnull Bernards Twp. 3087 3.74
269 dfc67f9b 2004-05-16 devnull Bernardsville 2018 3.30
272 dfc67f9b 2004-05-16 devnull .if t \{.sp3
274 dfc67f9b 2004-05-16 devnull .SH SOURCE
275 dfc67f9b 2004-05-16 devnull .B /sys/src/cmd/tbl
276 dfc67f9b 2004-05-16 devnull .SH SEE ALSO
277 dfc67f9b 2004-05-16 devnull .IR troff (1),
278 dfc67f9b 2004-05-16 devnull .IR eqn (1),
279 dfc67f9b 2004-05-16 devnull .IR doctype (1)
281 dfc67f9b 2004-05-16 devnull M. E. Lesk and L. L. Cherry,
282 dfc67f9b 2004-05-16 devnull ``TBL\(ema Program to Format Tables'',
284 dfc67f9b 2004-05-16 devnull Unix Research System Programmer's Manual,
285 dfc67f9b 2004-05-16 devnull Tenth Edition, Volume 2.