PageRenderTime 80ms CodeModel.GetById 16ms app.highlight 58ms RepoModel.GetById 2ms app.codeStats 0ms

/contrib/groff/src/preproc/tbl/tbl.man

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