1 .\" $Id: man.7,v 1.13 2009/06/16 19:13: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 16 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 and the
63 Blank lines are acceptable; where found, the output will assert a
68 escape is common in historical
70 documents; if encountered at the end of a word, it ensures that the
71 subsequent word isn't off-set by whitespace.
76 delimiter is considered a comment (unless the
78 itself has been escaped) and is ignored to the end of line.
79 Furthermore, a macro line with only a control character
81 optionally followed by whitespace, is ignored.
83 .Ss Special Characters
84 Special character sequences begin with the escape character
86 followed by either an open-parenthesis
88 for two-character sequences; an open-bracket
90 for n-character sequences (terminated at a close-bracket
92 or a single one-character sequence.
94 Characters may alternatively be escaped by a slash-asterisk,
96 with the same combinations as described above. This form is deprecated.
99 Macros are one to three three characters in length and begin with a
102 at the beginning of the line. An arbitrary amount of whitespace may
103 sit between the control character and the macro name. Thus,
111 macros follow the same structural rules:
112 .Bd -literal -offset indent
113 \&.YO \(lBbody...\(rB
118 consists of zero or more arguments to the macro.
121 has a primitive notion of multi-line scope for the following macros:
135 When these macros are invoked without arguments, the subsequent line is
136 considered a continuation of the macro. Thus:
137 .Bd -literal -offset indent
144 If two consecutive lines exhibit the latter behaviour,
145 an error is raised. Thus, the following is not acceptable:
146 .Bd -literal -offset indent
154 macro is similar, but does not need an empty argument line to trigger
158 This section contains a complete list of all
160 macros and corresponding number of arguments.
162 .Bl -column "MacroX" "Arguments" -compact -offset indent
163 .It Em Macro Ta Em Arguments
186 Although not historically part of the
188 system, the following macros are also supported:
190 .Bl -column "MacroX" "Arguments" -compact -offset indent
191 .It Em Macro Ta Em Arguments
196 These follow the same calling conventions as the above
207 utility was written by
208 .An Kristaps Dzonsons Aq kristaps@kth.se .
211 Do not use this language. Use