summaryrefslogtreecommitdiffstats
path: root/mdoc.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-12-28 17:34:18 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-12-28 17:34:18 +0000
commitd7c46d2d16226010fc23d4fc28e1515a70a52ed3 (patch)
treedaef3e4a96ce67b1d9d64938fca56436df268077 /mdoc.7
parente3f5b4421b6d2e53c29f596fe31bbca8f1b4ca0c (diff)
downloadmandoc-d7c46d2d16226010fc23d4fc28e1515a70a52ed3.tar.gz
Make the second, section number argument of .Xr mandatory.
In fact, we have been requiring it for many years. The only reason to not warn when it was missing was excessive traditionalism - it was optional in 4.4BSD.
Diffstat (limited to 'mdoc.7')
-rw-r--r--mdoc.77
1 files changed, 3 insertions, 4 deletions
diff --git a/mdoc.7 b/mdoc.7
index bf5d9afd..a283254d 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -2714,14 +2714,13 @@ Link to another manual
.Pq Qq cross-reference .
Its syntax is as follows:
.Pp
-.D1 Pf \. Sx \&Xr Ar name Op section
+.D1 Pf \. Sx \&Xr Ar name section
.Pp
Cross reference the
.Ar name
and
.Ar section
-number of another man page;
-omitting the section number is rarely useful.
+number of another man page.
.Pp
Examples:
.Dl \&.Xr mandoc 1
@@ -3033,7 +3032,7 @@ then the macro accepts an arbitrary number of arguments.
.It Sx \&Ux Ta Yes Ta Yes Ta n
.It Sx \&Va Ta Yes Ta Yes Ta n
.It Sx \&Vt Ta Yes Ta Yes Ta >0
-.It Sx \&Xr Ta Yes Ta Yes Ta >0
+.It Sx \&Xr Ta Yes Ta Yes Ta 2
.It Sx \&br Ta \&No Ta \&No Ta 0
.It Sx \&sp Ta \&No Ta \&No Ta 1
.El