summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJared Yanovich <jaredy@cvs.openbsd.org>2005-09-27 18:57:18 +0000
committerJared Yanovich <jaredy@cvs.openbsd.org>2005-09-27 18:57:18 +0000
commit781a8549c91f3a866d4fd39207cebde05258ba2a (patch)
tree30680fe51ec091bd7ffd6013126bcf682e9927b3 /share
parentc7cc9c745cb8dec915a0b3e546662a269fcc79a6 (diff)
Allow `.An' to be given a -split/-nosplit flag to toggle the behavior of
causing line breaks to occur, as is present in newer versions of groff. OK deraadt@, jmc@.
Diffstat (limited to 'share')
-rw-r--r--share/man/man7/mdoc.samples.724
-rw-r--r--share/tmac/mdoc/doc17
2 files changed, 34 insertions, 7 deletions
diff --git a/share/man/man7/mdoc.samples.7 b/share/man/man7/mdoc.samples.7
index dfd09f23317..dc1cfa61c49 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.64 2005/06/05 19:40:22 jmc Exp $
+.\" $OpenBSD: mdoc.samples.7,v 1.65 2005/09/27 18:57:17 jaredy Exp $
.\" $NetBSD: mdoc.samples.7,v 1.5 1996/04/03 20:17:34 jtc Exp $
.\"
.\" Copyright (c) 1990, 1993
@@ -969,7 +969,7 @@ The
macro is used to specify the name of the author of the utility,
or the name of the author of the man page.
.Pp
-.Dl Usage: .An author ... \*(Pu
+.Dl Usage: .An -nosplit \*(Ba -split \*(Ba author ... \*(Pu
.Pp
.Bl -tag -width ".An John Smith ) ) ," -offset indent -compact
.It Li "\&.An John Smith"
@@ -980,6 +980,26 @@ or the name of the author of the man page.
.An John Smith Aq john@email.address
.El
.Pp
+By default,
+.Ql \&.An
+causes a line break to occur before the author name.
+The arguments
+.Fl nosplit
+and
+.Fl split
+can be used to toggle this behavior.
+For example:
+.Bd -literal -offset indent
+\&.Sh AUTHORS
+\&.An -nosplit
+The
+\&.Nm
+utility was written by
+\&.An John Smith Aq john@email.address
+and
+\&.An Jane Doe Aq jane@email.address .
+.Ed
+.Pp
The
.Ql \&.An
macro is parsed, but is not callable.
diff --git a/share/tmac/mdoc/doc b/share/tmac/mdoc/doc
index 3873ead45a9..a367253e7f4 100644
--- a/share/tmac/mdoc/doc
+++ b/share/tmac/mdoc/doc
@@ -1,4 +1,4 @@
-.\" $OpenBSD: doc,v 1.15 2004/06/06 22:38:09 jmc Exp $
+.\" $OpenBSD: doc,v 1.16 2005/09/27 18:57:17 jaredy Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -3456,20 +3456,27 @@ File:
.\" NS An macro - author name
.\" NS aN register
.nr aN 0
+.nr aS 1
.de An
.if \\n(nY==1 \{\
. ie \\n(aN==1 \{\
-. br
+. if \\n(aS==1 .br
. \}
. el \{\
. nr aN 1
. \}
.\}
.if \\n(aC==0 \{\
-. ie \\n(.$==0 .tm Usage: .An author_name ... \\*(Pu (#\\n(.c)
+. ie \\n(.$==0 .tm Usage: .An -nosplit | -split | author_name ... \\*(Pu (#\\n(.c)
. el \{\
-. ds mN An
-. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+. ie "\\$1"-nosplit" .nr aS 0
+. el \{\
+. ie "\\$1"-split" .nr aS 1
+. el \{\
+. ds mN An
+. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+. \}
+. \}
. \}
.\}
.if \\n(aC>\\n(aP \{\