2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 .\" Copyright (c) 2018-2019 Mateusz Piotrowski <0mp@FreeBSD.org>
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 This file specifies the preferred style for manual pages in the
45 Use literal formatting for examples and literal shell commands, e.g.:
46 .Bd -literal -offset indent
48 \&.Dq Li make install clean .
52 .Bd -filled -offset indent
54 .Dq Li make install clean .
57 The incorrect way would be to use macros like
59 to stylize the command invocation:
60 .Bd -literal -offset indent
62 \&.Dq Nm make Cm install Cm clean .
66 .Bd -filled -offset indent
68 .Dq Nm make Cm install Cm clean .
76 section in the following way:
77 .Bd -literal -offset indent
79 \&.It Sy Example 1\\&: No Doing Something
81 The following command does something.
82 \&.Bd -literal -offset 2n
83 \&.Li # Ic make -VLEGAL
85 \&.It Sy Example 2\\&: No Doing Something Different
87 The following command does something different.
88 \&.Bd -literal -offset 2n
92 It is good to know this command.
97 .Bd -filled -offset indent
99 .It Sy Example 1\&: No Doing Something
101 The following command does something.
102 .Bd -literal -offset 2n
103 .Li # Ic make -VLEGAL
105 .It Sy Example 2\&: No Doing Something Different
107 The following command does something different.
108 .Bd -literal -offset 2n
112 It is good to know this command.
116 .Ss Synopsis Formatting
119 Do not put whitespace between alternative parameters separated with a pipe
122 .Bd -literal -offset indent
123 \&.Cm compression Cm on Ns | Ns Cm off
124 \&.Cm install Fl -all Ns | Ns Ar portname Ar ...
127 which in the SYNOPSIS section is rendered as:
128 .Bd -unfilled -offset indent
129 .Cm compression Cm on Ns | Ns Cm off
130 .Cm install Fl -all Ns | Ns Ar portname Ar ...
135 to stylize characters that are command modifiers
143 .Bd -literal -offset indent
145 \&.Fl -meet Cm = Ar who Oo Cm \&, Ar who " " Ar "..." Oc Cm @ Ar where
150 .Bd -filled -offset indent
152 .Fl -meet Cm = Ar who Oo Cm \&, Ar who " " Ar "..." Oc Cm @ Ar where
157 .Bd -literal -offset indent
159 \&.Fl -meet No = Ar who Oo , Ar who " " Ar "..." Oc @ Ar where
163 which would render as:
164 .Bd -filled -offset indent
166 .Fl -meet No = Ar who Oo , Ar who " " Ar "..." Oc @ Ar where
170 It is important to realize that in the correct example,
177 At the same time, the square brackets
179 are not stylized as they do not belong to the syntax of the
194 macro for quoting inside quotes.
198 macro is usually not necessary.
210 .Va kdb.enter.panic .
212 Use the angle brackets
218 when they are mixed with similarly stylized macros like
223 .Bd -literal -offset indent
224 \&.Va critical_filesystems_ Ns Aq Ar type
228 .Bd -filled -offset indent
229 .Va critical_filesystems_ Ns Aq Ar type
233 .Bd -literal -offset indent
234 \&.Va critical_filesystems_ Ns Ar type
237 that would be rendered as:
238 .Bd -filled -offset indent
239 .Va critical_filesystems_ Ns Ar type
247 This manual page first appeared in
250 .An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org