mirror of https://github.com/mkerrisk/man-pages
man-pages.7: Expand the guidance on formatting code snippets
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
efeece0465
commit
d6dceb1a3b
|
@ -635,7 +635,32 @@ When structure definitions, shell session logs, and so on are included
|
||||||
in running text, indent them by 4 spaces (i.e., a block enclosed by
|
in running text, indent them by 4 spaces (i.e., a block enclosed by
|
||||||
.I ".in\ +4n"
|
.I ".in\ +4n"
|
||||||
and
|
and
|
||||||
.IR ".in" ).
|
.IR ".in" ),
|
||||||
|
format them using the
|
||||||
|
.I .EX
|
||||||
|
and
|
||||||
|
.I EE
|
||||||
|
macros, and surround them with suitable paragraph markers (either
|
||||||
|
.I .PP
|
||||||
|
or
|
||||||
|
.IR .IP ).
|
||||||
|
For example:
|
||||||
|
.PP
|
||||||
|
.in +4n
|
||||||
|
.EX
|
||||||
|
.PP
|
||||||
|
.in +4n
|
||||||
|
.EX
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
|
.PP
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
.SS Preferred terms
|
.SS Preferred terms
|
||||||
The following table lists some preferred terms to use in man pages,
|
The following table lists some preferred terms to use in man pages,
|
||||||
mainly to ensure consistency across pages.
|
mainly to ensure consistency across pages.
|
||||||
|
|
Loading…
Reference in New Issue