summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2009-08-22 16:41:46 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2009-08-22 16:41:46 +0000
commitc6bf3e32b0bcdc58a102cbd42b60a45734b5f9fe (patch)
tree3631336062de671af047f66703a8ffe004918a73
parente61c081b721f2875bc39b6b22ddbc4c07cc7caa7 (diff)
sync to 1.8.5: clean up sections describing escape sequences
-rw-r--r--usr.bin/mandoc/man.745
-rw-r--r--usr.bin/mandoc/mdoc.765
2 files changed, 59 insertions, 51 deletions
diff --git a/usr.bin/mandoc/man.7 b/usr.bin/mandoc/man.7
index 7715884b355..49a49b0236f 100644
--- a/usr.bin/mandoc/man.7
+++ b/usr.bin/mandoc/man.7
@@ -1,4 +1,4 @@
-.\" $Id: man.7,v 1.7 2009/08/09 17:20:17 schwarze Exp $
+.\" $Id: man.7,v 1.8 2009/08/22 16:41:45 schwarze Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -14,7 +14,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 9 2009 $
+.Dd $Mdocdate: August 22 2009 $
.Dt MAN 7
.Os
.\" SECTION
@@ -70,17 +70,16 @@ documents; if encountered at the end of a word, it ensures that the
subsequent word isn't off-set by whitespace.
.\" SUB-SECTION
.Ss Comments
-Anything following a
-.Sq \e"
-delimiter is considered a comment (unless the
-.Sq \e
-itself has been escaped) and is ignored to the end of line.
-Furthermore, a macro line with only a control character
-.Sq \. ,
-optionally followed by whitespace, is ignored.
+Text following a
+.Sq \e" ,
+whether in a macro or free-form text line, is ignored to the end of
+line. A macro line with only a control character and comment escape,
+.Sq \&.\e" ,
+is also ignored.
.\" SUB-SECTION
.Ss Special Characters
-Special character sequences begin with the escape character
+Special characters may occur in both macro and free-form lines.
+Sequences begin with the escape character
.Sq \e
followed by either an open-parenthesis
.Sq \&(
@@ -88,17 +87,21 @@ for two-character sequences; an open-bracket
.Sq \&[
for n-character sequences (terminated at a close-bracket
.Sq \&] ) ;
-or a single one-character sequence.
-.Pp
-Characters may alternatively be escaped by a slash-asterisk,
-.Sq \e* ,
-with the same combinations as described above.
-.Pp
-Terms may also be text-decorated using the
+or a single one-character sequence. See
+.Xr mandoc_char 7
+for a complete list. Examples include
+.Sq \e(em
+.Pq em-dash
+and
+.Sq \ee
+.Pq back-slash .
+.\" SUB-SECTION----------------------
+.Ss Text Decoration
+Terms may be text-decorated using the
.Sq \ef
-escape followed by a text-decoration letter: B (bold), I, (italic), or P
-and R (Roman, or reset).
-.\" SUB-SECTION
+escape followed by an indicator: B (bold), I, (italic), or P and R
+(Roman, or reset).
+.\" SUB-SECTION----------------------
.Ss Whitespace
Unless specifically escaped, consecutive blocks of whitespace are pruned
from input. These are later re-added, if applicable, by a front-end
diff --git a/usr.bin/mandoc/mdoc.7 b/usr.bin/mandoc/mdoc.7
index f95138be959..e57da0dd54f 100644
--- a/usr.bin/mandoc/mdoc.7
+++ b/usr.bin/mandoc/mdoc.7
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.7,v 1.12 2009/08/22 15:44:02 schwarze Exp $
+.\" $Id: mdoc.7,v 1.13 2009/08/22 16:41:45 schwarze Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -111,26 +111,46 @@ for two-character sequences; an open-bracket
for n-character sequences (terminated at a close-bracket
.Sq \&] ) ;
or a single one-character sequence. See
-.Xr mandoc_char 1
+.Xr mandoc_char 7
for a complete list. Examples include
.Sq \e(em
.Pq em-dash
and
.Sq \ee
.Pq back-slash .
-.\" PARAGRAPH------------
-.Pp
-An alternative escape sequence is
-the slash-asterisk,
-.Sq \e* ,
-but this method is discouraged for compatibility reasons.
-.\" PARAGRAPH------------
-.Pp
-Terms may
-also be text-decorated using the
+.\" SUB-SECTION----------------------
+.Ss Text Decoration
+Terms may be text-decorated using the
.Sq \ef
escape followed by an indicator: B (bold), I, (italic), or P and R
-(Roman, or reset). This form is not recommended.
+(Roman, or reset). This form is not recommended for
+.Nm ,
+which encourages semantic, not presentation, annotation.
+.\" SUB-SECTION----------------------
+.Ss Predefined Strings
+Historically,
+.Xr groff 1
+also defined a set of package-specific
+.Dq predefined strings ,
+which, like
+.Sx Special Characters ,
+demark special output characters and strings by way of input codes.
+Predefined strings are escaped with the slash-asterisk,
+.Sq \e* :
+single-character
+.Sq \e*X ,
+two-character
+.Sq \e*(XX ,
+and N-character
+.Sq \e*[N] .
+See
+.Xr mandoc_char 7
+for a complete list. Examples include
+.Sq \e*(Am
+.Pq ampersand
+and
+.Sq \e*(Ba
+.Pq vertical bar .
.\" SUB-SECTION----------------------
.Ss Whitespace
In non-literal free-form lines, consecutive blocks of whitespace are
@@ -484,15 +504,6 @@ The
macro does not accept negative numbers.
.\" LIST-ITEM
.It
-Some character sequences in groff are not handled depending on escape
-style, e.g.,
-.Sq \e(ba
-and
-.Sq \e*(Ba
-may not be interchanged. This is no longer the case: all character
-sequences resolve to the same symbol, regardless the escape style.
-.\" LIST-ITEM
-.It
Blocks of whitespace are stripped from both macro and free-form text
lines (except when in literal mode), while groff would retain whitespace
in free-form text lines.
@@ -533,12 +544,6 @@ incorrectly by following it with a reserved character and expecting the
delimiter to render. This is not supported.
.\" LIST-ITEM
.It
-If an special-character control character is escaped
-.Sq \e\e ,
-it will obviously not render the subsequent sequence. Even newer
-versions of groff seem to dither on this.
-.\" LIST-ITEM
-.It
In groff, the
.Sq \&Fo
macro only produces the first parameter. This is no longer the case.
@@ -623,7 +628,7 @@ There's no way to refer to references in
blocks.
.\" LIST-ITEM
.It
-The \-split and \-nosplit arguments to
+The \-split and \-nosplit dictates via
.Sq \&An
-are inane.
+are re-set when entering and leaving the AUTHORS section.
.El