| tbl | R Documentation |
tbl, by Mike Lesk, is the troff preprocessor for tables. render_roff runs it for every output, the terminal draft included, and roff_table writes its input from a data frame. This page follows tbl(1) for groff 1.24.1.
A table sits between .TS and .TE and has three parts: options ending in ;, one format line per row ending in ., and the data, one line per row with entries separated by tabs, or here by @, which survives copying from this page.
.TS center box tab(@); cB cB l n. State@Income _ Alaska@6315 Maine@3694 .TE
The last format line applies to all remaining rows. roff_table writes tables like this from a data frame.
center | centre the table (otherwise it is at the left margin) |
expand | make the table as wide as the line |
box, doublebox, allbox | a box round the table, a double one, or a box round every entry |
tab(x) | separate entries with x instead of a tab |
linesize(n) | lines n points thick |
delim(xy) | eqn delimiters inside the table |
decimalpoint(c), nospaces, nokeep, nowarn | (GNU) decimal separator, trim spaces, allow page breaks within rows, quiet |
l, r, c | left, right, centred |
n | numbers aligned on the decimal point |
a | left-aligned and indented, for sub-entries |
s | span: the entry to the left extends into this column |
^ | span: the entry above extends into this row |
_, = | a single or double rule in place of the entry |
|, || | a vertical line between columns |
After the letter, modifiers: b bold, i italic, f(CR) any font, p12 type size, w(1i) minimum width, e equal widths, x expand this column, t top of a vertical span, and a number for the gap to the next column in ens (default 3). Rows of a format can be on separate lines or separated by commas: cB cB, l n.
_, =alone on a line, a horizontal rule across the table; alone in an entry, a rule across that cell.
\^in an entry, the entry above spans down into it.
T{ ... T}a text block: an entry of several lines, filled.
\&an empty entry made visible, or before a leading . in an entry.
.T&a new format for the rows that follow, with no more columns than before.
.TS H, .THwith ms, the rows before .TH repeat at the top of each page the table spans.
roff_table, ms, troff, eqn. In a terminal: man tbl; and M. E. Lesk, Tbl: A Program to Format Tables, Bell Laboratories, 1976.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.