From c30903de74e443fffffd9d160ef6911d2d434468 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 6 Mar 2017 17:26:04 +0000 Subject: Using .Nd only makes sense in the NAME section. Warn if that macro occurs elsewhere. Triggered by a question from Dag-Erling Smoergrav . --- mandoc.1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mandoc.1') diff --git a/mandoc.1 b/mandoc.1 index c5f38c2b..275540ee 100644 --- a/mandoc.1 +++ b/mandoc.1 @@ -1,4 +1,4 @@ -.\" $Id: mandoc.1,v 1.176 2017/03/04 17:17:34 schwarze Exp $ +.\" $Id: mandoc.1,v 1.177 2017/03/06 17:26:04 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2012, 2014-2017 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 4 2017 $ +.Dd $Mdocdate: March 6 2017 $ .Dt MANDOC 1 .Os .Sh NAME @@ -908,6 +908,14 @@ The .Ic \&Nd macro lacks the required argument. The title line of the manual will end after the dash. +.It Sy "description line outside NAME section" +.Pq mdoc +An +.Ic \&Nd +macro appears outside the NAME section. +The arguments are printed anyway and the following text is used for +.Xr apropos 1 , +but none of that behaviour is portable. .It Sy "sections out of conventional order" .Pq mdoc A standard section occurs after another section it usually precedes. -- cgit v1.2.3