=================================================================== RCS file: /cvs/mandoc/mandoc.1,v retrieving revision 1.156 retrieving revision 1.163 diff -u -p -r1.156 -r1.163 --- mandoc/mandoc.1 2015/03/27 16:36:31 1.156 +++ mandoc/mandoc.1 2015/10/30 19:04:16 1.163 @@ -1,4 +1,4 @@ -.\" $Id: mandoc.1,v 1.156 2015/03/27 16:36:31 schwarze Exp $ +.\" $Id: mandoc.1,v 1.163 2015/10/30 19:04:16 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2012, 2014, 2015 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 27 2015 $ +.Dd $Mdocdate: October 30 2015 $ .Dt MANDOC 1 .Os .Sh NAME @@ -284,6 +284,8 @@ See .Sx PostScript Output . .It Fl T Cm tree Produce an indented parse tree. +See +.Sx Syntax tree output . .It Fl T Cm utf8 Encode output in the UTF\-8 multi-byte format. See @@ -490,6 +492,45 @@ to force a UTF\-8 locale. See .Sx Locale Output for details and options. +.Ss Syntax tree output +Use +.Fl T Cm tree +to show a human readable representation of the syntax tree. +It is useful for debugging the source code of manual pages. +The exact format is subject to change, so don't write parsers for it. +Each output line shows one syntax tree node. +Child nodes are indented with respect to their parent node. +The columns are: +.Pp +.Bl -enum -compact +.It +For macro nodes, the macro name; for text and +.Xr tbl 7 +nodes, the content. +There is a special format for +.Xr eqn 7 +nodes. +.It +Node type (text, elem, block, head, body, body-end, tail, tbl, eqn). +.It +Flags: +.Bl -dash -compact +.It +An opening parenthesis if the node is an opening delimiter. +.It +An asterisk if the node starts a new input line. +.It +The input line number (starting at one). +.It +A colon. +.It +The input column number (starting at one). +.It +A closing parenthesis if the node is a closing delimiter. +.It +A full stop if the node ends a sentence. +.El +.El .Sh ENVIRONMENT .Bl -tag -width MANPAGER .It Ev MANPAGER @@ -502,7 +543,8 @@ Specifies the pagination program to use when .Ev MANPAGER is not defined. If neither PAGER nor MANPAGER is defined, -.Pa /usr/bin/more Fl s +.Xr more 1 +.Fl s will be used. .El .Sh EXIT STATUS @@ -566,7 +608,7 @@ as the style-sheet: .Pp To check over a large set of manuals: .Pp -.Dl $ mandoc \-T lint `find /usr/src -name \e*\e.[1-9]` +.Dl $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga .Pp To produce a series of PostScript manuals for A4 paper: .Pp @@ -813,7 +855,7 @@ In the SEE ALSO section, an macro with a lower section number follows one with a higher number, or two .Ic \&Xr -macros refering to the same section are out of alphabetical order. +macros referring to the same section are out of alphabetical order. .It Sy "unusual Xr punctuation" .Pq mdoc In the SEE ALSO section, punctuation between two @@ -933,13 +975,6 @@ list block contains text or macros before the first .Ic \&It macro. The offending children are moved before the beginning of the list. -.It Sy ".Vt block has child macro" -.Pq mdoc -The -.Ic \&Vt -macro supports plain text arguments only. -Formatting may be ugly and semantic searching -for the affected content might not work. .It Sy "fill mode already enabled, skipping" .Pq man A @@ -1565,6 +1600,13 @@ By requesting the inclusion of a sensitive file, a mal might otherwise trick a privileged user into inadvertently displaying the file on the screen, revealing the file content to bystanders. The argument is ignored including the file name following it. +.It Sy "skipping display without arguments" +.Pq mdoc +A +.Ic \&Bd +block macro does not have any arguments. +The block is discarded, and the block content is displayed in +whatever mode was active before the block. .It Sy "missing list type, using -item" .Pq mdoc A