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

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



   groff_tmac    ( 5 )

файлы макросов в системе набора GNU roff (macro files in the GNU roff typesetting system)

  Name  |  Description  |  Macro packages  |  Naming  |    Inclusion    |  Writing macros  |  See also  |

Inclusion

There are several ways to use a macro package in a document.  The
       classical way is to specify the troff/groff option -m name at run
       time; this makes the contents of the macro package name
       available.  In groff, the file name.tmac is searched within the
       tmac path; if not found, tmac.name is searched for instead.

Alternatively, it is also possible to include a macro file by adding the request .so filename to the document; the argument must be the full file name of an existing file, possibly with the directory where it is kept. In groff, this was improved by the similar request .mso package, which added searching in the tmac path, just like option -m does.

In order to resolve the .so and .mso requests, the roff preprocessor soelim(1) must be called if the files to be included need preprocessing. This can be done either directly by a pipeline on the command line or by using the troff/groff option -s. man calls soelim automatically.

For example, suppose a macro file is stored as

/usr/local/share/groff/1.23.0/tmac/macros.tmac

and is used in some document called docu.roff.

At run time, the formatter call for this is

sh# groff -m macros docu.roff

To include the macro file directly in the document, use either

.mso macros.tmac

or

.so /usr/local/share/groff/1.23.0/tmac/macros.tmac

In both cases, the formatter should be called with option -s to invoke soelim.

sh# groff -s docu.roff