5 This file is part of groff, the GNU roff type-setting system.
7 Copyright (C) 2000 Free Software Foundation, Inc.
8 written by Bernd Warken <bwarken@mayn.de>
10 Last update: 17 May 2000
12 Permission is granted to copy, distribute and/or modify this document
13 under the terms of the GNU Free Documentation License, Version 1.1 or
14 any later version published by the Free Software Foundation; with the
15 Invariant Sections being this .ig-section and AUTHOR, with no
16 Front-Cover Texts, and with no Back-Cover Texts.
18 A copy of the Free Documentation License is included as a file called
19 FDL in the main directory of the groff source package.
21 .\" Japanese Version Copyright (c) 2001 UCHIDA Norihiro all rights reserved.
22 .\" Translated Mon Mar 12 2001 by UCHIDA Norihiro <KY4N-UCD@asahi-net.or.jp>
23 .\" --------------------------------------------------------------------
25 .\" --------------------------------------------------------------------
34 .\" text lines in macro definitions or bracketed sections \{...\}
43 . ds @tmp@ \fB\\$1\fP\fI\\$2\fP
45 . text \\*[@tmp@]\fR\\$*\fP
51 . ds @tmp@ `\f(CB\\$1\fP'
58 . ds @tmp@ \f(CB\\$1\fP
64 .als shellcommand option
67 . ds @tmp@ \f(CI\\$1\fP
74 . ds @tmp@ \f(CB\\$1\fP
80 .\" --------------------------------------------------------------------
82 .\" --------------------------------------------------------------------
83 .TH GROFF_TMAC 5 "22 May 2000" "Groff Version 1.16.1"
86 .\"O groff_tmac \- macro files in the roff typesetting system
87 groff_tmac \- roff テキスト整形システムのマクロファイル
88 .\" --------------------------------------------------------------------
91 .\" --------------------------------------------------------------------
94 .\"O type-setting system provides a set of macro packages suitable for
95 .\"O special kinds of documents. Each macro package stores its macros and
96 .\"O definitions in a file called the package's
97 .\"O .BR "tmac file" .
98 .\"O The name is deduced from
102 テキスト整形システムは、特定のドキュメントにとって便利なマクロパッケージを
103 提供している。それぞれのマクロパッケージはパッケージごとの
105 と呼ばれるファイルにマクロと定義を格納している。
111 .\"O The tmac files are normal roff source documents, except that they
112 .\"O usually contain only definitions and setup commands, but no text. All
113 .\"O tmac files are kept in a single or a small number of directories, the
116 tmac ファイルは普通の roff のソースドキュメントで、通常は定義とセットアップ
117 コマンドだけを含み、テキストは含まれない。
118 すべての tmac ファイルは、ひとつあるいはいくつかのディレクトリ
121 .\" --------------------------------------------------------------------
124 .\" --------------------------------------------------------------------
125 .\"O In classical roff systems, there was a funny naming scheme.
126 .\"O If the name of a macro package started with
128 .\"O this letter was omitted, e.g., the macro package for the man pages
132 .\"O and its macro file
134 古典的な roff システムでは、奇妙な命名規則が用いられていた。
137 で始まる場合は、この文字は省略された。たとえばマニュアルページ
145 .\"O By a similar reasoning, macro packages that did not start with an
147 .\"O were often referred to by adding an
149 .\"O e.g., the package corresponding to
153 .\"O because the command-line for activating it reads
162 と呼ばれた。なぜなら、このマクロを用いるときのコマンドラインが以下のように
166 .\"O .BIR "troff\ \-m" doc .
170 .\"O Actual versions of
172 .\"O provide both naming schemes for the inflicted macro packages, with and
173 .\"O without the leading
179 .\"O macro package may be specified as
182 .\"O .BIR "groff\ \-m\ " man ,
184 .\"O .BIR "groff\ \-m" an ,
186 .\"O .BIR "groff\ \-m" man , or
188 .\"O .BIR "groff\ \-m " an .
193 では、使用するマクロパッケージの命名方法は先行する
195 がある場合・ない場合の両方を提供している。
200 マクロパッケージは以下のように指定できる。
203 .BI "groff\ \-m\ " man
212 .\"O The easiest way to find out which macro packages are available on a
213 .\"O system is to check the content of the
216 .\"O For example, a file called
217 .\"O .BI tmac. anything
218 .\"O determines a macro package named
220 システム上で有効なマクロパッケージを見つけるもっとも簡単な方法は、
222 ディレクトリの内容をチェックすることである。
227 という名前のマクロパッケージを定義している。
231 .\"O most macro packages are described in man pages called
232 .\"O .BR groff_<name> (7),
235 .\"O for the classical packages.
239 というマニュアルページで説明されており、古典的なパッケージも
242 .\" --------------------------------------------------------------------
245 .\" --------------------------------------------------------------------
246 .\"O There are several ways to use a macro package in documents. At
247 .\"O run-time, the groff option
248 .\"O .option \-m \ \c
250 .\"O makes the definitions in the macro file
252 .\"O available as described in the section
254 ドキュメント中でマクロパッケージを使う方法はいくつかある。
255 実行時の指定方法では、groff の オプション
260 のセクションで記述したようにマクロファイル
264 .\"O It is also possible to include the macro file into the document by using
265 .\"O the groff requests
271 .\"O the full filename of the macro file must be specified \(em including the
272 .\"O directory where it is kept.
273 .\"O If the macro file is stored in one of the tmac directories it is more
274 .\"O convenient to use
276 .\"O instead because it additionally searches the tmac path for the filename.
281 を使ってドキュメント中でマクロファイルを指定することもできる。
283 では、マクロファイルは格納されているディレクトリも含めた完全なファイル名で
285 マクロファイルが tmac ディレクトリのひとつに格納されている場合は、代わりに
287 を使用する方が便利である。こちらはファイル名に tmac パスを追加して
290 .\"O Note that in order to resolve the
294 .\"O requests the roff preprocessor
295 .\"O .shellcommand soelim
296 .\"O must be called. This can be done either directly by a pipeline on the
297 .\"O command line or by using the
300 .\"O .shellcommand groff .
304 のリクエストを解決するために roff のプリプロセッサ
306 が呼び出されなければならないことに注意すること。
307 これは、コマンドライン上のパイプラインで直接実行する方法と、
311 オプションを使って呼び出す方法のどちらでも可能である。
313 .\"O You can also supply the letter
315 .\"O in the preprocessor word as described in section
316 .\"O .BR CONVENTION .
318 のセクションで記述してあるように、プリプロセッサ指定子の文字
322 .\"O For example, suppose a macro file is stored as
323 .\"O .I /usr/share/groff/tmac/tmac.macros
324 .\"O and is used in some document called
327 .I /usr/share/groff/tmac/tmac.macros
332 .\"O At run-time, the formatter call for this is
333 実行時では、フォーマッタの呼び出し方法は以下のようになる。
337 .shellcommand "groff\ \-m"
343 .\"O To include the macro file directly in the document either
344 ドキュメント中でマクロファイルを直接指定するには、
354 \&\.so /usr/share/groff/tmac/tmac.macros
359 .\"O In both cases, the formatter is called with
368 .\" --------------------------------------------------------------------
371 .\" --------------------------------------------------------------------
373 .\"O There is a convention that is supported by many modern roff
374 .\"O type-setters: the
375 .\"O .B preprocessor word
376 .\"O described in the following.
377 最近の多くの roff 整形システムでサポートされている
381 .\"O If the first line in a document is a comment, the first word (after the
382 .\"O comment characters and a blank) constitutes the
385 ドキュメントの先頭行がコメントの場合は、コメント文字と空白に続く最初の
389 .\"O That means that the letters of this word are interpreted as
390 .\"O abbreviations for those preprocessor commands that should be run
391 .\"O when formatting the document. Mostly, only the letters corresponding to
392 .\"O the options for the preprocessors are recognized,
402 つまり、これらの文字はドキュメントを整形するときに起動される
403 プリプロセッサコマンドの省略形とみなされる。
404 たいていは、プリプロセッサの呼び出しオプションと一致する文字だけが認識され、
416 .\"O Besides being a good reminder for the user, some formatters (like the
418 .\"O program) are even able to automatically start the preprocessors
419 .\"O specified in the preprocessor word, but do not bet on this.
420 ユーザに良き助言を与えるならば、いくつかのフォーマッタ (たとえば
422 プログラムなど) もプリプロセッサ指定子によって指定されたプリプロセッサを
423 自動的に起動することができる。しかし、その動作を期待するべきではない。
424 .\" --------------------------------------------------------------------
425 .\"O .SH "WRITING A MACRO FILE"
427 .\" --------------------------------------------------------------------
428 .\"O Writing a groff macro file is easy. Design a set of macros, strings,
429 .\"O registers, etc. Store them in a single file. Documents that use the
430 .\"O macros include this macro file with the
432 .\"O request as described in the
435 groff のマクロファイルを記述することは簡単である。
436 一連のマクロ、文字列、レジスタなどをデザインし、それらをひとつのファイルに
437 格納する。このマクロを用いるドキュメントで
439 リクエストによってマクロファイルを指定する方法は
443 .\"O To use the tmac functionality, call the macro file
444 .\"O .BI tmac. whatever
445 .\"O and put it in some directory of the tmac path, cf. section
447 .\"O Then documents can include it with the
450 .\"O .shellcommand "groff\ \-m"
451 .\"O option as described in the
454 tmac の機能を用いるには、マクロファイルを
456 のように命名して tmac パスで指定されるディレクトリに格納する
464 .shellcommand "groff\ \-m"
465 オプションによってそのマクロを使用することができる。
467 .\"O If your macros might be of general usage contact the groff maintainers
468 .\"O to have them included in the groff
470 .\"O source directory.
471 もしあなたのマクロが一般的な用途に向いているならば、groff のメンテナに
474 ソースディレクトリにそれらを含めるようにしてほしい。
476 .\"O Some general guidelines might be helpful in writing macros.
477 マクロの記述には、一般的なガイドラインのいくつかが役に立つだろう。
479 .\"O Double all functional backslashes,
480 機能的なバックスラッシュはすべて二重にする。
486 .\"O All printable backslashes must be written as
488 表示するためのバックスラッシュは次のように記述する。
491 .\"O Escape all dots,
498 .\"O Make ample use of the non-printable character
500 .\"O in text parts, esp. before
502 .\"O and at the beginning of a line, but not before a delayed command.
507 の前と行の先頭に広く用いるようにする。ただし後に続くコマンドがある場合は
510 .\"O Use the character
512 .\"O in temporary variable names.
517 .\"O Test your macros for text and graphical devices, e.g.,
521 マクロはテキストとグラフィックのデバイスでテストする。たとえば
526 .\" --------------------------------------------------------------------
529 .\" --------------------------------------------------------------------
530 .\"O All macro names that want to use the tmac mechanism must be named
531 .\"O according to the form
532 .\"O .BIR tmac. name .
533 tmac のメカニズムで用いようとするマクロの名前は
535 という形式で命名されていなければならない。
537 .\"O The macro files are kept in the
539 .\"O .BR directories ,
540 .\"O all of which constitue the
548 .\"O In accordance with the Filesystem Hierarchy Standard (FHS), the standard
549 .\"O tmac directory location for groff is
550 .\"O .IR /usr/share/groff/tmac ,
551 .\"O a local installation will use
552 .\"O .IR /usr/local/share/groff/tmac .
553 Filesystem Hierarchy Standard (FHS) に準拠していれば、
554 groff の標準的な tmac ディレクトリの場所は
555 .I /usr/share/groff/tmac
557 .I /usr/local/share/groff/tmac
559 .\"O Older systems used a subdirectory of
564 .\"O Independently of the default tmac path, the tmac path actually used by a
565 .\"O document can always be set by a shell environment variable, cf. section
566 .\"O .BR ENVIRONMENT .
567 デフォルトの tmac パスとは独立して、実際にドキュメントで用いられる
568 tmac パスは常にシェル環境変数で指定することができる。セクション
571 .\" --------------------------------------------------------------------
574 .\" --------------------------------------------------------------------
577 .\"O A colon separated list of tmac directories in which to search for macro
581 .\"O If unset a default path is used as is outlined in the
584 マクロファイルを検索するための tmac ディレクトリ
589 のセクションで示したデフォルトのパスが使用される。
590 .\" --------------------------------------------------------------------
593 .\" --------------------------------------------------------------------
594 .\"O The groff documentation is in evolution at the moment. It is possible
595 .\"O that small inconsistencies between different documents exist
597 現在、groff システムのドキュメントは進化の途上にある。
598 一時的にドキュメント同士でささやかな矛盾点が見られるだろう。
599 .\" --------------------------------------------------------------------
602 .\" --------------------------------------------------------------------
603 .\"O This document is part of groff, the GNU roff distribution. It was
604 .\"O written by Bernd Warken <bwarken@mayn.de>.
605 このドキュメントは groff (GNU roff パッケージ) の一部である。
606 Bernd Warken <bwarken@mayn.de> によって記述された。
608 .\"O It is distributed under the terms of the FDL (GNU Free Documentation
609 .\"O License) version 1.1 or later. You should have received a copy of the
610 .\"O FDL on your system, it is also available on-line under
611 このドキュメントは FDL (GNU Free Documentation License) のバージョン 1.1
612 以降の元に配布される。あなたのシステムにも FDL のコピーがあるはずである。
616 .IR <http://www.gnu.org/copyleft/fdl.html> .
618 .\" --------------------------------------------------------------------
621 .\" --------------------------------------------------------------------
622 .\"O The authoritative source of information for all details of the groff
623 .\"O system is the groff
626 groff システムの詳細について、信ずべき情報源は、groff の
630 .\"O For a groff overview, see
634 .\"O in the groff source package.
641 .\"O The groff tmac macro packages are
642 .\"O .BR groff_man (7),
643 .\"O .BR groff_markup (7),
644 .\"O .BR groff_mdoc (7),
645 .\"O .BR groff_mdoc.samples (7),
646 .\"O .BR groff_me (7),
647 .\"O .BR groff_mm (7),
648 .\"O .BR groff_mmroff (7),
649 .\"O .BR groff_ms (7),
650 .\"O .BR groff_msafer (7).
651 groff の tmac マクロパッケージについては以下を参照のこと。
653 .BR groff_markup (7),
655 .BR groff_mdoc.samples (7),
658 .BR groff_mmroff (7),
662 .\"O The groff language is described in
664 .\"O and the formatters in
674 .\"O The Filesystem Hierarchy Standard (FHS) is available at
675 .\"O .BR http://www.pathname.com/fhs/ .
677 Filesystem Hierarchy Standard (FHS) については
678 .B http://www.pathname.com/fhs/