aboutsummaryrefslogtreecommitdiff
path: root/man/man1/tbl.html
blob: a50e89398f7456124cf8f70ede7a0082a04d7bfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<head>
<title>tbl(1) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>TBL(1)</b><td align=right><b>TBL(1)</b>
<tr><td width=20><td colspan=2>
    <br>
<p><font size=+1><b>NAME     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    tbl &ndash; format tables for nroff or troff<br>
    
</table>
<p><font size=+1><b>SYNOPSIS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>tbl</font></tt> [ <i>file ...</i> ]<br>
    
</table>
<p><font size=+1><b>DESCRIPTION     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <i>Tbl</i> is a preprocessor for formatting tables for <i>nroff</i> or <a href="../man1/troff.html"><i>troff</i>(1)</a>.
    The input <i>files</i> are copied to the standard output, except for
    segments of the form<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>.TS <br>
        </font></tt><i>options</i> <tt><font size=+1>;<br>
        </font></tt><i>format</i> <tt><font size=+1>.<br>
        </font></tt><i>data <br>
        </i><tt><font size=+1>.T&amp; <br>
        </font></tt><i>format</i> <tt><font size=+1>.<br>
        </font></tt><i>data <br>
        </i>. . .<br>
        <tt><font size=+1>.TE <br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        </font></tt>
        
    </table>
    which describe tables and are replaced by <i>troff</i> requests to lay
    out the tables. If no arguments are given, <i>tbl</i> reads the standard
    input. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    The (optional) <i>options</i> line is terminated by a semicolon and contains
    one or more of<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>center</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;center the table; default is left-adjust<br>
        <tt><font size=+1>expand</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;make table as wide as current line length<br>
        <tt><font size=+1>box<br>
        doublebox</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enclose the table in a box or double box<br>
        <tt><font size=+1>allbox</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enclose every item in a box<br>
        <tt><font size=+1>tab(</font></tt><i>x</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;use <i>x</i> to separate input items; default is tab<br>
        <tt><font size=+1>linesize(</font></tt><i>n</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;set rules in <i>n</i>-point type<br>
        <tt><font size=+1>delim(</font></tt><i>xy</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recognize <i>x</i> and <i>y</i> as <a href="../man1/eqn.html"><i>eqn</i>(1)</a> delimiters<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        
        
    </table>
    Each line, except the last, of the obligatory <i>format</i> describes
    one row of the table. The last line describes all rows until the
    next <tt><font size=+1>.T&amp;</font></tt>, where the format changes, or the end of the table at
    <tt><font size=+1>.TE</font></tt>. A format is specified by key letters, one per column, either
    upper or lower case:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>L</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Left justify: the default for columns without format keys.<br>
        <tt><font size=+1>R</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right justify.<br>
        <tt><font size=+1>C</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Center.<br>
        <tt><font size=+1>N</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Numeric: align at decimal point (inferred for integers) or at
        <tt><font size=+1>\&amp;</font></tt>.<br>
        <tt><font size=+1>S</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Span: extend previous column across this one.<br>
        <tt><font size=+1>A</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alphabetic: left-aligned within column, widest item centered,
        indented relative to <tt><font size=+1>L</font></tt> rows.<br>
        <tt><font size=+1>^</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertical span: continue item from previous row into this row.<br>
        <tt><font size=+1>&#8722;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a horizontal rule in this column.<br>
        <tt><font size=+1>=</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a double horizontal rule in this column.<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        
        
    </table>
    Key letters may be followed by modifiers, also either case:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>|</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw vertical rule between columns.<br>
        <tt><font size=+1>||</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a double vertical rule between columns.<br>
        <i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gap between column is <i>n</i> ens wide. Default is 3.<br>
        <tt><font size=+1>F</font></tt><i>font</i>&nbsp;&nbsp;&nbsp;Use specified <i>font</i>. <tt><font size=+1>B</font></tt> and <tt><font size=+1>I</font></tt> mean <tt><font size=+1>FB</font></tt> and <tt><font size=+1>FI</font></tt>.<br>
        <tt><font size=+1>T</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begin vertically-spanned item at top row of range; default is
        vertical centering (with <tt><font size=+1>^</font></tt>).<br>
        <tt><font size=+1>P</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use point size <i>n</i>.<br>
        <tt><font size=+1>V</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use <i>n</i>-point vertical spacing in text block; signed <i>n</i> means relative
        change.<br>
        <tt><font size=+1>W(</font></tt><i>n</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;Column width as a <i>troff</i> width specification. Parens are optional
        if <i>n</i> is a simple integer.<br>
        <tt><font size=+1>E</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equalize the widths of all columns marked <tt><font size=+1>E</font></tt>.<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        
        
    </table>
    Each line of <i>data</i> becomes one row of the table; tabs separate
    items. Lines beginning with <tt><font size=+1>.</font></tt> are <i>troff</i> requests. Certain special
    data items are recognized:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>_</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a horizontal rule in this column.<br>
        <tt><font size=+1>=</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a double horizontal rule in this column. A data line consisting
        of a single <tt><font size=+1>_</font></tt> or <tt><font size=+1>=</font></tt> draws the rule across the whole table.<br>
        <tt><font size=+1>\_</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Draw a rule only as wide as the contents of the column.<br>
        <tt><font size=+1>\R</font></tt><i>x</i>&nbsp;&nbsp;&nbsp;Repeat character <i>x</i> across the column.<br>
        <tt><font size=+1>\^</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Span the previous item in this column down into this row.<br>
        <tt><font size=+1>T{</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The item is a text block to be separately formatted by <i>troff</i>
        and placed in the table. The block continues to the next line
        beginning with <tt><font size=+1>T}</font></tt>. The remainder of the data line follows at that
        point.<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        
        
    </table>
    When it is used in a pipeline with <i>eqn</i>, the <i>tbl</i> command should
    be first, to minimize the volume of data passed through pipes.<br>
    
</table>
<p><font size=+1><b>EXAMPLES     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    Let &lt;tab&gt; represent a tab (which should be typed as a genuine tab).<br>
    <tt><font size=+1>.TS<br>
    c s s<br>
    c c s<br>
    c c c<br>
    l n n.<br>
    Household Population<br>
    Town</font></tt>&lt;tab&gt;<tt><font size=+1>Households<br>
    </font></tt>&lt;tab&gt;<tt><font size=+1>Number</font></tt>&lt;tab&gt;<tt><font size=+1>Size<br>
    </font></tt>
</table>
Bedminster&lt;tab&gt;789&lt;tab&gt;3.26<br>
Bernards Twp.&lt;tab&gt;3087&lt;tab&gt;3.74<br>
Bernardsville&lt;tab&gt;2018&lt;tab&gt;3.30<br>
.TE<br>
 <br>
 <br>
<br>
c s s<br>
c c s<br>
c c c<br>
l n n.<br>
Household Population<br>
Town Households<br>
Number &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size<br>
Bedminster &nbsp;&nbsp;&nbsp;789 &nbsp;&nbsp;&nbsp;3.26<br>
Bernards Twp. 3087 &nbsp;&nbsp;&nbsp;3.74<br>
Bernardsville 2018 &nbsp;&nbsp;&nbsp;3.30<br>
<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>