Part of the
troff suite of
Unix document layout tools, tbl is a preprocessor that formats
tables in preparation for processing with troff/
nroff.
Overview
Mike Lesk is the original author of tbl.
Like the main troff program, it uses command lines interspersed with data to be printed. Because of the nature of tabular
data having rows and columns, tbl commands also intraline delimiters for fields and to indicate where to draw lines.
First a line starting with
.TS
, followed by full table options such as
center
to center the table on a line or
box
to draw a box around it (boxes in tbl are drawn with overlapping hyphens and underscores; there were no line drawing commands at the time of creation. Disjoint edges can be observed upon close inspection).
Succeeding lines set up the formatting of each cell in the table with one character flags, such as
c
to center data in its cell,
hyphens to draw horizontal rules,
vertical bar
The vertical bar, , is a glyph with various uses in mathematics, computing, and typography. It has many names, often related to particular meanings: Sheffer stroke (in logic), pipe, bar, or (literally the word "or"), vbar, and others.
Usage
...
s to draw vertical rules, and
carets to span cells vertically.
The last formatting ends a
period indicate cell data follows. The data comes next, one line per row, with
tabs (by default) separating cells. Finally a line containing just
.TE
ends the table.
This is just a summary of tbl syntax, which can vary in small details from implementation to implementation. GNU troff (
groff), Heirloom troff, and
mandoc
mandoc (historically called mdocml) is a utility used for formatting man pages in BSD Operating Systems (e.g. NetBSD), specifically those written in the ''mdoc'' and ''man'' macro languages. Unlike the groff and older troff and nroff tools t ...
contain tbl implementations.
See also
*
troff
*
groff (software)
*
mandoc
mandoc (historically called mdocml) is a utility used for formatting man pages in BSD Operating Systems (e.g. NetBSD), specifically those written in the ''mdoc'' and ''man'' macro languages. Unlike the groff and older troff and nroff tools t ...
References
{{Reflist
External links
L.L.Cherry, M.E.Lesk. Tbl - A Program to Format TablesMan page for tbl(1)
tbl