source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Switch on the `TS' documentation in roff.7.
@ 2011-01-03 16:04 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-01-03 16:04 UTC (permalink / raw)
  To: source

Log Message:
-----------
Switch on the `TS' documentation in roff.7.  As per off-line discussion,
this may be moved to tbl.7, but for the time being, keep it in the
document as it's developed.

Also note that my handling of horizontal rules in layouts needs some
work.

Modified Files:
--------------
    mdocml:
        roff.7
        tbl_term.c

Revision Data
-------------
Index: roff.7
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.7,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lroff.7 -Lroff.7 -u -p -r1.19 -r1.20
--- roff.7
+++ roff.7
@@ -535,132 +535,180 @@ This request is intended to have one arg
 consisting of an even number of characters.
 Currently, it is ignored including its arguments,
 and the number of arguments is not checked.
-.\" .Ss \&T&
-.\" Re-start a table layout, retaining the options of the prior table
-.\" invocation.
-.\" See
-.\" .Sx \&TS .
-.\" .Ss \&TE
-.\" End a table context.
-.\" See
-.\" .Sx \&TS .
-.\" .Ss \&TS
-.\" Begin a table, which formats input in aligned rows and columns.
-.\" A table consists of an optional single line of table options terminated
-.\" by a semicolon, followed by one or more lines of layout specification
-.\" terminated by a period, then table data.
-.\" A table block may also include
-.\" .Nm ,
-.\" .Xr mdoc 7 ,
-.\" or
-.\" .Xr man 7
-.\" macros.
-.\" .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
-.\" 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
-.\" 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 may also be invoked with
-.\" .Cm centre .
-.\" .It Cm delim
-.\" Accepts a two-character argument.
-.\" This option is ignored.
-.\" .It Cm expand
-.\" .It Cm box
-.\" This may also be invoked with
-.\" .Cm frame .
-.\" .It Cm doublebox
-.\" This may also be invoked with
-.\" .Cm doubleframe .
-.\" .It Cm allbox
-.\" .It Cm tab
-.\" Accepts a single character argument used as the delimiter for cells in
-.\" data rows.
-.\" .It Cm linesize
-.\" Accepts a natural number (all digits) used as the line width for drawing
-.\" boxes.
-.\" .It Cm nokeep
-.\" .It Cm decimalpoint
-.\" .It Cm nospaces
-.\" .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
-.\" .It Cm r
-.\" .It Cm l
-.\" .It Cm n
-.\" .It Cm s
-.\" .It Cm a
-.\" .It Cm ^
-.\" .It Cm \-
-.\" This may also be invoked with
-.\" .Cm _ .
-.\" .It Cm =
-.\" .It Cm \(ba
-.\" .It Cm \(ba\(ba
-.\" .El
-.\" 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:
-.\" .Bl -tag -width Ds
-.\" .It Cm z
-.\" .It Cm u
-.\" .It Cm e
-.\" .It Cm t
-.\" .It Cm d
-.\" .It Cm f
-.\" Must be followed by a case-insensitive font style:
-.\" .Cm b
-.\" for bold or
-.\" .Cm i
-.\" for italic.
-.\" .It Cm b
-.\" .It Cm i
-.\" .El
+.Ss \&T&
+Re-start a table layout, retaining the options of the prior table
+invocation.
+See
+.Sx \&TS .
+.Ss \&TE
+End a table context.
+See
+.Sx \&TS .
+.Ss \&TS
+Begin a table, which formats input in aligned rows and columns.
+A table consists of an optional single line of table options terminated
+by a semicolon, followed by one or more lines of layout specification
+terminated by a period, then table data.
+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 \-
+This may also be invoked with
+.Cm _ .
+.It Cm =
+.It Cm \(ba
+Emit a vertical bar instead of data.
+.It Cm \(ba\(ba
+Emit a double-vertical bar instead of data.
+.El
+.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:
+.Bl -tag -width Ds
+.It Cm z
+.It Cm u
+.It Cm e
+.It Cm t
+.It Cm d
+.It Cm f
+Must be followed by a case-insensitive font style:
+.Cm b
+for bold or
+.Cm i
+for italic.
+.It Cm b
+.It Cm i
+.El
 .Sh COMPATIBILITY
 This section documents compatibility between mandoc and other other
 .Nm
Index: tbl_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tbl_term.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Ltbl_term.c -Ltbl_term.c -u -p -r1.5 -r1.6
--- tbl_term.c
+++ tbl_term.c
@@ -274,6 +274,7 @@ tbl_data(struct termp *tp, const struct 
 	case (TBL_CELL_HORIZ):
 		/* FALLTHROUGH */
 	case (TBL_CELL_DHORIZ):
+		/* FIXME: THIS IS WRONG. */
 		tbl_data_spanner(tp, dp, tbp);
 		break;
 	case (TBL_CELL_LONG):
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-03 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-03 16:04 mdocml: Switch on the `TS' documentation in roff.7 kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).