1 .\" $Id: man.7,v 1.16 2009/06/25 10:48:21 kristaps Exp $
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: June 25 2009 $
23 .Nd man language reference
28 language was historically used to format
30 manuals. This reference document describes the syntax and structure of
36 to write your manuals. Use the
43 document follows simple rules: lines beginning with the control
46 are parsed for macros. Other lines are interpreted within the scope of
48 .Bd -literal -offset indent
49 \&.SH Macro lines change control state.
50 Other lines are interpreted within the current state.
55 documents may contain only graphable 7-bit ASCII characters, the
65 Blank lines are acceptable; where found, the output will assert a
70 escape is common in historical
72 documents; if encountered at the end of a word, it ensures that the
73 subsequent word isn't off-set by whitespace.
78 delimiter is considered a comment (unless the
80 itself has been escaped) and is ignored to the end of line.
81 Furthermore, a macro line with only a control character
83 optionally followed by whitespace, is ignored.
85 .Ss Special Characters
86 Special character sequences begin with the escape character
88 followed by either an open-parenthesis
90 for two-character sequences; an open-bracket
92 for n-character sequences (terminated at a close-bracket
94 or a single one-character sequence.
96 Characters may alternatively be escaped by a slash-asterisk,
98 with the same combinations as described above. This form is deprecated.
103 document must contain contains at least the
105 macro describing the document's section and title. It may occur
106 anywhere in the document, although conventionally, it appears as the
111 at least one macro or text node must appear in the document.
114 Macros are one to three three characters in length and begin with a
117 at the beginning of the line. An arbitrary amount of whitespace may
118 sit between the control character and the macro name. Thus,
126 macros follow the same structural rules:
127 .Bd -literal -offset indent
128 \&.YO \(lBbody...\(rB
133 consists of zero or more arguments to the macro.
136 has a primitive notion of multi-line scope for the following macros:
150 When these macros are invoked without arguments, the subsequent line is
151 considered a continuation of the macro. Thus:
152 .Bd -literal -offset indent
159 If two consecutive lines exhibit the latter behaviour,
160 an error is raised. Thus, the following is not acceptable:
161 .Bd -literal -offset indent
169 macro is similar, but does not need an empty argument line to trigger
173 This section contains a complete list of all
175 macros and corresponding number of arguments.
177 .Bl -column "MacroX" "Arguments" -compact -offset indent
178 .It Em Macro Ta Em Arguments
201 Although not historically part of the
203 system, the following macros are also supported:
205 .Bl -column "MacroX" "Arguments" -compact -offset indent
206 .It Em Macro Ta Em Arguments
211 These follow the same calling conventions as the above
222 utility was written by
223 .An Kristaps Dzonsons Aq kristaps@kth.se .
226 Do not use this language. Use