Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   groff_ms    ( 7 )

пакет макросов рукописи GNU roff для форматирования документов (GNU roff manuscript macro package for formatting documents)

  Name  |  Synopsis  |  Description  |  Usage  |    Differences from at&t ms     |  Naming conventions  |  Files  |  See also  |

Differences from AT&T ms 

The groff ms macros are a complete re-implementation, using no original AT&T code. Since they take advantage of the extended features in groff, they cannot be used with AT&T troff. Other differences include:

• The internals of groff ms differ from the internals of AT&T ms. Documents that depend upon implementation details of AT&T ms may not format properly with groff ms. Such details include macros whose function was not documented in the AT&T ms manual ('Typing Documents on the UNIX System: Using the -ms Macros with Troff and Nroff', M. E. Lesk, Bell Laboratories, 1978).

• The error-handling policy of groff ms is to detect and report errors, rather than silently to ignore them.

• Berkeley localisms, in particular the TM and CT macros, are not implemented.

• Version 10 Research Unix supported a pair of P1 and P2 macros for setting code examples; groff ms does not.

groff ms does not work in GNU troff's AT&T compatibility mode. If loaded when that mode is enabled, it aborts processing with a diagnostic message.

• Multiple line spacing is not supported (use a larger vertical spacing instead).

groff ms uses the same header and footer defaults in both nroff and troff modes as AT&T ms does in troff mode; AT&T's default in nroff mode is to put the date, in U.S. traditional format (e.g., 'January 1, 2021'), in the center footer (the CF string).

• Macros that cause groff ms to internally reset its paragraph rendering parameters (paragraphs, headings, and displays, among others) may change the indentation; they do so not by incrementing or decrementing it, but by setting it absolutely. This can cause problems for documents that define additional macros of their own that try to manipulate indentation. The solution is to use, not the in request, but .RS and .RE.

• To make groff ms use the default page offset (which also specifies the left margin), the PO register must stay undefined until the first ms macro is called. This implies that \n[PO] should not be used early in the document, unless it is changed also: accessing an undefined register automatically defines it.

• Displays are left-aligned by default, not indented. In AT&T ms, .DS is synonymous with '.DS I'; in groff ms, it is synonymous with '.DS L'.

• Block displays were not documented in the AT&T ms manual (Berkeley corrected this oversight), but Version 7 Unix ms supported them nevertheless, as does groff ms (this is thus only an apparent difference).

• Right-aligned displays are available. The AT&T ms manual observes that 'it is tempting to assume that '.DS R' will right adjust lines, but it doesn't work'. In groff ms, it does.

groff ms handles 'S' as the first argument to the NH macro specially, allowing alteration of the automatic heading numbering sequence.

groff ms supports the PN register, but it is not necessary; you can access the page number via the usual % register and use the af request to assign a different format to it if desired. (If you redefine the ms PT macro and desire special treatment of certain page numbers—like '1'—you may need to handle a non-Arabic page number format, as groff ms's .PT does; see the macro package source. groff ms aliases the PN register to %.)

• The AT&T ms manual documents registers CW and GW as setting the default column width and 'intercolumn gap', respectively, and which applied when .MC was called with fewer than two arguments. groff ms instead treats .MC without arguments as synonymous with .2C; there is thus no occasion for a default column width register. Further, the MINGW register and the second argument to .MC specify a minimum space between columns, not the fixed gutter width of AT&T ms.

• The register GS is set to 1 by the groff ms macros, but is not used by the AT&T ms package. Documents that need to determine whether they are being formatted with groff ms or another implementation should test this register.

Localization strings You can redefine the following strings to adapt the groff ms macro package to languages other than English.

String Default ─────────────────────────────────── \*[REFERENCES] References \*[ABSTRACT] \f[I]ABSTRACT\f[] \*[TOC] Table of Contents \*[MONTH1] January \*[MONTH2] February \*[MONTH3] March \*[MONTH4] April \*[MONTH5] May \*[MONTH6] June \*[MONTH7] July \*[MONTH8] August \*[MONTH9] September \*[MONTH10] October

\*[MONTH11] November \*[MONTH12] December ─────────────────────────────────── The default for ABSTRACT includes font style escapes to set the word in italics.