| TBL(7) | Miscellaneous Information Manual | TBL(7) | 
tbl —
tbl language formats tables. It is used within
  mdoc(7) and
  man(7) pages. This manual describes
  the subset of the tbl language accepted by the
  mandoc(1) utility.
Each table is started with a
    roff(7)
    TS macro, consist of at most one line of
    Options, one or more
    Layout lines, one or more
    Data lines, and ends with a
    TE macro. All input must be 7-bit ASCII.
The following options are available. Some of them require arguments enclosed in parentheses:
allboxboxframe.centercentre.decimalpointn layout key. This is a GNU extension.delimdoubleboxdoubleframe.expandlinesizenokeepnospacesnowarntabTS
  or T& macro. Each layout line specifies how one
  line of Data is formatted. The last layout line
  ends with a full stop. It also applies to all remaining data lines. Multiple
  layout lines can be joined by commas on a single physical input line.
Each layout line consists of one or more layout cell specifications, optionally separated by whitespace. The following case-insensitive key characters start a new cell specification:
crlnss
      layout cell. It is an error if a column span follows a
      _ or = cell, or comes
      first on a layout line. The combined cell as a whole consumes only one
      cell of the corresponding data line.a^^ layout
      cell. It is an error to invoke a vertical span on the first layout line.
      Unlike a horizontal span, a vertical span consumes a data cell and
      discards the content._-.=Each cell key may be followed by zero or more of the following case-insensitive modifiers:
bdee modifier.fimpvtuwxx
      modifier.z|||If a modifier consists of decimal digits, it specifies a minimum
    spacing in units of n between this column and the
    next column to the right. The default is 3. If there is a vertical line, it
    is drawn inside the spacing.
tab characters.
If a data cell contains only the two bytes
    ‘\^’, the cell above spans to this
    row, as if the layout specification of this cell were
    ^.
If a data cell contains only the single character
    ‘_’ or
    ‘=’, a single or double horizontal
    line is drawn across the cell, joining its neighbours. If a data cell
    contains only the two character sequence
    ‘\_’ or
    ‘\=’, a single or double horizontal
    line is drawn inside the cell, not joining its neighbours. If a data line
    contains nothing but the single character
    ‘_’ or
    ‘=’, a horizontal line across the
    whole table is inserted without consuming a layout row.
In place of any data cell, a text block can be used. It starts
    with T{ at the end of a physical input line. Input
    line breaks inside the text block neither end the text block nor its data
    cell. It only ends if T} occurs at the beginning of
    a physical input line and is followed by an end-of-cell indicator. If the
    T} is followed by the end of the physical input
    line, the text block, the data cell, and the data line ends at this point.
    If the T} is followed by the
    tab character, only the text block and the data cell
    end, but the data line continues with the data cell following the
    tab character. If T} is
    followed by any other character, it does not end the text block, which
    instead continues to the following physical input line.
.TS rb c lb r ci l. r center l ri ce le right c left .TE
| r | center | l | 
| ri | ce | le | 
| right | c | left | 
Some ports in OpenBSD 6.1 to show number alignment and line drawing:
.TS box tab(:); r| l r n. software:version _ AFL:2.39b Mutt:1.8.0 Ruby:1.8.7.374 TeX Live:2015 .TE
| software | version | 
| AFL | 2.39b | 
| Mutt | 1.8.0 | 
| Ruby | 1.8.7.374 | 
| TeX Live | 2015 | 
Spans and skipping width calculations:
.TS box tab(:); lz s | rt lt| cb| ^ ^ | rz s. left:r l:center: :right .TE
| left | r | |
| l | center | |
| right | ||
Text blocks, specifying spacings and specifying and equalizing
    column widths, putting lines into individual cells, and overriding
    allbox:
.TS
allbox tab(:);
le le||7 lw10.
The fourth line:_:line 1
of this column:=:line 2
determines:_:line 3
the column width.:T{
This text is too wide to fit into a column of width 17.
T}:line 4
T{
No break here.
T}::line 5
.TE
| The fourth line | _ | line 1 | 
| of this column | = | line 2 | 
| determines | _ | line 3 | 
| the column width. | This text is too wide to fit into a column of width 17. | line 4 | 
| No break here. | line 5 | 
These examples were constructed to demonstrate many
    tbl features in a compact way. In real manual pages,
    keep tables as simple as possible. They usually look better, are less
    fragile, and are more portable.
tbl doesn't support
  mdoc(7) and
  man(7) macros and
  eqn(7) equations inside tables.
M. E. Lesk, Tbl—A Program to Format Tables, June 11, 1976.
tbl reference was written by
  Kristaps Dzonsons
  <kristaps@bsd.lv> and
-T utf8 output mode, heavy
  lines are drawn instead of double lines. This cannot be improved because the
  Unicode standard only provides an incomplete set of box drawing characters
  with double lines, whereas it provides a full set of box drawing characters
  with heavy lines. It is unlikely this can be improved in the future because
  the box drawing characters are already marked in Unicode as characters
  intended only for backward compatibility with legacy systems, and their use is
  not encouraged. So it seems unlikely that the missing ones might get added in
  the future.
| March 2, 2019 | NetBSD 10.0 |