aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-26 18:42:30 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-26 18:42:30 +0000
commitb0aec68c2e236344e79a7ee4949b2e5c450d13f8 (patch)
treec443152b9cc28944522ddf2bc3103f1346ef178d /mandoc.1
parente4a7a2efc2737e64ac0cf42b148f06566718c1d7 (diff)
downloadmandoc-b0aec68c2e236344e79a7ee4949b2e5c450d13f8.tar.gz
mandoc-b0aec68c2e236344e79a7ee4949b2e5c450d13f8.tar.zst
mandoc-b0aec68c2e236344e79a7ee4949b2e5c450d13f8.zip
Rework tbl(7) layout parsing:
* Continue parsing even if part of the input is invalid. * Do not require whitespace between cell specifications. * Allow tabs as well as blanks between modifiers. * Mark the 'm' modifier as unsupported. * Parse and ignore the 'p' and 'v' modifiers. * Better warning and error messages. * Get rid of a static buffer. Improved functionality but minus 50 lines of code.
Diffstat (limited to 'mandoc.1')
-rw-r--r--mandoc.144
1 files changed, 41 insertions, 3 deletions
diff --git a/mandoc.1 b/mandoc.1
index 736b2ae7..82c2d720 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.137 2015/01/26 13:03:48 schwarze Exp $
+.\" $Id: mandoc.1,v 1.138 2015/01/26 18:42:30 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -1273,6 +1273,24 @@ its value is implicitly set to the empty string.
However, defining strings explicitly before use
keeps the code more readable.
.El
+.Ss "Warnings related to tables"
+.Bl -ohang
+.It Sy "tbl line starts with span"
+.Pq tbl
+The first cell in a table layout line is a horizontal span
+.Pq Sq Cm s .
+Data provided for this cell is ignored, and nothing is printed in the cell.
+.It Sy "tbl column starts with span"
+.Pq tbl
+The first line of a table layout specification
+requests a vertical span
+.Pq Sq Cm ^ .
+Data provided for this cell is ignored, and nothing is printed in the cell.
+.It Sy "skipping vertical bar in tbl layout"
+.Pq tbl
+A table layout specification contains more than two consecutive vertical bars.
+A double bar is printed, all additional bars are discarded.
+.El
.Ss "Errors related to equations"
.Bl -inset -compact
.It "unexpected equation scope closure"
@@ -1302,10 +1320,25 @@ The option is ignored.
.Pq tbl
A table option argument contains an invalid number of characters.
Both the option and the argument are ignored.
+.It Sy "empty tbl layout"
+.Pq tbl
+A table layout specification is completely empty,
+specifying zero lines and zero columns.
+As a fallback, a single left-justified column is used.
+.It Sy "invalid character in tbl layout"
+.Pq tbl
+A table layout specification contains a character that can neither
+be interpreted as a layout key character nor as a layout modifier,
+or a modifier precedes the first key.
+The invalid character is discarded.
+.It Sy "unmatched parenthesis in tbl layout"
+.Pq tbl
+A table layout specification contains an opening parenthesis,
+but no matching closing parenthesis.
+The rest of the input line, starting from the parenthesis, has no effect.
.El
.Pp
.Bl -inset -compact
-.It Sy "no table layout cells specified"
.It Sy "no table data cells specified"
.It Sy "ignore data in cell"
.It Sy "data block still open"
@@ -1607,7 +1640,12 @@ request supported by GNU troff or Heirloom troff but not by
.Nm ,
and it is likely that this will cause information loss
or considerable misformatting.
-.It Sy "unsupported table layout"
+.It Sy "unsupported table layout modfier"
+.Pq tbl
+A table layout specification contains an
+.Sq Cm m
+modifier.
+The modifier is discarded.
.It Sy "ignoring macro in table"
.It Sy "eqn in tbl"
.Pq eqn , tbl