Unix & Linux Asked by Luís Gustavo Monezi on January 5, 2021
I am not sure if "grouping description" is the right way to call it, but I am very curious to know where usually the first line of a man page is defined. Most of those descriptions are not exclusive of just one program. For instance, in Slackware:
man rpc
prints:
RPC(3) BSD Library Functions Manual RPC(3) NAME rpc — library routines for remote procedure calls SYNOPSIS ...
Where is the "BSD Library Functions Manual" description defined, in the man pages?
I have recursively searched the entire source code of this package and its man pages and I haven’t found anything.
The header in rpc(3) is defined by .Dt
title macro:
$ zcat $(man -w 3 rpc) | head
." @(#)rpc.3n 1.31 93/08/31 SMI; from SVr4
." Copyright 1989 AT&T
.Dd May 7, 1993
.Dt RPC 3
.Os
.Sh NAME
.Nm rpc
.Nd library routines for remote procedure calls
.Sh SYNOPSIS
.In rpc/rpc.h
You can read about it in man 7 groff_mdoc
:
TITLE MACROS
The title macros are part of the page structure domain but are presented
first and separately for someone who wishes to start writing a man page
yesterday. Three header macros designate the document title or manual
page title, the operating system, and the date of authorship. These
macros are called once at the very beginning of the document and are used
to construct headers and footers only.
.Dt [⟨document title⟩] [⟨section number⟩] [⟨volume⟩]
The document title is the subject of the man page and must be in
CAPITALS due to troff limitations. If omitted, ‘UNTITLED’ is
used. The section number may be a number in the range 1, ..., 9
or ‘unass’, ‘draft’, or ‘paper’. If it is specified, and no vol‐
ume name is given, a default volume name is used.
Under BSD, the following sections are defined:
1 BSD General Commands Manual
2 BSD System Calls Manual
3 BSD Library Functions Manual
4 BSD Kernel Interfaces Manual
5 BSD File Formats Manual
6 BSD Games Manual
7 BSD Miscellaneous Information Manual
8 BSD System Manager's Manual
9 BSD Kernel Developer's Manual
For example, if you changed it to .Dt RPC 9
you'd get:
RPC(9) BSD Kernel Developer's Manual RPC(9)
Correct answer by Arkadiusz Drabczyk on January 5, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP