맨페이지의 마지막 줄(또는 바닥글)에 대한 규칙은 무엇입니까?

맨페이지의 마지막 줄(또는 바닥글)에 대한 규칙은 무엇입니까?

맨 페이지 마지막 줄의 의미나 규칙에 대한 문서를 어디서 찾을 수 있는지 궁금합니다. 맨 페이지를 탐색하는 것은 도움이 되지 않습니다. 예를 들어:

…$ man top|tail -n 1
procps-ng                       July 2014                          TOP(1)

…$ man rm|tail -n 1
GNU coreutils 8.25               February 2017                           RM(1)

TOP 명령 정보:

  • procps-ng: top 명령이 속한 모듈 또는 도구 시리즈입니까?
  • 2014년 7월: 문서가 작성된 날짜인가요, 아니면 이 버전의 top이 출시된 날짜인가요?
  • 탑(1): 이것은 맨페이지 자체에 대한 자체 참조인 것 같습니다.

답변1

Linux에서 GNU 도구를 사용하여 생성되었다고 가정하면 머리글과 바닥글은 모두 .TH매크로에 대한 인수로 함께 지정됩니다. ~에서man 7 groff_man:

.TH title section
   [footer-middle] [footer-outside] [header-middle] Define the
  title of the man page as title and the section as section.
  See man(1) for details on the section numbers and suffixes
  applicable to your system.  title and section are positioned
  together at the left and right in the header line (with
  section in parentheses immediately appended to title).
  footer-middle is centered in the footer line.  footer-outside
  is positioned at the left in the footer line (or at the left
  on even pages and at the right on odd pages if double-sided
  printing is active).  header-middle is centered in the header
  line.  If section is a simple integer between 1 and 9
  (inclusive), or is exactly “3p”, there is no need to specify
  header-middle; the macro package will supply text for it.

나머지 대회에서는 다음과 같은 내용을 제공합니다.man 7 man-pages:

Title line
   The first command in a man page should be a TH command:

          .TH title section date source manual

   where:
          title     The title of the man page, written in all caps
                    (e.g., MAN-PAGES).

          section   The section number in which the man page should be
                    placed (e.g., 7).

          date      The date of the last nontrivial change that was made
                    to the man page.  (Within the man-pages project, the
                    necessary updates to these timestamps are handled
                    automatically by scripts, so there is no need to
                    manually update them as part of a patch.)  Dates
                    should be written in the form YYYY-MM-DD.

          source    The source of the command, function, or system call.

                    For those few man-pages pages in Sections 1 and 8,
                    probably you just want to write GNU.

                    For system calls, just write Linux.  (An earlier
                    practice was to write the version number of the
                    kernel from which the manual page was being
                    written/checked.  However, this was never done
                    consistently, and so was probably worse than
                    including no version number.  Henceforth, avoid
                    including a version number.)

                    For library calls that are part of glibc or one of
                    the other common GNU libraries, just use GNU C
                    Library, GNU, or an empty string.

                    For Section 4 pages, use Linux.

                    In cases of doubt, just write Linux, or GNU.

          manual    The title of the manual (e.g., for Section 2 and 3
                    pages in the man-pages package, use Linux
                    Programmer's Manual).

관련 정보