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

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



   groff_mm    ( 7 )

меморандумные макросы для GNU roff (memorandum macros for GNU roff)

  Name  |  Synopsis  |    Description    |  Macros  |  Strings  |  Registers  |  Internals  |  Files  |  See also  |

Описание (Description)

The GNU implementation of the mm macro package is part of the groff document formatting system. The mm package is suitable for the composition of letters, memoranda, reports, and books.

groff mm is intended to be compatible with the mm implementation found in the AT&T Documenter's Workbench (DWB), with the following limitations.

• No Bell Labs localisms are implemented.

• The macros OK and PM are not implemented.

• Cut marks are not supported.

Localization groff mm is designed to be easily localized. Strings that can appear in output are collected in the file /usr/local/share/ groff/1.23.0/tmac/xx.tmac, where xx is an ISO 639 two-letter language identifier. For Swedish, this is sv.tmac; 'sv', not 'se'.

This package can also be localized by site or territory; for example, /usr/local/share/groff/1.23.0/tmac/mse.tmac illustrates how to adapt the output to a national standard using its ISO 3166 territory code. Such a package can define an internal string that causes a macro file called territory_locale to be loaded at package initialization. If this mechanism is not used, a macro file called locale is loaded instead. No diagnostic is produced if these macro files do not exist.

Registers and strings The behavior of many macros can be configured by registers and strings. A register is assigned with the nr request.

.nr ident [±]n [i]

ident is the name of the register, and n is the value to be assigned. n can be prefixed with a plus or minus sign if incrementation or decrementation (respectively) of the register's existing value is desired. If assignment of a (possibly) negative n is required, further prefix it with a zero or enclose it in parentheses. If i is specified, the register is automatically modified by i prior to interpolation if a plus or minus sign is included in the escape sequence as follows.

\n[±][ident]

i can be negative; it combines algebraically with the sign in the interpolation escape.

Strings are defined with the ds request.

.ds ident string

The string is assigned everything up to the end of the line, including trailing spaces. It is a good practice to end string with a comment escape sequence (\") so that extraneous spaces do not intrude during document maintenance. To include leading spaces in string, prefix it with a double quote. Strings are interpolated with the \* escape sequence.

\*[ident]

Register and string name spaces are distinct, but strings and macros share a name space. Defining a string with the same name as an mm macro is not supported and may cause incorrect rendering, the emission of diagnostic messages, and an error exit status from troff.

Register format A register is interpolated using Arabic numerals if no other format has been assigned to it. Assign a format to a register with the af request.

.af R c

R is the name of the register, and c is the format. If c is a sequence of Arabic numerals, their quantity defines a zero-padded minimum width for the interpolated register value.

Form Sequence 1 0, 1, 2, 3, ..., 10, ... 001 000, 001, 002, 003, ..., 1000, ... i 0, i, ii, iii, iv, ... I 0, I, II, III, IV, ... a 0, a, b, c, ..., z, aa, ab, ... A 0, A, B, C, ..., Z, AA, AB, ...

Fonts In groff mm, the fonts (or rather, font styles) R (normal), I (italic), and B (bold) are mounted at font positions 1, 2, and 3, respectively. Internally, font positions are used for backwards compatibility. From a practical point of view, it doesn't make a big difference—a different font family can still be selected by invoking groff's fam request or using its -f command-line option. On the other hand, if you want to replace just, for example, font I with Zapf Chancery Medium italic (available on groff's pdf and ps output devices), you have to use the fp request, replacing the font at position 2 with '.fp 2 ZCMI'). Because the cover sheet, memorandum type, and refer(1) integration macros explicitly request fonts named B, I, and R, you will also need to remap these font names with the ftr request, for instance with '.ftr I ZCMI'.