tbl.man revision 114402
1.ig
2Copyright (C) 1989-1995, 2001, 2002 Free Software Foundation, Inc.
3
4Permission is granted to make and distribute verbatim copies of
5this manual provided the copyright notice and this permission notice
6are preserved on all copies.
7
8Permission is granted to copy and distribute modified versions of this
9manual under the conditions for verbatim copying, provided that the
10entire resulting derived work is distributed under the terms of a
11permission notice identical to this one.
12
13Permission is granted to copy and distribute translations of this
14manual into another language, under the above conditions for modified
15versions, except that this permission notice may be included in
16translations approved by the Free Software Foundation instead of in
17the original English.
18..
19.TH @G@TBL @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
20.SH NAME
21@g@tbl \- format tables for troff
22.
23.
24.SH SYNOPSIS
25.B @g@tbl
26[
27.B \-Cv
28]
29[
30.IR files \|.\|.\|.\&
31]
32.
33.
34.SH DESCRIPTION
35This manual page describes the GNU version of
36.BR tbl ,
37which is part of the groff document formatting system.
38.B tbl
39compiles descriptions of tables embedded within
40.B troff
41input files into commands that are understood by
42.BR troff .
43Normally, it should be invoked using the
44.B \-t
45option of
46.B groff.
47It is highly compatible with Unix
48.BR tbl .
49The output generated by GNU
50.B tbl
51cannot be processed with Unix
52.BR troff ;
53it must be processed with GNU
54.BR troff .
55If no files are given on the command line, the standard input
56will be read.
57A filename of
58.B \-
59will cause the standard input to be read.
60.
61.
62.SH OPTIONS
63.TP
64.B \-C
65Recognize
66.B .TS
67and
68.B .TE
69even when followed by a character other than space or newline.
70.TP
71.B \-v
72Print the version number.
73.
74.
75.SH USAGE
76.B tbl
77expects to find table descriptions wrapped in the
78.B .TS
79(table start) and
80.B .TE
81(table end) macros.
82The line immediately following the
83.B .TS
84macro may contain any of the following global options (ignoring the case
85of characters -- Unix tbl only accepts options with all characters lowercase
86or all characters uppercase):
87.
88.TP
89.B center
90Centers the table (default is left-justified).
91The alternative keyword name
92.B centre
93is also recognized (this is a GNU tbl extension).
94.
95.TP
96.BI delim( xy )
97Use
98.I x
99and
100.I y
101as start and end delimiters for
102.BR @g@eqn (@MAN1EXT@).
103.
104.TP
105.B expand
106Makes the table as wide as the current line length.
107.
108.TP
109.B box
110Encloses the table in a box.
111.
112.TP
113.B doublebox
114Encloses the table in a double box.
115.
116.TP
117.B allbox
118Encloses each item of the table in a box.
119.
120.TP
121.B frame
122Same as box (GNU tbl only).
123.
124.TP
125.B doubleframe
126Same as doublebox (GNU tbl only).
127.
128.TP
129.BI tab( x )
130Uses the character
131.I x
132instead of a tab to separate items in a line of input data.
133.
134.TP
135.BI linesize( n )
136Sets lines or rules (e.g. from
137.BR box )
138in
139.IR n -point
140type.
141.
142.TP
143.B nokeep
144Don't use diversions to prevent page breaks (GNU tbl only).
145Normally
146.B tbl
147attempts to prevent undesirable breaks in the table by using diversions.
148This can sometimes interact badly with macro packages' own use of
149diversions, when footnotes, for example, are used.
150.
151.TP
152.BI decimalpoint( c )
153Set the character to be recognized as the decimal point in numeric
154columns (GNU tbl only).
155.
156.TP
157.B nospaces
158Ignore leading and trailing spaces in data items (GNU tbl only).
159.
160.LP
161The global options must end with a semicolon.
162There might be whitespace after an option and its argument in parentheses.
163.LP
164After global options come lines describing the format of each line of
165the table.
166Each such format line describes one line of the table itself, except that
167the last format line (which you must end with a period) describes all
168remaining lines of the table.
169A single key character describes each column of each line of the table.
170You may run format specs for multiple lines together on the same line by
171separating them with commas.
172.LP
173You may follow each key character with specifiers that determine the font
174and point size of the corresponding item, that determine column width,
175inter-column spacing, etc.
176.LP
177The longest format line defines the number of columns in the table; missing
178format descriptors at the end of format lines are assumed to be `L'.
179Extra columns in the data (which have no corresponding format entry) are
180ignored.
181.LP
182The available key characters are:
183.
184.TP
185c,C
186Centers item within the column.
187.
188.TP
189r,R
190Right-justifies item within the column.
191.
192.TP
193l,L
194Left-justifies item within the column.
195.
196.TP
197n,N
198Numerically justifies item in the column: Units positions of numbers are
199aligned vertically.
200.
201.TP
202s,S
203Spans previous item on the left into this column.
204.
205.TP
206a,A
207Centers longest line in this column and then left-justifies all other lines
208in this column with respect to that centered line.
209.
210.TP
211^
212Spans down entry from previous row in this column.
213.
214.TP
215_,-
216Replaces this entry with a horizontal line.
217.
218.TP
219=
220.
221Replaces this entry with a double horizontal line.
222.
223.TP
224|
225The corresponding column becomes a vertical rule (if two of these are
226adjacent, a double vertical rule).
227.
228.LP
229A vertical bar to the left of the first key-letter or to the right of the
230last one produces a line at the edge of the table.
231.LP
232Here are the specifiers that can appear in suffixes to column key letters:
233.
234.TP
235b,B
236Short form of fB (make affected entries bold).
237.
238.TP
239i,I
240Short form of fI (make affected entries italic).
241.
242.TP
243t,T
244Start an item vertically spanning rows at the top of its range rather than
245vertically centering it.
246.
247.TP
248d,D
249Start an item vertically spanning rows at the bottom of its range rather
250than vertically centering it (GNU tbl only).
251.
252.TP
253v,V
254Followed by a number, this indicates the vertical line spacing to be used in
255a multi-line table entry.
256If signed, the current vertical line spacing is incremented or decremented
257(using a signed number instead of a signed digit is a GNU tbl extension).
258A vertical line spacing specifier followed by a column separation number
259must be separated by one or more blanks.
260No effect if the corresponding table entry isn't a text block.
261.
262.TP
263f,F
264Either of these specifiers may be followed by a font name (either one or two
265characters long), font number (a single digit), or long name in parentheses
266(the last form is a GNU tbl extension).
267A one-letter font name must be separated by one or more blanks from whatever
268follows.
269.
270.TP
271p,P
272Followed by a number, this does a point size change for the affected fields.
273If signed, the current point size is incremented or decremented (using a
274signed number instead of a signed digit is a GNU tbl extension).
275A point size specifier followed by a column separation number must be
276separated by one or more blanks.
277.
278.TP
279w,W
280Minimal column width value.
281Must be followed either by a
282.BR @g@troff (@MAN1EXT@)
283width expression in parentheses or a unitless integer.
284If no unit is given, en units are used.
285Also used as the default line length for included text blocks.
286If used multiple times to specify the width for a particular column,
287the last entry takes effect.
288.
289.TP
290e,E
291Make equally-spaced columns.
292.
293.TP
294u,U
295Move the corresponding column up one half-line.
296.
297.TP
298z,Z
299Ignore the corresponding column for width-calculation purposes.
300.
301.LP
302A number suffix on a key character is interpreted as a column
303separation in ens (multiplied in proportion if the
304.B expand
305option is on).
306Default separation is 3n.
307.LP
308The format lines are followed by lines containing the actual data for the
309table, followed finally by
310.BR .TE .
311Within such data lines, items are normally separated by tab characters (or
312the character specified with the
313.B tab
314option).
315Long input lines can be broken across multiple lines if the last character
316on the line is `\e' (which vanishes after concatenation).
317.LP
318A dot starting a line, followed by anything but a digit is handled as a
319troff command, passed through without changes.
320The table position is unchanged in this case.
321.LP
322If a data line consists of only `_' or `=', a single or double line,
323respectively, is drawn across the table at that point; if a single item in a
324data line consists of only `_' or `=', then that item is replaced by a
325single or double line, joining its neighbours.
326If a data item consists only of `\e_' or `\e=', a single or double line,
327respectively, is drawn across the field at that point which does not join
328its neighbours.
329.LP
330A data item consisting only of `\eRx' (`x' any character) is replaced by
331repetitions of character `x' as wide as the column (not joining its
332neighbours).
333.LP
334A data item consisting only of `\e^' indicates that the field immediately
335above spans downward over this row.
336.LP
337A text block can be used to enter data as a single entry which would be
338too long as a simple string between tabs.
339It is started with `T{' and closed with `T}'.
340The former must end a line, and the latter must start a line, probably
341followed by other data columns (separated with tabs).
342.LP
343To change the data format within a table, use the
344.B .T&
345command (at the start of a line).
346It is followed by format and data lines (but no global options) similar to
347the
348.B .TS
349request.
350.
351.
352.SH "INTERACTION WITH @G@EQN"
353.BR @g@tbl (@MAN1EXT@)
354should always be called before
355.BR @g@eqn (@MAN1EXT@)
356.RB ( groff (@MAN1EXT@)
357automatically takes care of the correct order of preprocessors).
358.
359.
360.SH "GNU TBL ENHANCEMENTS"
361There is no limit on the number of columns in a table, nor any limit on the
362number of text blocks.
363All the lines of a table are considered in deciding column widths, not just
364the first 200.
365Table continuation
366.RB ( .T& )
367lines are not restricted to the first 200 lines.
368.LP
369Numeric and alphabetic items may appear in the same column.
370.LP
371Numeric and alphabetic items may span horizontally.
372.LP
373.B @g@tbl
374uses register, string, macro and diversion names beginning with the digit\~\c
375.BR 3 .
376When using
377.B @g@tbl
378you should avoid using any names beginning with a\~\c
379.BR 3 .
380.
381.
382.SH BUGS
383You should use
384.BR .TS\ H / .TH
385in conjunction with a supporting macro package for
386.I all
387multi-page boxed tables.
388If there is no header that you wish to appear at the top of each page
389of the table, place the
390.B .TH
391line immediately after the format section.
392Do not enclose a multi-page table within keep/release macros,
393or divert it in any other way.
394.LP
395A text block within a table must be able to fit on one page.
396.LP
397The
398.B bp
399request cannot be used to force a page-break in a multi-page table.
400Instead, define
401.B BP
402as follows
403.IP
404.B .de BP
405.br
406.B .ie '\e\en(.z'' .bp \e\e$1
407.br
408.B .el \e!.BP \e\e$1
409.br
410.B ..
411.br
412.LP
413and use
414.B BP
415instead of
416.BR bp .
417.LP
418Using \ea directly in a table to get leaders will not work.
419This is correct behaviour: \ea is an
420.B uninterpreted
421leader.
422To get leaders use a real leader, either by using a control A or like
423this:
424.IP
425.nf
426.ft B
427\&.ds a \ea
428\&.TS
429tab(;);
430lw(1i) l.
431A\e*a;B
432\&.TE
433.ft
434.fi
435.
436.
437.SH REFERENCE
438Lesk, M.E.: "TBL -- A Program to Format Tables".
439For copyright reasons it cannot be included in the groff distribution,
440but copies can be found with a title search on the World Wide Web.
441.
442.
443.SH "SEE ALSO"
444.BR groff (@MAN1EXT@),
445.BR @g@troff (@MAN1EXT@)
446.
447.\" Local Variables:
448.\" mode: nroff
449.\" End:
450