=================================================================== RCS file: /cvs/mandoc/mandoc.1,v retrieving revision 1.106 retrieving revision 1.116 diff -u -p -r1.106 -r1.116 --- mandoc/mandoc.1 2014/08/08 01:50:59 1.106 +++ mandoc/mandoc.1 2014/10/10 08:44:24 1.116 @@ -1,4 +1,4 @@ -.\" $Id: mandoc.1,v 1.106 2014/08/08 01:50:59 schwarze Exp $ +.\" $Id: mandoc.1,v 1.116 2014/10/10 08:44:24 kristaps Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2012, 2014 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: August 8 2014 $ +.Dd $Mdocdate: October 10 2014 $ .Dt MANDOC 1 .Os .Sh NAME @@ -23,7 +23,7 @@ .Nd format and display UNIX manuals .Sh SYNOPSIS .Nm mandoc -.Op Fl V +.Op Fl acfhklV .Sm off .Op Fl I Cm os Li = Ar name .Sm on @@ -51,8 +51,31 @@ and produces .Fl T Ns Cm ascii output. .Pp -The arguments are as follows: +The options are as follows: .Bl -tag -width Ds +.It Fl a +If the standard output is a terminal device and +.Fl c +is not specified, use +.Xr more 1 +to paginate the output, just like +.Xr man 1 +would. +.It Fl c +Copy the formatted manual pages to the standard output without using +.Xr more 1 +to paginate them. +This is the default. +It can be specified to override +.Fl a . +.It Fl f +A synonym for +.Xr whatis 1 . +This overrides any earlier +.Fl k +and +.Fl l +options. .Sm off .It Fl I Cm os Li = Ar name .Sm on @@ -62,6 +85,26 @@ for the .Xr mdoc 7 .Sq \&Os macro. +.It Fl h +Display only the SYNOPSIS lines. +Implies +.Fl a . +.It Fl k +A synonym for +.Xr apropos 1 . +This overrides any earlier +.Fl f +and +.Fl l +options. +.It Fl l +A synonym for +.Fl a . +Also reverts any earlier +.Fl f +and +.Fl k +options. .It Fl m Ns Ar format Input format. See @@ -122,6 +165,18 @@ If multiple files are specified, .Nm will halt with the first failed parse. .El +.Pp +In +.Fl f +and +.Fl k +mode, +.Nm +also supports the options +.Fl CMmOSsw +described in the +.Xr apropos 1 +manual. .Ss Input Formats The .Nm @@ -178,7 +233,7 @@ This is the default. See .Sx ASCII Output . .It Fl T Ns Cm html -Produce strict CSS1/HTML-4.01 output. +Produce HTML5, CSS1, and MathML output. See .Sx HTML Output . .It Fl T Ns Cm lint @@ -210,9 +265,8 @@ Encode output in the UTF\-8 multi-byte format. See .Sx UTF\-8 Output . .It Fl T Ns Cm xhtml -Produce strict CSS1/XHTML-1.0 output. -See -.Sx XHTML Output . +This is a synonym for +.Fl T Ns Cm html . .El .Pp If multiple input files are specified, these will be processed by the @@ -265,7 +319,11 @@ which will normalise to \(>=60. .Ss HTML Output Output produced by .Fl T Ns Cm html -conforms to HTML-4.01 strict. +conforms to HTML5 using optional self-closing tags. +Default styles use only CSS1. +Equations rendered from +.Xr eqn 7 +blocks use MathML. .Pp The .Pa example.style.css @@ -273,7 +331,8 @@ file documents style-sheet classes available for custo If a style-sheet is not specified with .Fl O Ns Ar style , .Fl T Ns Cm html -defaults to simple output readable in any graphical or text-based web +defaults to simple output (via an embedded style-sheet) +readable in any graphical or text-based web browser. .Pp Special characters are rendered in decimal-encoded UTF\-8. @@ -416,15 +475,21 @@ to force a UTF\-8 locale. See .Sx Locale Output for details and options. -.Ss XHTML Output -Output produced by -.Fl T Ns Cm xhtml -conforms to XHTML-1.0 strict. -.Pp -See -.Sx HTML Output -for details; beyond generating XHTML tags instead of HTML tags, these -output modes are identical. +.Sh ENVIRONMENT +.Bl -tag -width MANPAGER +.It Ev MANPAGER +Any non-empty value of the environment variable +.Ev MANPAGER +will be used instead of the standard pagination program, +.Xr more 1 . +.It Ev PAGER +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 +will be used. +.El .Sh EXIT STATUS The .Nm @@ -696,6 +761,28 @@ The same standard section title occurs more than once. .Pq mdoc A standard section header occurs in a section of the manual where it normally isn't useful. +.It Sy "unusual Xr order" +.Pq mdoc +In the SEE ALSO section, an +.Ic \&Xr +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. +.It Sy "unusual Xr punctuation" +.Pq mdoc +In the SEE ALSO section, punctuation between two +.Ic \&Xr +macros differs from a single comma, or there is trailing punctuation +after the last +.Ic \&Xr +macro. +.It Sy "AUTHORS section without An macro" +.Pq mdoc +An AUTHORS sections contains no +.Ic \&An +macros, or only empty ones. +Probably, there are author names lacking markup. .El .Ss "Warnings related to macros and nesting" .Bl -ohang @@ -1026,6 +1113,13 @@ macro has an invalid argument. It is used verbatim, with .Qq "AT&T UNIX " prefixed to it. +.It Sy "comma in function argument" +.Pq mdoc +An argument of an +.Ic \&Fa +or +.Ic \&Fn +macro contains a comma; it should probably be split into two arguments. .It Sy "invalid content in Rs block" .Pq mdoc An @@ -1044,11 +1138,16 @@ or The invalid argument is moved out of the macro, which leaves the macro empty, causing it to toggle the spacing mode. .It Sy "unknown font, skipping request" -.Pq man +.Pq man , tbl A .Xr roff 7 .Ic \&ft -request has an invalid argument. +request or a +.Xr tbl 7 +.Ic \&f +layout modifier has an unknown +.Ar font +argument. .El .Ss "Warnings related to plain text" .Bl -ohang @@ -1430,7 +1529,7 @@ has no effect. .It Words aren't hyphenated. .El -.Ss HTML/XHTML Compatibility +.Ss HTML Compatibility .Bl -bullet -compact .It The