[BACK]Return to roff.7 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/roff.7 between version 1.22 and 1.23

version 1.22, 2011/01/04 15:02:00 version 1.23, 2011/01/04 23:32:21
Line 546  See
Line 546  See
 .Sx \&TS .  .Sx \&TS .
 .Ss \&TS  .Ss \&TS
 Begin a table, which formats input in aligned rows and columns.  Begin a table, which formats input in aligned rows and columns.
 A table consists of an optional single line of table options terminated  See
 by a semicolon, followed by one or more lines of layout specification  .Xr tbl 7
 terminated by a period, then table data.  for a description of the tbl language.
 A table block may also include  
 .Nm ,  
 .Xr mdoc 7 ,  
 or  
 .Xr man 7  
 macros.  
 Example:  
 .Bd -literal -offset indent  
 \&.TS  
 box tab(:);   \e" Table-wide options.  
 c | c         \e" Layout for first line.  
 | c | c.      \e" Layout for all subsequent lines.  
 1:2           \e" Data...  
 3:4  
 \&.TE  
 .Ed  
 .Pp  
 Table data is  
 .Em pre-processed ,  
 that is, data rows are parsed then inserted into the underlying stream  
 of input data.  
 This allows data rows to be interspersed by arbitrary macros, such as  
 .Bd -literal -offset indent  
 \&.TS  
 tab(:);  
 c c c.  
 1:2:3  
 \&.Ao  
 3:2:1  
 \&.Ac  
 \&.TE  
 .Ed  
 .Pp  
 in the case of  
 .Xr mdoc 7  
 or  
 .Bd -literal -offset indent  
 \&.TS  
 tab(:);  
 c c c.  
 \&.ds ab 2  
 1:\e*(ab:3  
 \&.I  
 3:2:1  
 \&.TE  
 .Ed  
 .Pp  
 in the case of  
 .Xr man 7 .  
 .Pp  
 The first line of a table consists of its options, which consists of  
 space-separated keys and modifiers terminated by a semicolon.  
 If the first line does not have a terminating semicolon, it is assumed  
 that no options are specified and instead a layout is processed.  
 Some options accept arguments enclosed by paranthesis.  
 The following case-insensitive options are available:  
 .Bl -tag -width Ds  
 .It Cm center  
 This option is not supported by  
 .Xr mandoc 1 .  
 This may also be invoked with  
 .Cm centre .  
 .It Cm delim  
 Accepts a two-character argument.  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm expand  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm box  
 Draw a single-line box around the table.  
 This may also be invoked with  
 .Cm frame .  
 .It Cm doublebox  
 Draw a double-line box around the table.  
 This may also be invoked with  
 .Cm doubleframe .  
 .It Cm allbox  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm tab  
 Accepts a single-character argument.  
 This character is used a delimiter between data cells, which otherwise  
 defaults to the tab character.  
 .It Cm linesize  
 Accepts a natural number (all digits).  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm nokeep  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm decimalpoint  
 Accepts a single-character argument.  
 This character will be used as the decimal point with the  
 .Cm n  
 layout key.  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm nospaces  
 This option is not supported by  
 .Xr mandoc 1 .  
 .El  
 .Pp  
 The table layout follows table options, except in the case of  
 .Sx \&T& ,  
 where it immediately procedes invocation.  
 Layout specifies how data rows are displayed on output.  
 Each layout line corresponds to a line of data; the last layout line  
 applies to all remaining data lines.  
 Layout lines may also be separated by a comma.  
 Each layout cell consists of one of the following case-insensitive keys:  
 .Bl -tag -width Ds  
 .It Cm c  
 Centre a literal string within its column.  
 .It Cm r  
 Right-justify a literal string within its column.  
 .It Cm l  
 Left-justify a literal string within its column.  
 .It Cm n  
 Justify a number around its decimal point.  
 If the decimal point is not found on the number, it's assumed to trail  
 the number.  
 .It Cm s  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm a  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm ^  
 This option is not supported by  
 .Xr mandoc 1 .  
 .It Cm \-  
 Replace the data cell (its contents will be lost) with a single  
 horizontal line.  
 This may also be invoked with  
 .Cm _ .  
 .It Cm =  
 Replace the data cell (its contents will be lost) with a double  
 horizontal line.  
 .It Cm \(ba  
 Emit a vertical bar instead of data.  
 .It Cm \(ba\(ba  
 Emit a double-vertical bar instead of data.  
 .El  
 .Pp  
 For example, following layout specifies a centre-justified column of  
 minimum width 10, followed by vertical bar, followed by a left-justified  
 column of minimum width 10, another vertical bar, then a column  
 justified about the decimal point in numbers:  
 .Pp  
 .Dl c10 | l10 | n  
 .Pp  
 Keys may be followed by a set of modifiers.  
 A modifier is either a modifier key or a natural number for specifying  
 spacing.  
 The following case-insensitive modifier keys are available:  
 .Cm z ,  
 .Cm u ,  
 .Cm e ,  
 .Cm t ,  
 .Cm d ,  
 .Cm f ,  
 .Cm b ,  
 .Cm i ,  
 .Cm b ,  
 and  
 .Cm i .  
 All of these are ignored by  
 .Xr mandoc 1 .  
 .Pp  
 The data section follows the last layout row.  
 By default, cells in a data section are delimited by a tab.  
 This behaviour may be changed with the  
 .Cm tab  
 option.  
 If  
 .Cm _  
 or  
 .Cm =  
 is specified, a single or double line, respectively, is drawn across the  
 data field.  
 If  
 .Cm \e-  
 or  
 .Cm \e=  
 is specified, a line is drawn within the data field (i.e., terminating  
 within the cell and not draw to the border).  
 If the last cell of a line is  
 .Cm T{ ,  
 all subsequent lines are included as part of the cell until  
 .Cm T}  
 is specified on its own line.  
 .Sh COMPATIBILITY  .Sh COMPATIBILITY
 This section documents compatibility between mandoc and other other  This section documents compatibility between mandoc and other other
 .Nm  .Nm
Line 771  using the next-line syntax.
Line 579  using the next-line syntax.
 .Xr mandoc 1 ,  .Xr mandoc 1 ,
 .Xr man 7 ,  .Xr man 7 ,
 .Xr mandoc_char 7 ,  .Xr mandoc_char 7 ,
 .Xr mdoc 7  .Xr mdoc 7 ,
 .Rs  .Xr tbl 7
 .%A M. E. Lesk  
 .%T Tbl\(emA Program to Format Tables  
 .%D June 11, 1976  
 .%U http://www.kohala.com/start/troff/v7/man/tbl/tbl.ps  
 .Re  
 .Rs  .Rs
 .%A Joseph F. Ossanna  .%A Joseph F. Ossanna
 .%A Brian W. Kernighan  .%A Brian W. Kernighan

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

CVSweb