Jump to content

tbl

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Ghettoblaster (talk | contribs) at 13:51, 16 March 2019. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

tbl
Original author(s)Mike Lesk
Developer(s)AT&T Bell Laboratories
Initial releaseMay 1975; 49 years ago (1975-05)
Operating systemUnix and Unix-like
TypeCommand

Part of the troff suite of Unix document layout tools, tbl is a preprocessor that formats tables in preparation for processing with troff/nroff.[1]

Overview

Mike Lesk is the original author of tbl.[2] 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[citation needed]). 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 bars 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 contain tbl implementations.

See also

References

  1. ^ Dougherty, Dale. "8 Formatting with tbl [Book]". www.safaribooksonline.com. O'Reilly. Retrieved 20 November 2016.
  2. ^ McIlroy, M. D. (1987). A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 (PDF) (Technical report). CSTR. Bell Labs. 139.

External links