diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-26 18:42:30 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-26 18:42:30 +0000 |
commit | fb1f845c9ebafe8648f3df58f8a4581041ff067e (patch) | |
tree | 07765bfe61b2b3ed91ec2f3e112706b0a88c6a8b /mandoc.1 | |
parent | ba5583393dfa12234c2752e45824ac58a3851700 (diff) | |
download | mandoc-fb1f845c9ebafe8648f3df58f8a4581041ff067e.tar.gz |
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.1 | 42 |
1 files changed, 40 insertions, 2 deletions
@@ -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 |