1 .\" $Id: man.7,v 1.17 2009/06/25 11:35:28 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.
101 Unless specifically escaped, consecutive blocks of whitespace are pruned
102 from input. These are later re-added, if applicable, by a front-end
109 document must contain contains at least the
111 macro describing the document's section and title. It may occur
112 anywhere in the document, although conventionally, it appears as the
117 at least one macro or text node must appear in the document.
120 Macros are one to three three characters in length and begin with a
123 at the beginning of the line. An arbitrary amount of whitespace may
124 sit between the control character and the macro name. Thus,
132 macros follow the same structural rules:
133 .Bd -literal -offset indent
134 \&.YO \(lBbody...\(rB
139 consists of zero or more arguments to the macro.
142 has a primitive notion of multi-line scope for the following macros:
156 When these macros are invoked without arguments, the subsequent line is
157 considered a continuation of the macro. Thus:
158 .Bd -literal -offset indent
165 If two consecutive lines exhibit the latter behaviour,
166 an error is raised. Thus, the following is not acceptable:
167 .Bd -literal -offset indent
175 macro is similar, but does not need an empty argument line to trigger
179 This section contains a complete list of all
181 macros and corresponding number of arguments.
183 .Bl -column "MacroX" "Arguments" -compact -offset indent
184 .It Em Macro Ta Em Arguments
207 Although not historically part of the
209 system, the following macros are also supported:
211 .Bl -column "MacroX" "Arguments" -compact -offset indent
212 .It Em Macro Ta Em Arguments
217 These follow the same calling conventions as the above
228 utility was written by
229 .An Kristaps Dzonsons Aq kristaps@kth.se .
232 Do not use this language. Use