summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2007-05-31 22:10:20 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2007-05-31 22:10:20 +0000
commit1acac5c0eb9c0de374aec9b4c221c7d01c640b13 (patch)
treebc08470c2ded7a4c7b823ab0521fea638b56a686
parent46b68fc381c10b39c055d8b72c0d669bb8f3a371 (diff)
document new .Dd format;
-rw-r--r--share/man/man7/mdoc.77
-rw-r--r--share/man/man7/mdoc.samples.717
-rw-r--r--share/misc/mdoc.template6
3 files changed, 20 insertions, 10 deletions
diff --git a/share/man/man7/mdoc.7 b/share/man/man7/mdoc.7
index ef895424763..c75367f1201 100644
--- a/share/man/man7/mdoc.7
+++ b/share/man/man7/mdoc.7
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mdoc.7,v 1.38 2007/05/31 19:19:58 jmc Exp $
+.\" $OpenBSD: mdoc.7,v 1.39 2007/05/31 22:10:19 jmc Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -68,8 +68,9 @@ formatting packages.
To create a valid manual page, these three macros, in this order,
are required:
.Bl -tag -width "xxxx.Os OPERATINGxSYSTEM [version/release]" -compact
-.It Li "\&.Dd " Ar "Month day, year"
-Document date.
+.Pp
+.It Li "\&.Dd $\&Mdocdate$"
+Expands to document date.
.It Li "\&.Dt " Ar "DOCUMENT_TITLE [section] [volume]"
Title, in upper case.
.It Li "\&.Os " Ar "OPERATING_SYSTEM [version/release]"
diff --git a/share/man/man7/mdoc.samples.7 b/share/man/man7/mdoc.samples.7
index 86e3f9b0383..804db1876fa 100644
--- a/share/man/man7/mdoc.samples.7
+++ b/share/man/man7/mdoc.samples.7
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mdoc.samples.7,v 1.73 2007/05/31 19:19:58 jmc Exp $
+.\" $OpenBSD: mdoc.samples.7,v 1.74 2007/05/31 22:10:19 jmc Exp $
.\" $NetBSD: mdoc.samples.7,v 1.5 1996/04/03 20:17:34 jtc Exp $
.\"
.\" Copyright (c) 1990, 1993
@@ -507,7 +507,7 @@ template found in the file
.Pa /usr/share/misc/mdoc.template .
.Bd -literal -offset indent
\&.\e" The following requests are required for all man pages.
-\&.Dd Month DD, YYYY
+\&.Dd $\&Mdocdate$
\&.Dt NAME SECTION#
\&.Os
\&.Sh NAME
@@ -582,14 +582,21 @@ domain, but are presented first and separate for someone who
wishes to start writing a man page yesterday.
Three header macros designate the document title or manual page title,
the operating system,
-and the date of authorship.
+and the date of document change (or creation).
These macros are called once at the very beginning of the document
and are used to construct the headers and footers only.
.Bl -tag -width 6n
-.It Li \&.Dd month day, year
+.It Li \&.Dd $\&Mdocdate$
+The literal string
+.Dq $\&Mdocdate$ ,
+which is expanded by
+.Xr cvs 1
+to the date a document is committed to a source repository.
+.Pp
+Alternatively the date may be written by hand.
The date should be written formally:
.Pp
-.Dl January 25, 1989
+.Dl \&.Dd January 25, 1989
.It Li \&.Dt DOCUMENT_TITLE section# [volume]
The document title is the
subject of the man page and must be in
diff --git a/share/misc/mdoc.template b/share/misc/mdoc.template
index fb54ac66e26..05abf74ebc9 100644
--- a/share/misc/mdoc.template
+++ b/share/misc/mdoc.template
@@ -1,7 +1,9 @@
-.\" $OpenBSD: mdoc.template,v 1.9 2004/07/02 10:36:57 jmc Exp $
+.\" $OpenBSD: mdoc.template,v 1.10 2007/05/31 22:10:19 jmc Exp $
.\"
.\" The following requests are required for all man pages.
-.Dd Month DD, YYYY
+.\"
+.\" Remove `\&' from the line below.
+.Dd $\&Mdocdate$
.Dt NAME SECTION#
.Os
.Sh NAME