OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / GNU_groff / draft / man5 / groff_tmac.5
1 .\"                        -*- nroff -*- 
2 .ig /
3 groff_tmac.5
4
5 This file is part of groff, the GNU roff type-setting system.
6
7 Copyright (C) 2000 Free Software Foundation, Inc.
8 written by Bernd Warken <bwarken@mayn.de>
9
10 Last update: 17 May 2000
11
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.
17
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.
20 ./
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 .\" --------------------------------------------------------------------
24 .\" Setup
25 .\" --------------------------------------------------------------------
26 .
27 .if n \{\
28 .  mso tmac.tty-char
29 .  ftr CR R
30 .  ftr CI I
31 .  ftr CB B
32 .\}
33 .
34 .\" text lines in macro definitions or bracketed sections \{...\}
35 .de text
36 .  if 1 \&\\$*\&
37 ..
38 .
39 .de BIR
40 .  ie (\\n[.$] < 3) \
41 .    BI $@
42 .  el \{\
43 .    ds @tmp@ \fB\\$1\fP\fI\\$2\fP
44 .    shift 2
45 .    text \\*[@tmp@]\fR\\$*\fP
46 .    rm @tmp@
47 .  \}
48 ..
49 .
50 .de 'char
51 .  ds @tmp@ `\f(CB\\$1\fP'
52 .  shift
53 .  text \\*[@tmp@]\\$*
54 .  rm @tmp@
55 ..
56 .
57 .de option
58 .  ds @tmp@ \f(CB\\$1\fP
59 .  shift 1
60 .  text \\*[@tmp@]\\$*
61 .  rm @tmp@
62 ..
63 .
64 .als shellcommand option
65 .
66 .de argument
67 .  ds @tmp@ \f(CI\\$1\fP
68 .  shift 1
69 .  text \\*[@tmp@]\\$*
70 .  rm @tmp@
71 ..
72 .
73 .de request
74 .  ds @tmp@ \f(CB\\$1\fP
75 .  shift 1
76 .  text \\*[@tmp@]\\$*
77 .  rm @tmp@
78 ..
79 .
80 .\" --------------------------------------------------------------------
81 .\" Title
82 .\" --------------------------------------------------------------------
83 .TH GROFF_TMAC 5 "22 May 2000" "Groff Version 1.16.1"
84 .\"O .SH NAME
85 .SH 名前
86 .\"O groff_tmac \- macro files in the roff typesetting system
87 groff_tmac \- roff テキスト整形システムのマクロファイル
88 .\" --------------------------------------------------------------------
89 .\"O .SH DESCRIPTION
90 .SH 説明
91 .\" --------------------------------------------------------------------
92 .\"O The
93 .\"O .BR roff (7)
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
99 .\"O .RB ` T roff
100 .\"O .BR MAC ros'.
101 .BR roff (7)
102 テキスト整形システムは、特定のドキュメントにとって便利なマクロパッケージを
103 提供している。それぞれのマクロパッケージはパッケージごとの
104 .B tmac ファイル
105 と呼ばれるファイルにマクロと定義を格納している。
106 この名前は
107 .RB ` T roff
108 .BR MAC ros'
109 に由来する。
110 .LP
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
114 .\"O .B tmac
115 .\"O directories.
116 tmac ファイルは普通の roff のソースドキュメントで、通常は定義とセットアップ
117 コマンドだけを含み、テキストは含まれない。
118 すべての tmac ファイルは、ひとつあるいはいくつかのディレクトリ
119 .RB ( tmac
120 ディレクトリ) に格納される。
121 .\" --------------------------------------------------------------------
122 .\"O .SH NAMING
123 .SH 命名方法
124 .\" --------------------------------------------------------------------
125 .\"O In classical roff systems, there was a funny naming scheme.
126 .\"O If the name of a macro package started with
127 .\"O .'char m
128 .\"O this letter was omitted, e.g., the macro package for the man pages
129 .\"O .I man
130 .\"O was called
131 .\"O .I an
132 .\"O and its macro file
133 .\"O .IR tmac.an .
134 古典的な roff システムでは、奇妙な命名規則が用いられていた。
135 マクロパッケージの名前が
136 .'char m
137 で始まる場合は、この文字は省略された。たとえばマニュアルページ
138 .I man
139 用のマクロパッケージは
140 .I an
141 で、そのマクロファイルは
142 .I tmac.an
143 と命名された。
144 .LP
145 .\"O By a similar reasoning, macro packages that did not start with an
146 .\"O .'char m
147 .\"O were often referred to by adding an
148 .\"O .'char m ,
149 .\"O  e.g., the package corresponding to
150 .\"O .I tmac.doc
151 .\"O was called
152 .\"O .I mdoc
153 .\"O because the command-line for activating it reads
154 同じような理由から、
155 .'char m
156 で始まらないマクロパッケージはしばしば
157 .'char m
158 を追加されて呼ばれた。たとえば、
159 .I tmac.doc
160 に対応するパッケージは
161 .I mdoc
162 と呼ばれた。なぜなら、このマクロを用いるときのコマンドラインが以下のように
163 読めるからである。
164 .RS
165 .LP
166 .\"O .BIR "troff\ \-m" doc .
167 .BI "troff\ \-m" doc
168 .RE
169 .LP
170 .\"O Actual versions of
171 .\"O .BR groff (1)
172 .\"O provide both naming schemes for the inflicted macro packages, with and
173 .\"O without the leading
174 .\"O .'char m .
175 .\"O So in
176 .\"O .IR groff ,
177 .\"O the
178 .\"O .I man
179 .\"O macro package may be specified as
180 .\"O .RS
181 .\"O .LP
182 .\"O .BIR "groff\ \-m\ " man ,
183 .\"O .br
184 .\"O .BIR "groff\ \-m" an ,
185 .\"O .br
186 .\"O .BIR "groff\ \-m" man , or
187 .\"O .br
188 .\"O .BIR "groff\ \-m " an .
189 .\"O .RE
190 .\"O .LP
191 現行バージョンの
192 .BR groff (1)
193 では、使用するマクロパッケージの命名方法は先行する
194 .'char m
195 がある場合・ない場合の両方を提供している。
196 したがって、
197 .I groff
198 では
199 .I man
200 マクロパッケージは以下のように指定できる。
201 .RS
202 .LP
203 .BI "groff\ \-m\ " man
204 .br
205 .BI "groff\ \-m" an
206 .br
207 .BI "groff\ \-m" man
208 .br
209 .BI "groff\ \-m " an
210 .RE
211 .LP
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
214 .\"O .I tmac
215 .\"O directories.
216 .\"O For example, a file called
217 .\"O .BI tmac. anything
218 .\"O determines a macro package named
219 .\"O .IR anything .
220 システム上で有効なマクロパッケージを見つけるもっとも簡単な方法は、
221 .I tmac
222 ディレクトリの内容をチェックすることである。
223 たとえば、
224 .BI tmac. anything
225 というファイルは
226 .I anything
227 という名前のマクロパッケージを定義している。
228 .LP
229 .\"O In
230 .\"O .IR groff ,
231 .\"O most macro packages are described in man pages called
232 .\"O .BR groff_<name> (7),
233 .\"O with a leading
234 .\"O .'char m
235 .\"O for the classical packages.
236 .I groff
237 では、ほとんどのマクロパッケージが
238 .BR groff_<name> (7)
239 というマニュアルページで説明されており、古典的なパッケージも
240 .'char m
241 を先行してある。
242 .\" --------------------------------------------------------------------
243 .\"O .SH INCLUSION
244 .SH マクロの使用方法
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
249 .\"O .argument name
250 .\"O makes the definitions in the macro file
251 .\"O .BI tmac. name
252 .\"O available as described in the section
253 .\"O .BR NAMING .
254 ドキュメント中でマクロパッケージを使う方法はいくつかある。
255 実行時の指定方法では、groff の オプション
256 .option \-m \ \c
257 .argument name
258 で、
259 .B 命名方法
260 のセクションで記述したようにマクロファイル
261 .BI tmac. name
262 の定義を有効にする。
263 .LP
264 .\"O It is also possible to include the macro file into the document by using 
265 .\"O the groff requests
266 .\"O .request .so
267 .\"O or
268 .\"O .request .mso .
269 .\"O For
270 .\"O .request .so
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
275 .\"O .request .mso
276 .\"O instead because it additionally searches the tmac path for the filename.
277 groff のリクエスト
278 .request .so
279
280 .request .mso
281 を使ってドキュメント中でマクロファイルを指定することもできる。
282 .request .so
283 では、マクロファイルは格納されているディレクトリも含めた完全なファイル名で
284 指定する必要がある。
285 マクロファイルが tmac ディレクトリのひとつに格納されている場合は、代わりに
286 .request .mso
287 を使用する方が便利である。こちらはファイル名に tmac パスを追加して
288 検索をする。
289 .LP
290 .\"O Note that in order to resolve the
291 .\"O .request .so
292 .\"O and
293 .\"O .request .mso
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
298 .\"O .option \-s
299 .\"O option of
300 .\"O .shellcommand groff .
301 .request .so
302
303 .request .mso
304 のリクエストを解決するために roff のプリプロセッサ
305 .shellcommand soelim
306 が呼び出されなければならないことに注意すること。
307 これは、コマンドライン上のパイプラインで直接実行する方法と、
308 .shellcommand groff
309
310 .option \-s
311 オプションを使って呼び出す方法のどちらでも可能である。
312 .LP
313 .\"O You can also supply the letter
314 .\"O .'char s
315 .\"O in the preprocessor word as described in section
316 .\"O .BR CONVENTION .
317 .B 規定
318 のセクションで記述してあるように、プリプロセッサ指定子の文字
319 .'char s
320 で指定することもできる。
321 .LP
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
325 .\"O .IR docu.roff .
326 たとえば、マクロファイルが
327 .I /usr/share/groff/tmac/tmac.macros
328 に格納されていて、
329 .I docu.roff
330 というドキュメントで使用すると仮定する。
331 .LP
332 .\"O At run-time, the formatter call for this is
333 実行時では、フォーマッタの呼び出し方法は以下のようになる。
334 .RS
335 .LP
336 .ft CR
337 .shellcommand "groff\ \-m"
338 .argument macros
339 .argument docu.roff
340 .ft P
341 .RE
342 .LP
343 .\"O To include the macro file directly in the document either
344 ドキュメント中でマクロファイルを直接指定するには、
345 .RS
346 .ft CR
347 \&\.mso tmac.macros
348 .ft P
349 .RE
350 .\"O is used or
351 を用いるか、
352 .RS
353 .ft CR
354 \&\.so /usr/share/groff/tmac/tmac.macros
355 .ft P
356 .RE
357 と指定する。
358 .LP
359 .\"O In both cases, the formatter is called with
360 どちらの場合でも、フォーマッタを
361 .ft CR
362 .RS
363 groff\ \-s docu.roff
364 .RE
365 .ft P
366 のようにして呼び出す。
367 .
368 .\" --------------------------------------------------------------------
369 .\"O .SH CONVENTION
370 .SH 規定
371 .\" --------------------------------------------------------------------
372 .LP
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 整形システムでサポートされている
378 .B プリプロセッサ指定子
379 の規定について以下に記述する。
380 .LP
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
383 .\"O .B preprocessor
384 .\"O .BR word .
385 ドキュメントの先頭行がコメントの場合は、コメント文字と空白に続く最初の
386 文字は
387 .B プリプロセッサ指定子
388 を構成する。
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, 
393 .\"O .'char e ,
394 .\"O .'char G ,
395 .\"O .'char g ,
396 .\"O .'char p ,
397 .\"O .'char R ,
398 .\"O .'char s , and
399 .\"O .'char t
400 .\"O (see
401 .\"O .BR roff (7)).
402 つまり、これらの文字はドキュメントを整形するときに起動される
403 プリプロセッサコマンドの省略形とみなされる。
404 たいていは、プリプロセッサの呼び出しオプションと一致する文字だけが認識され、
405 以下のものがある。
406 .'char e ,
407 .'char G ,
408 .'char g ,
409 .'char p ,
410 .'char R ,
411 .'char s ,
412 .'char t
413 .RB ( roff (7)
414 を参照のこと)
415 .LP
416 .\"O Besides being a good reminder for the user, some formatters (like the
417 .\"O .BR man (1)
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 ユーザに良き助言を与えるならば、いくつかのフォーマッタ (たとえば
421 .BR man (1)
422 プログラムなど) もプリプロセッサ指定子によって指定されたプリプロセッサを
423 自動的に起動することができる。しかし、その動作を期待するべきではない。
424 .\" --------------------------------------------------------------------
425 .\"O .SH "WRITING A MACRO FILE"
426 .SH マクロファイルの記述方法
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
431 .\"O .request .so
432 .\"O request as described in the
433 .\"O .B INCLUSION
434 .\"O section.
435 groff のマクロファイルを記述することは簡単である。
436 一連のマクロ、文字列、レジスタなどをデザインし、それらをひとつのファイルに
437 格納する。このマクロを用いるドキュメントで
438 .request .so
439 リクエストによってマクロファイルを指定する方法は
440 .B マクロの使用方法
441 のセクションに記述してある。
442 .LP
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
446 .\"O .BR FILES .
447 .\"O Then documents can include it with the
448 .\"O .request .mso
449 .\"O request or the
450 .\"O .shellcommand "groff\ \-m"
451 .\"O option as described in the
452 .\"O .B INCLUSION
453 .\"O section.
454 tmac の機能を用いるには、マクロファイルを
455 .BI tmac. whatever
456 のように命名して tmac パスで指定されるディレクトリに格納する
457 .RB ( ファイル
458 のセクションを参照)。
459 そして、ドキュメントでは
460 .B マクロの使用方法
461 のセクションで記述してあるように、
462 .request .mso
463 リクエストや
464 .shellcommand "groff\ \-m"
465 オプションによってそのマクロを使用することができる。
466 .LP
467 .\"O If your macros might be of general usage contact the groff maintainers
468 .\"O to have them included in the groff
469 .\"O .I contrib
470 .\"O source directory.
471 もしあなたのマクロが一般的な用途に向いているならば、groff のメンテナに
472 連絡をとって groff の
473 .I contrib
474 ソースディレクトリにそれらを含めるようにしてほしい。
475 .LP
476 .\"O Some general guidelines might be helpful in writing macros.
477 マクロの記述には、一般的なガイドラインのいくつかが役に立つだろう。
478 .IP \(bu 2m
479 .\"O Double all functional backslashes,
480 機能的なバックスラッシュはすべて二重にする。
481 .'char \e
482 ->
483 .\"O .'char \e\e .
484 .'char \e\e
485 .IP \(bu 2m
486 .\"O All printable backslashes must be written as
487 .\"O .'char \ee .
488 表示するためのバックスラッシュは次のように記述する。
489 .'char \ee
490 .IP \(bu 2m
491 .\"O Escape all dots,
492 ドットはすべてエスケープする。
493 .'char .
494 ->
495 .\"O .'char \e. .
496 .'char \e.
497 .IP \(bu 2m
498 .\"O Make ample use of the non-printable character
499 .\"O .'char \e&
500 .\"O in text parts, esp. before
501 .\"O .'char \e
502 .\"O and at the beginning of a line, but not before a delayed command.
503 テキスト部分には非表示文字である
504 .'char \e&
505
506 .'char \e
507 の前と行の先頭に広く用いるようにする。ただし後に続くコマンドがある場合は
508 この限りではない。
509 .IP \(bu 2m
510 .\"O Use the character
511 .\"O .'char @
512 .\"O in temporary variable names.
513 一時的な変数名には文字
514 .'char @
515 を用いる。
516 .IP \(bu 2m
517 .\"O Test your macros for text and graphical devices, e.g.,
518 .\"O .I latin1
519 .\"O and
520 .\"O .IR ps .
521 マクロはテキストとグラフィックのデバイスでテストする。たとえば
522 .I latin1
523
524 .I ps
525 など。
526 .\" --------------------------------------------------------------------
527 .\"O .SH FILES
528 .SH ファイル
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 のメカニズムで用いようとするマクロの名前は
534 .BI tmac. name
535 という形式で命名されていなければならない。
536 .LP
537 .\"O The macro files are kept in the
538 .\"O .B tmac
539 .\"O .BR directories ,
540 .\"O all of which constitue the
541 .\"O .B tmac
542 .\"O .BR path.
543 マクロファイルは
544 .B "tmac パス"
545 を構成する
546 .B "tmac ディレクトリ"
547 に格納される。
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
556 であり、ローカルな導入先は
557 .I /usr/local/share/groff/tmac
558 が用いられるだろう。
559 .\"O Older systems used a subdirectory of
560 .\"O .IR /usr/lib .
561 古いシステムにおいては、
562 .I /usr/lib
563 以下のサブディレクトリを使用していた。
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 パスは常にシェル環境変数で指定することができる。セクション
569 .B 環境変数
570 を参照のこと。
571 .\" --------------------------------------------------------------------
572 .\"O .SH ENVIRONMENT
573 .SH 環境変数
574 .\" --------------------------------------------------------------------
575 .TP
576 .B GROFF_TMAC_PATH
577 .\"O A colon separated list of tmac directories in which to search for macro
578 .\"O files, the
579 .\"O .B tmac
580 .\"O .BR path .
581 .\"O If unset a default path is used as is outlined in the
582 .\"O .B FILES
583 .\"O section.
584 マクロファイルを検索するための tmac ディレクトリ
585 .RB ( "tmac パス" )
586 をコロンで区切ったリスト。
587 指定されていない場合は、
588 .B ファイル
589 のセクションで示したデフォルトのパスが使用される。
590 .\" --------------------------------------------------------------------
591 .\"O .SH BUGS
592 .SH バグ
593 .\" --------------------------------------------------------------------
594 .\"O The groff documentation is in evolution at the moment.  It is possible
595 .\"O that small inconsistencies between different documents exist
596 .\"O temporarily.
597 現在、groff システムのドキュメントは進化の途上にある。
598 一時的にドキュメント同士でささやかな矛盾点が見られるだろう。
599 .\" --------------------------------------------------------------------
600 .\"O .SH AUTHOR
601 .SH 著者
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> によって記述された。
607 .LP
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 のコピーがあるはずである。
613 以下でもオンラインで参照できる。
614 .RS
615 .LP
616 .IR <http://www.gnu.org/copyleft/fdl.html> .
617 .RE
618 .\" --------------------------------------------------------------------
619 .\"O .SH "SEE ALSO"
620 .SH 関連項目
621 .\" --------------------------------------------------------------------
622 .\"O The authoritative source of information for all details of the groff
623 .\"O system is the groff
624 .\"O .BR info (1)
625 .\"O file.
626 groff システムの詳細について、信ずべき情報源は、groff の
627 .BR info (1)
628 ファイルである。
629 .LP
630 .\"O For a groff overview, see
631 .\"O .BR roff (7)
632 .\"O and the file
633 .\"O .I README
634 .\"O in the groff source package.
635 groff の概要については
636 .BR roff (7)
637 と groff ソースパッケージの
638 .I README
639 ファイルを参照のこと。
640 .LP
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 マクロパッケージについては以下を参照のこと。
652 .BR groff_man (7),
653 .BR groff_markup (7),
654 .BR groff_mdoc (7),
655 .BR groff_mdoc.samples (7),
656 .BR groff_me (7),
657 .BR groff_mm (7),
658 .BR groff_mmroff (7),
659 .BR groff_ms (7),
660 .BR groff_msafer (7)
661 .LP
662 .\"O The groff language is described in
663 .\"O .BR groff (7)
664 .\"O and the formatters in
665 .\"O .BR groff (1),
666 .\"O .BR troff (1).
667 groff 言語については
668 .BR groff (7)
669 に、フォーマッタについては
670 .BR groff "(1) と"
671 .BR troff (1)
672 に記述されている。
673 .LP
674 .\"O The Filesystem Hierarchy Standard (FHS) is available at
675 .\"O .BR http://www.pathname.com/fhs/ .
676 .\"O 
677 Filesystem Hierarchy Standard (FHS) については
678 .B http://www.pathname.com/fhs/
679 を参照のこと。
680
681